Best strategy to dialog with a large dataset

I’m reading some guides and åwatching some videos about methods to gather information and get answers from a huge list of files.
As an example, I saw this video tutorial “GPT-4 Tutorial: How to Chat With Multiple PDF Files (~1000 pages of Tesla’s 10-K Annual Reports” (unfortunately, I cannot insert links).

These tutorials do a search to extract relevant documents based on the user question and than provide embeddings to chatgpt to provide a detailed answer. In my opinion this works if you have a very specific question like “give me revenues YoY growth in 2022”.
But, image to have a lot of documents talking about AI and marketing and let’s say my query is something like “based on your knowledge (based on own files) give me a list of actions to improve my awareness leveraging on AI” or “what other marketer leaders are doing with AI?”. I’m my opinion in this case it’s not just a search but it’s important to fully understand the query and gather information from multiple part of the files to build an answer with a fully understanding of the uploaded files.

Hoping my thoughts are clear, which strategy would you use to get the best result?

Thank you

1 Like

Hi, I would break it into steps. You need some thought to answer this type of questions. Ideally you would have some sort of a planner which would draft what is needed in order to answer and then you would use that as an input for your inquiries run them gather the context and then try to form the final answer. But seeing the type of questions you ask it is more about the whole writing process with complex planning data retrieval and improving of the answers. If these are combined with simple questions like simple data search you would definitely need a sort of a logic to direct this type of queries to different endpoints which would handle them separately.

1 Like

Welcome to the forum!

First off I have not done what I about to propose so take with a grain of salt.

What you noted is basically using RAG (Retrieval Augmented Generation) using a legacy LLM model. (First time I used legacy and LLM in a sentence).

OpenAI has a new LLM model named o1 and some variations.

https://openai.com/o1/

In using the o1 model with ChatGPT I will note that it is overkill to use for many common simple task, however there are some task such as optimization problems and NP hard problems that the o1 models give much better results.

As such, it might be worth exploring the use of an o1 model with RAG for your situation. Note: o1 models cost more than the legacy models.


Side note:

@sergeliatko

Thanks for using your bio to promote your company and products. You did it the correct way and we appreciate that. Too often we have to take down post that are soliciting work or using the forum as billboard to advertise.

2 Likes

Yeah I would agree here you might use a o1 model to plan the answer and then use other models with apis to pull the data necessary to produce the result.

2 Likes

Following this way, I could have different Assistants specialized about different topics like Marketing AI, Marketing Advertsing, and so on. Than I can augment each Assistant with related files (as far as I understood 10k for each Assistant). When a user ask something I could understand which Assistent could be the best to reply than use o1 model to provide a reasoned answer.
It could be a way?

1 Like

It is reasonable and worth exploring.

The o1 models are so new that there is little to read about them that helps with this regard, in essence you have reached the bleeding edge.

Note: The OpenAI cookbook has a few entries for o1 models that could be of benefit.

Pay attention to this one: Using reasoning for routine generation | OpenAI Cookbook

If you learn anything along the way doing this, feedback here would be appreciated but not expected.

2 Likes

Yes, that’s a good start. You basically would take the whole thing as a team of assistants, each being a specialist in its area, with a rag engine available over the API (but you can stay with knowledge files for the POC) and a front desk assistant to orchestrate the whole process.

1 Like

As I have no practical experience with this I can only conjecture.

While the multi-agent approach is what is currently typically done, with the o1 model and a proper prompt, the number of agents needed might be reduced, even to the point of one in some cases.

While I have no insight into what OpenAI does for research and the direction they are headed, they do have access to all of the prompts and replies and can use that to see where the need is greatest and invent technology to improve upon those results. So reducing many agents is a good thing. :slightly_smiling_face:

In other words, don’t rule out a single prompt to do it all with an o1 model because the trend has been to add more agents.

1 Like

For me it’s more the cost/speed/focus matters that are important in business apps. O1 can solve a lot of problems, but often it is better to delegate most of the tasks to smaller models and keep the o1 for cases where you actually need the ai plan the execution (which is not that often in business apps, as your app often is build on user stories with pre defined scenarios).

3 Likes

No arguments here.

Now for some extra words to keep the post filter happy that it was not a short reply.

1 Like