ChatGPT with multiple PDFs giving Gibberish with real Data

I just don’t get it. I am building a ChatGPT for multiple PDFs.

Now I have multiple PDFs which I have created embeddings of and saved in MongoDB database.

Now when a user asks a specific question, I get multiple outputs from GPT-3.5 and a lot of it does not make sense. Even though real answer is still in there.

Is there an API i can use to go through all data of PDFs and figure out which one is relevant and then I run GPT-3.5 only on that specific part of PDFs

Hi @yarking

You should checkout Assistants API as it does all that while also making call to chat completion API and send you the result.

You can check GitHub - Anil-matcha/ChatPDF: Chat with any PDF. Easily upload the PDF documents you'd like to chat with. Instant answers. Ask questions, extract information, and summarize documents with AI. Sources included. to get an understanding of how to build a chat with pdfs app

thanks… but for me , i want to chat with multiple pdfs which creates a problem.

Single one does not .

The solution works for multiple pdf as well. All the generated embeddings are stored in a single vector db. When you make a query, top K results are fetched as context and sent to ChatGPT which then generates a response