Notebooks
On Demand RAG
By using conditional interventions we can build a “on demand RAG” system.
When we see the user is asking about something that might need more data, we can abort the request and get more data from an external source.
In this example, we’ll build a model that can insert brand deal data into the response when the user is asking about products.
For example, if the user asks about drinks, and we sponsor Coca Cola, we can stop the request, get RAG data on brand deals and pass it back into the model.