AI EngineeringInterview preparation
Intermediate·Concept·2 min read

Multi-hop RAG and agentic RAG

Practice this question

Overview

  • Multi-hop RAG retrieves information in dependent steps: one finding determines the next search.
  • Agentic RAG lets a bounded agent choose retrieval tools or decide whether another search is needed.
  • A fixed two-step retrieval workflow can be multi-hop without being an open-ended agent.

Why this matters

Some answers require connecting customer, product, and document information rather than one search.

An everyday example

An employee identifies your policy type, opens its handbook, then checks a related endorsement.

A technical example

policy lookup → endorsement IDs → retrieve applicable endorsement → explain effect.

How it works

  1. Establish required information
  2. Retrieve first evidence
  3. Determine missing links
  4. Retrieve next evidence within budget
  5. Track sources
  6. Stop or escalate.

Architecture and flow

Question → first lookup → dependent search → evidence sufficiency check → answer.

The insurance assistant example

A policy's base coverage is modified by an endorsement stored separately.

When to use it

Dependent evidence questions and mixed search/API requirements.

When to avoid it

A single known FAQ lookup does not need an agent or repeated searches.

Interview answer

“Multi-hop retrieval follows dependent evidence steps; agentic RAG adds model-selected search behavior. I bound steps, tools, and cost and preserve provenance.”

Benefits, trade-offs, and production considerations

  • Additional hops compound errors and latency.
  • Use a deterministic plan when dependencies are known.
  • Detect cycles and repeated queries; lack of evidence should lead to abstention, not endless search.
Adapted from 13_AI.MD · “Multi-hop RAG and agentic RAG”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.