1. Ask OpenAI
- For incoming requests, ask GPT “Should I perform a Google search to better answer the following question: "{input_text}"? (yes or no)”
- If the response is yes, we make a request to Google via API.
- We provide the results as a pre-prompt: “Please provide an answer using information from the following Google search results and specify the source links if you use them for your answer.”
2. Process Specific Responses
- First, we send requests to OpenAI as usual.
- If we get something like “As an AI language model I don’t…” or “As an AI language model I can’t,” we go and Google the same request and provide it as a pre-prompt. In fact, we can catch when GPT struggles through Embeddings (what it is and how it works is written here https://t.me/rvnikita_blog/376).
3. Train Your Own Model
- Using Reinforcement Learning, try to fine-tune the LLM model to determine if additional information is needed.
The main downside is that this approach increases processing time and the number of prompts.
Do you have any additional thoughts?
P.S. The bot is open-source, and the source code is available at https://github.com/rvnikita/RvChat_bot (give it a ⭐️).