I have successfully integrated Pinecone Vector DB with Langchain for query indexing, enabling efficient retrieval.
Now, I’m working on allowing users to upload files for analysis by our chatbot. The goal is to assess document compliance with legal frameworks and our knowledge base, flagging errors and providing recommendations as needed.
Seeking advice on best practices for implementing this document analysis feature.
As @anon22939549 hinted, you can chunk and embed your documents in the same integration you have successfully implemented. It should be able to handle the retrieval of relevant context from the documents to answer the query.
Alternatively you can completely load the document into the API call to gpt-4-turbo-preview model if the document is small enough to leave context for generating an answer.