CHATGPT API with 200 massive PDF files

I have 200 pdf files vectorized and I am using ChatGPT API with Retrieval tool, But my question is what is the best way to reduce the alucinations y get better precision in the answers?

Welcome to the community!

Your options with retrieval are pretty limited, especially if you don’t want to edit and clean your documents.

In terms of using RAG in general, there’s vigorous debate on the matter. You can join the fray here:

1 Like

Hi @s.rodriguez , if those 200 pdf files can have some segmentation based on topic, closely related key-words, or any other characteristic based on which they could be clustered, I would suggest to consider adding a routing / classification layer before RAG. I personally used this approach multiple times for bigger volumes of knowledge base and it worked out quite well. Hope that was of some help.

Vasyl, Thank you very much for the suggestion.
Our agent, built in Python with the OpenAI API, processes the 200 vectorized PDF files through the “Retrieval” tool offered by the OpenAI API. Currently, we use two internal assistants before generating a response to any chat query about the PDF documents. We could use a third assistant to handle classification and routing to the PDF(s) related to the searched topic. This way, we could direct it to a specific document(s). We will try it. If you have any other ideas on how to perform the routing, they would be welcome. Thank you!

1 Like

@vasyl and @s.rodriguez

Hi guys,

And thanks you very much for sharing those information.

I am new in using openAi ans Make and i am strugling into get things together. Especially when its about getting Big files together as a usable memory.

Would you mind develloping your answer please ? Even sharing a make scénario picture ans anything that would help me understanding you réflexion !

Please please please.

Here’s the understandable strategy that is optionally described above that one might use to subcategorize domains of expertise, since the agentic use of two assistants wasn’t fully explained.

graph TD
    A[User Query] --> B[Preprocessing, Custom Prompting]
    B --> C[AI 3: Query Classification & Routing]
    C -->|Domain Identified| D1[Assistant 1: General Vector Store]
    C -->|Domain Identified| D2[Assistant 2: Specialized Vector Store]
    D1 --> E[Knowledge Search]
    D2 --> E
    E --> F[Contextual Ranking & Integration]
    F --> G[Response Generation]
    G --> H[Assistant Response Delivery]