Structured Data Extracted Using AI

Reproduce in Code

The code below runs the same extraction, with your current field definitions and the model gpt-6-luna , on your own computer and your own data. It needs your own OpenAI API key.

R code (ellmer package)

          
Python code (chatlas package)

          

Tips for Better Results

  • Use specific field descriptions and say what to return when the information is absent
  • Start with more fields and remove unnecessary ones later
  • If results are inaccurate, try rephrasing your field descriptions
  • For multiple text blocks , separate each with a double line break
  • Each text block should contain complete information for all fields you want to extract
  • Check the results against the source documents before you use them

Technical Note

This app sends its requests to the OpenAI model gpt-6-luna through chat_openai() from the ellmer package. The app does not provide an option to change the model.

For complete privacy , consider using local open-weight models via chat_ollama() from ellmer, which connects to Ollama for running models locally on your machine.

ellmer also supports models from other providers. For example, Claude models require chat_anthropic() and Gemini models require chat_google_gemini() , each with their respective API keys configured in the R environment. The code under 'Reproduce in Code' can be adapted by replacing the chat_openai() call.