> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goodfire.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# On Demand RAG

By using [conditional interventions](/sdk-reference/conditionals) 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.

<a href="https://colab.research.google.com/drive/1pIvdetWgr1EsiIV6SRe4KE4gT97xzogX#scrollTo=2aQ-Oauo93kV" target="_blank">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab" width="200px" style={{ pointerEvents: "none" }} />
</a>
