Structured data extraction tutorial
Make sure you have installed LlamaIndex.TS and have an OpenAI key. If you haven't, check out the installation guide.
You can use other LLMs via their APIs; if you would prefer to use local models check out our local LLM example.
Set up
In a new folder:
Extract data
Create the file example.ts
. This code will:
- Set up an LLM connection to GPT-4
- Give an example of the data structure we wish to generate
- Prompt the LLM with instructions and the example, plus a sample transcript
To run the code:
You should expect output something like:
Edit on GitHub
Last updated on