How to feed content to ChatGPT and make it answer questions about it?
I recently came across several startups that appear to feed content to ChatGPT and subsequently ask questions about that content.
Examples: 1. https://flowgpt.ai 2. https://www.chatbase.co
I'm curious about how this process works. Do these startups utilize the OpenAI API to train a model?
I attempted to train a model using the OpenAI API myself, but it seems like these startups have a different approach. I was unable to achieve the desired results simply by uploading content, even after spending hours creating JSONL files.
Chatbase, for instance, has a video demonstrating a user uploading a file and then asking questions: https://youtu.be/W4lzGger7_0
12 comments
[ 2.7 ms ] story [ 46.3 ms ] threadI strongly suspect that the better results come through the APIs and not the web interface.
- https://www.youtube.com/@DataIndependent
If you finetune, you'll get mostly the style and sometimes worse factual performance. Source through semantic search context/RAG is a better approach.
Source: Creator of AnyQuestions.ai which works like that plus some extra neat tricks. (released the first demo in August 2022 before the onslaught)
You can use local embeddings, such as sentence transformer models, too, to save on embeddings (and maintain embeddings you can move to another provider with new queries etc)
https://www.youtube.com/watch?v=ih9PBGVVOO4
2. Segment text every 3000 characters.
3. Generate embeddings for every text segment and save the embeddings to PineconeDB. Make sure you also save the raw text segment as additional meta information so you can use it later. https://platform.openai.com/docs/guides/embeddings/what-are-...
4. Capture user's question and generate an embedding for it using the same OpenAI API.
5. Query your PineconeDB with the question's embedding you will get matches back.
6. Use these matches as context to hit the OpenAI chatgpt API endpoint. Example: