We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Recursive RAG

Think about how you search for your car keys. You check the kitchen counter – darn, not there.

You ask your spouse or roommate if they've seen them, and they mention you drove yesterday. That gives you a clue! You use that information to check near the front door or in your coat pocket.

This is an example of recursive search – using what you found (or didn't find) to guide your next search.

Movie Search Example

Imagine someone asks: "What's the budget of the highest-grossing bear movie?"

Your first search finds: "The Jungle Book made $966 million at the box office!"

Great! But wait... they asked for the budget, not the revenue.

A simple one-shot prompt might give up here. Recursive RAG says: "Hmm, I found the movie but not the budget. Now let me search specifically for 'Jungle Book production budget.'"

Which is exactly how a human would approach the task!