Find answers from the community

Updated 3 months ago

Hi guys quick question

Hi guys quick question...
Is Llama Index able to transform between Unstructured data (ex: raw text) --- into ---> Structured Data (ex: JSON) ?
L
j
2 comments
Sure is. There is various levels to this

  1. Use a raw program to extract structured data (it extracts into pydnatic objects, but thats easy enough to convert into json or other structures) https://gpt-index.readthedocs.io/en/latest/how_to/structured_outputs/pydantic_program.html
  1. Modify the prompt templates and ask the LLM to write the extracted JSON. This will probably work best with the response_mode="accumulate" mode
  1. Use a SQL index to extract data into tables from documents
https://gpt-index.readthedocs.io/en/latest/guides/tutorials/sql_guide.html#inferring-structured-datapoints
thanks a lot @Logan M for the direction! πŸ™‚
Add a reply
Sign up and join the conversation on Discord