Building a CustomGPT with RAG - Please Help

Hello everyone! I’m seeking for help and opinions about an idea I have.
So, I want to build a Custom GPT that is able to answer any questions about internal documentation I have (PDFs, docs, text files, etc) without performing fine-tuning.
The first intuitive response would be to upload my files to the Knowledge Base of the Custom GPT; the problem with this is that is limited and I don’t really want to be uploading files manually. Instead, I want to create a pipeline that is able to get information from my docs automatically and feed the GPT without having to do anything manually. After some text processing, I was able to store all my documentation in four text files.

The four text files contain all the internal documentation I want the GPT to use. I want to know how can I make this Custom GPT. It is possible to have a RAG approach using Custom GPTs? Is there some way I can find the information inside my files without indexing the information inside them? (having an index of what information is in which file).

Previously I made a solution that works, which was storing the four files in Google Storage and then calling the Custom GPT actions to read these files via API. The problem with this approach is that it has to read the four files before it can answer anything (four actions), which takes like 15 seconds. I know is not a lot of time, but if there is a better and more scalable way to do this, I would appreciate your suggestions.

Thank you for your help!

Hey there and welcome to the community!

So, knowledge files are considered RAG for the custom GPT. If you need programmatic execution of RAG, that would have to be done with the API.
Could you make an API endpoint to create some kind of RAG system? Perhaps, but with the kind of complexity required to do such a thing you are likely to spend less time building with the OpenAI API in the first place.

1 Like

Thank you for your response!
When you say use the OpenAI API instead, you mean building an Assistant? and if I use the OpenAI API to build my own RAG, is there some way to use it in the OpenAI UI or I would need to create my own UI and host it somewhere?
again, thanks your your answer.

Of course! Happy to help!

Yes, either Assistants API or the chat completions API. Either or should work.

Unfortunately, if by OpenAI UI you mean ChatGPT, then no, there is no way to integrate something you built with the API into ChatGPT unless you make your own “tool”, which would be your own API endpoint you built yourself. This is not recommended because, well, you pay per token with the API, but you do not make any money with a custom GPT (yet).

That would mean that yes, you would need to build your own UI.

It’s a particularly tough trade-off, I know. On one hand, you manually handle the knowledge files and deal with its quirks and limitations, On the other, you’re basically building it from scratch to incorporate the features you want in the way you’d want.

I would give it some thought to decide what would be worth the trade-off. Each person’s use-case is different.

I wish you the best of luck!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.