-
Notifications
You must be signed in to change notification settings - Fork 18
How Tos
To begin, select the type of data you'd like to import. This could be a web file such as a PDF, or a web page to scrape. We plan to support more data types soon.
In this example, we're converting HTML text and PDF content into Text + Pages. Following this, we need to build Embeddings, which will enable us to make the data searchable in the vector database.
For this step, we will focus on the API option illustrated in the image below.
After selecting the API option, you will see a list of "Response Types" to implement. These are ordered in the sequence they will be processed.
In this case, we:
- Embed the question to enable search functionality
- Search the database to retrieve related data
- Use Preg Replace to clean up some irregularities from the PDF
- Trim the text to save token space
- Combine the final rows of data into a size that leaves enough token room for a response
- Finally, add the ChatAPI response type
The settings for the ChatAPI response type are shown in the image below.
The image shows the URL you can use to access the data. Since we're using JetStream, you can see how to do that here.
Then, you need to create the prompt that the Large Language Model (LLM) will use in the chat process.