# How Do You Answer Multi-Hop Questions?

> How multi-hop questions chain facts across documents, the steps that answer them, and where the method breaks, explained simply for your AI interview.

**In short:** A multi-hop question needs facts from two or more documents, and often each search depends on the answer before it. Split it into steps, carry the bridge fact from one step to the next, and stop after a set number of hops.

AI and LLM interview question Q143, Retrieval-augmented generation (RAG). Advanced, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/how-do-you-answer-multi-hop-questions

## Say it in 30 seconds

A multi-hop question needs two or more facts, and often each search depends on the last answer. One search usually misses the second fact, so I split the question into steps. I search for the first step, take the name or number it gives me, and use that to search for the next. I log each hop and cap the hops, so the system can't loop forever.

## Say it in 2 minutes

Some questions can't be answered from one document. A procurement lead asks what the liability cap is in the supplier deal renewed in March. The renewal letter names the deal, but not the cap. The cap sits in the original agreement, which the letter points to by number. So the answer takes two hops: find the renewal, then use its number to find the clause.

One search usually misses the second hop. The question's words match the letter best, and the clause uses different words, such as damages where the question says liability. So I run the search in steps. Each step writes a sub-question, and the answer to one step becomes the search for the next. I keep a log of each hop, so a person can check every answer against its source.

There are costs. Each hop adds a model call and a search, so the answer is slower and dearer. A wrong first hop sends the second search to the wrong contract, so I check each hop before I use it. I also set a limit, such as four hops, and say not found when it runs out. I test with questions that need two, three and four hops, not only the easy ones.

In the interview, name the kind of question. A bridge question needs the hops in order. A comparison question needs facts that don't depend on each other, so they can be fetched side by side.

## What is a multi-hop question, in plain words?

A multi-hop question needs two or more facts, and you find them one after another. Each round of searching is one hop. What one hop finds, like a contract number or a person's name, tells you what to search for next.

Think of a triage nurse. She asks what medicines a patient takes, then checks each name against an allergy list. The second check only makes sense after the first answer. An AI assistant that searches company papers works the same way.

Here is a real case. A procurement lead asks "What is the liability cap in the supplier deal we renewed in March?" The renewal letter names the deal, but not the cap. The assistant has to search again, this time with the deal number from that letter.

- **Multi-hop question:** A question that needs two or more facts, found in order or side by side.
- **Hop:** One round of searching and reading.
- **Bridge fact:** The name or number one hop finds, which the next hop needs.
- **Retrieval:** Searching your documents and handing the best matches to the model.

## Why does one search miss the second fact?

One search sends the whole question as one query, then keeps the top matches. The top match is the one that shares the most words with the question. The fact you need may use different words, or it may only be reachable through the first fact. A 2022 paper on this, IRCoT, a method that mixes searching with step-by-step reasoning, put the problem plainly:

> "we observe that this one-step retrieve-and-read approach is insufficient for multi-step QA" (IRCoT paper, 2022)

*Diagram, One search or hop by hop: Two ways to answer the same question, one above the other. One search ranks the renewal letter first, and the letter has no cap. Hop by hop, the deal number from hop 1 leads to the clause that holds the cap.*
1. One search sends the whole question in one go.
2. Hop by hop starts with the part that can be found first.
3. That single search ranks the renewal letter top.
4. Hop 1 passes the deal number on to hop 2.
5. Hop 2 finds the clause, and the cap is there.

Word matching shows the gap. The question shares the word March with the renewal letter, so the letter wins. The clause says damages where the question says liability, so one search never reaches it.

IRCoT interleaves retrieval with reasoning. It searches, reads the result, writes the next step, and searches again. The paper tested it on four datasets (collections of questions used for testing) of multi-step questions, including HotpotQA, 2WikiMultihopQA, MuSiQue and IIRC.

## Is it a bridge question or a comparison question?

- **Bridge: Hops in order.** The second search needs the answer to the first, like a deal number. You must run the hops one after another.
- **Comparison: Facts side by side.** Two facts don't depend on each other, like two suppliers' liability caps. You fetch both, then compare them.

HotpotQA, a dataset from 2018, says its questions require finding and reasoning over multiple supporting documents to answer. It also offers a new type of comparison question.

Anthropic's own research system uses several agents at once. Its team reports that these systems excel especially for breadth-first queries, which spread wide across many sources.

> **Tip:** Name the kind first. It tells the listener how you will plan the searches, and whether the hops can run side by side.

## How do you answer one, step by step?

1. **Split out the next fact:** Write a sub-question for the fact you still lack. The Self-Ask method has the model ask itself these follow-up questions before it answers.
2. **Search for that one fact:** Run one search for the sub-question. Keep the best matches and the name of the document each one came from.
3. **Carry the bridge forward:** Take the name or number the hop found, and build the next sub-question from it. This is the step one search cannot do.
4. **Stop by rule:** Set a maximum number of hops. When it runs out, answer "not found" and list what was checked.
5. **Answer from the sources:** Give the answer with the document it came from, so a person can check every hop.

Here it is in plain Python. A small keyword search stands in for a real retriever. It finds the renewal letter first, which has no cap. The deal number is the bridge, and the second hop reaches the clause.

```python
# A made-up contracts corpus: the answer sits two documents apart.
import re

DOCS = {
    "renewal": "Renewal letter, March 2026: Kestrel 2291 is extended for two years, same terms.",
    "clause": "Kestrel 2291, section 9: total damages are limited to twelve months of fees.",
    "holiday": "Office closed on public holidays. Chat support stays open.",
}

def words(text):
    return set(re.findall(r"[a-z0-9]+", text.lower()))

def search(query, exclude=()):
    q = words(query)
    names = [n for n in DOCS if n not in exclude]
    return max(names, key=lambda n: len(q & words(DOCS[n])))

question = "What is the liability cap in the supplier deal we renewed in March?"
hop1 = search(question)
print("One search finds:", hop1)
print("Cap in that hit:", "twelve months" in DOCS[hop1].lower())
bridge = re.findall(r"kestrel (\d+)", DOCS[hop1].lower())[0]
print("Bridge from hop 1:", bridge)
hop2 = [n for n in DOCS if n != hop1 and f"kestrel {bridge}" in DOCS[n].lower()]
print("Hop 2 finds:", hop2[0])
print("Answer text:", DOCS[hop2[0]])
```

Output:

```text
One search finds: renewal
Cap in that hit: False
Bridge from hop 1: 2291
Hop 2 finds: clause
Answer text: Kestrel 2291, section 9: total damages are limited to twelve months of fees.
```

Real systems usually match meaning with embeddings, which are lists of numbers that stand for what a text says. The loop stays the same: search, take the bridge, search again, then stop.

> "they show no corresponding improvement in their ability to perform this kind of compositional reasoning" (Self-Ask paper, 2022)
>
> "include stopping conditions (such as a maximum number of iterations) to maintain control" (Anthropic, on building agents)

The Self-Ask authors found that on the GPT-3 family of AI language models, single-hop answers improved faster than multi-hop answers as the models grew. That study used models from 2022, so treat it as a warning that scale alone may not fix the second hop. It says nothing certain about today's models.

The method has costs. Each hop adds a model call and a search, so the answer is slower and dearer. A wrong first hop sends the second search to the wrong contract. So check each hop, and measure on questions with two, three and four hops, not just the easy ones.

The MuSiQue dataset, from 2021, was built so that shortcuts fail. Its authors say one reasoning step critically relies on information from another, and a single-hop model has a 30-point drop in F1 on it. F1 is a standard score for answer quality.

### How would you build this for a legal team?

A legal team searches 40,000 supplier contracts. The question "Does any renewal raise our cap above the board limit?" needs three facts: the renewal, the contract it renews, and the board limit. Here is how I would build it.

1. **Limit the hops:** Allow four at most. Each hop logs its query, its top document and the bridge it found.
2. **Check access on every search:** Each search returns only the contracts the person may read, so a bridge can't leak a file they can't see.
3. **Stop when no bridge is new:** When a hop finds nothing new, or the limit is hit, say so and show what was checked.
4. **Test by hop count:** Score 200 made-up questions, split into two, three and four hops, so you see which hop fails.

The log matters more than the model. When an answer is wrong, the log shows whether the renewal, the bridge or the clause was the miss. Then you fix that one step.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition: a question that needs two or more facts, found in order or side by side.
- [ ] Bridge and comparison questions, with an example of each.
- [ ] Why one search fails: the next fact may use other words, or only be reachable through the first.
- [ ] Steps: split, search, carry the bridge forward, stop by rule, cite the sources.
- [ ] The costs: more calls, slower answers, and a wrong first hop that spreads.
- [ ] How you test it: scored per hop, on two-, three- and four-hop questions.

**Common traps**

- Trap: "Just use a bigger model." Better: Scale alone did not close the gap in the Self-Ask study. Fix the steps and the search first.
- Trap: "One search will find it." Better: Only if the words match. Often the next fact needs the bridge first, so plan the hops.
- Trap: "Allow ten hops to be safe." Better: Each hop costs a call and time. Set a small limit, and stop with a clear not-found answer.

## Can you spot the weak step?

**Spot the weak step:** A candidate describes a multi-hop design. Which step is weakest?

A. Search the question once, then answer from the top three documents.
B. Search for the deal, pass its number to a second search, stop after four hops.
C. Log each hop with its source, so a wrong answer can be traced.
D. Test on two, three and four hop questions, scored per hop.

**Answer:** A. One search misses the second fact when its words differ from the question. The other three are sound: the second search carries the bridge, the log traces errors, and per-hop tests show which hop fails.

**Quick check:** Your assistant gets a three-hop question wrong. What do you check first?

A. Raise the hop limit to ten
B. The log of each hop: its query, top document and bridge
C. Switch to a bigger model
D. Lower the temperature

**Answer:** B. The log shows which hop went wrong. A higher limit or a bigger model may repeat the same miss. Temperature, a setting that changes how the model picks its wording, does not change which documents the search finds.

## Can you answer these from memory?

**Flash cards**

- **What is a multi-hop question?** One that needs two or more facts, found in order (bridge) or side by side (comparison).
- **What is a bridge fact?** The name or number one hop finds and the next hop needs.
- **Bridge vs comparison?** Bridge: hops in order. Comparison: facts fetched side by side.
- **Why does one search fail?** The next fact may use other words, or only be reachable through the first.
- **What stops the loop?** A maximum number of hops, with a clear not-found answer when it runs out.
- **How do you test it?** Score each hop on two-, three- and four-hop questions, so you see which hop failed.

## Likely follow-up questions

- Q133 What are common RAG failure modes? https://designervenkat.online/interview/ai/common-rag-failure-modes
- Q134 How do you reduce hallucinations in RAG? https://designervenkat.online/interview/ai/how-to-reduce-hallucinations-in-rag
- Q136 What is GraphRAG? https://designervenkat.online/interview/ai/what-is-graphrag
- Q137 What is agentic RAG? https://designervenkat.online/interview/ai/what-is-agentic-rag
- Q150 How would you design RAG for 10 million documents? https://designervenkat.online/interview/ai/how-would-you-design-rag-for-10-million-documents
