The document discusses using a vector database to enable question answering with custom data. Key points:
- Data is converted to vector embeddings and stored in a vector database like Pinecone to allow for similarity searches.
- When a user asks a question, it is converted to a vector and queried against the database to retrieve similar content to provide as input to a language model for generating an answer.
- The OpenAI API can also be used to build an assistant using a language model, where custom data is loaded to enable answering questions about that data as a "support manager."
2. RAG
? Retrieval and generation: the actual RAG chain, which takes
the user query at run time and retrieves the relevant data from
the index, then passes that to the model
? model is language model like OpenAI
? Store can be Pinecone vector DB
Data Query
5. Before Assistant api
? Convert your data to vector presentation (embedding)
? Split your data to parts , you can add metadata per part
? Persist it in vector db
? Convert your question to vector
? Query database to find similar content/doc related to the question
? In vector database cat and mouse are similar (distance in space)
? On the result use language model to ¡°understand¡± the document you
got from DB and return an answer to the user
? Return also the answer resource to the user (from which doc the
answer is from)
? Optional - get feedback how good is the answer
6. With assistant api
? Create assistant
? Select language model
? Add system instruction : ¡°answer as support manager¡¡±
? Load file (your custom data)
? Start chat