Course contentsShow
← AI Engineering
Lesson 434 of 1,88611. RAG - Improving GenerationFree lesson

Multi-Hop Retrieval Workflows

Implement patterns where initial retrieved context informs subsequent retrieval queries for deeper information.

Multi-Hop Retrieval Workflows

What You'll Learn

You'll learn how to chain multiple retrieval steps together, where each retrieval result informs the next query, enabling your RAG system to navigate complex information needs.

The Core Idea

Think of researching a topic in a library: you start with an encyclopedia to get the basics, then use terms you learned there to find specialized books, and finally use those references to locate original research papers. Each step depends on what you learned in the previous step.

Multi-hop retrieval works the same way. Instead of retrieving everything in one shot, your system performs an initial retrieval, examines the results, then uses that information to formulate a more informed second query—and potentially more rounds after that.

How It Works

  1. First Retrieval: Use the original user query to get initial context
  2. Information Extraction: Extract key facts, entities, or follow-up questions from the retrieved documents
  3. Subsequent Retrievals: Use extracted information to query again for deeper or related content
  4. Aggregation: Combine insights from all retrieval rounds

For example, if a user asks "What were the economic impacts of the policy introduced by the CEO mentioned in the Q2 report?", you might:

  • Hop 1: Retrieve the Q2 report to identify the CEO's name
  • Hop 2: Retrieve documents about policies by that specific CEO
  • Hop 3: Retrieve economic analysis documents related to those policies

This builds on Self-Ask (breaking down queries) and Query Decomposition, but now you're actually executing multiple retrievals in sequence, where each informs the next.

Key Takeaway: Multi-hop retrieval enables your RAG system to answer complex questions that require connecting information across multiple documents by chaining retrieval steps, where early results guide later queries.