Source-linked AI summary
Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, Ashish Sabharwal
TL;DR
Multi-step open-domain QA requires retrieval that adapts to intermediate reasoning because question-only retrieval can miss later-hop evidence. IRCoT interleaves CoT generation and retrieval, using each to guide the other. Across four datasets, it improves retrieval and QA, reduces factual errors, and extends these gains to smaller models and OOD settings.
Problem
Question-only retrieval is insufficient for knowledge-intensive multi-step QA because later evidence depends on intermediate reasoning and earlier retrieved facts.
Method
IRCoT alternates CoT generation from retrieved paragraphs with retrieval queries formed from the latest CoT sentence.
Results
IRCoT significantly improves retrieval and QA across four datasets, with retrieval gains of 11-21 recall points, QA gains up to 15 F1 points, and up to 50% fewer factual errors.
Takeaways & Limitations
IRCoT improves multi-step open-domain QA in IID and OOD settings and works with large and smaller models without additional training.
Takeaways & Limitations
IRCoT depends on zero- or few-shot CoT ability, which is less common in models under 20B, and requires support for long inputs containing retrieved paragraphs.
Abstract
from arXiv · showhide
Prompting-based large language models (LLMs) are surprisingly powerful at generating natural language reasoning steps or Chains-of-Thoughts (CoT) for multi-step question answering (QA). They struggle, however, when the necessary knowledge is either unavailable to the LLM or not up-to-date within its parameters. While using the question to retrieve relevant text from an external knowledge source helps LLMs, we observe that this one-step retrieve-and-read approach is insufficient for multi-step QA. Here, \textit{what to retrieve} depends on \textit{what has already been derived}, which in turn may depend on \textit{what was previously retrieved}. To address this, we propose IRCoT, a new approach for multi-step QA that interleaves retrieval with steps (sentences) in a CoT, guiding the retrieval with CoT and in turn using retrieved results to improve CoT. Using IRCoT with GPT3 substantially improves retrieval (up to 21 points) as well as downstream QA (up to 15 points) on four datasets: HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC. We observe similar substantial gains in out-of-distribution (OOD) settings as well as with much smaller models such as Flan-T5-large without additional training. IRCoT reduces model hallucination, resulting in factually more accurate CoT reasoning. Code, data, and prompts are available at \url{https://github.com/stonybrooknlp/ircot}
1 Introduction
IRCoT addresses the limits of question-only retrieval for knowledge-intensive multi-step QA by interleaving retrieval with CoT reasoning. Across four datasets, it improves retrieval and QA while reducing factual errors in generated reasoning.
- Motivation: Question-only retrieval is insufficient for multi-step questions because partial reasoning must guide retrieval of subsequent evidence.The Lost Gravity example requires inferring Mack Rides before retrieving the manufacturing country.
- Method: IRCoT alternates CoT extension from collected paragraphs with retrieval queries formed from the latest CoT sentence.The process begins with question-based retrieval and continues until an answer is generated or the step limit is reached.
- Results: 11-21 recall points: IRCoT improves retrieval over one-step question-based retrieval under fixed-budget optimal recall.With a prompting-based reader, it also improves downstream QA by up to 15 F1 points and reduces factual errors in generated CoT by up to 50%.
- Results: IRCoT improves retrieval and few-shot QA in IID and OOD settings across large and smaller models without additional training.The contribution summary also reports fewer factual errors in generated CoTs.
2 Related Work
Prior work applies prompting, decomposition, search, and iterative retrieval to open-domain QA, but IRCoT targets their interaction for multi-step reasoning without additional training.
- Prompting for Open-Domain QA: Prompting enables few-shot task learning and step-by-step reasoning, but its value for multi-step open-domain retrieval and QA remains the focus of this work.
- Multi-Step Open-Domain QA: SelfAsk and DecomP decompose questions, whereas ReAct generates reasoning and action steps for multi-step open-domain QA.
- Multi-Step Open-Domain QA: SelfAsk and DecomP require single-hop QA models, while ReAct uses more complex steps, a much larger model, and fine-tuning to outperform CoT.
- Multi-Step Open-Domain QA: The paper reports higher ODQA performance than available results from these approaches, while noting that direct comparison is not straightforward.
- Supervised Multi-Step Open-Domain QA: Prior supervised work explores iterative retrieval through neural query representations updated from reading-comprehension outputs.
3 Chain-of-Thought-Guided Retrieval and Open-Domain QA
IRCoT is a retrieve-and-read method that interleaves question answering, CoT generation, and retrieval so each reasoning step can inform the next retrieval step.
- Method: IRCoT uses a base retriever, a zero- or few-shot CoT-capable language model, and annotated demonstrations containing reasoning steps and supporting paragraphs.
- Interleaving Retrieval with Chain-of-Thought Reasoning: The method first retrieves K paragraphs using the question, then iteratively alternates reasoning and retrieval steps.
- Interleaving Retrieval with Chain-of-Thought Reasoning: The Reason step generates the next CoT sentence from the question, collected paragraphs, and prior CoT sentences.
- Interleaving Retrieval with Chain-of-Thought Reasoning: The process stops when the CoT contains “answer is” or the maximum reasoning-step limit is reached, returning all collected paragraphs.
- Interleaving Retrieval with Chain-of-Thought Reasoning: The Retrieve step uses the latest CoT sentence as a query to add more paragraphs to the collected retrieval set.
- Open-Domain QA: The QA reader uses either CoT prompting or Direct Prompting to answer from the retrieved paragraphs.
4 Experimental Setup
The experiments evaluate OneR and IRCoT retrievers, paired with prompted language-model readers, across four open-domain multi-step QA datasets using controlled demonstrations and retrieval budgets.
- Datasets: The evaluation covers HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC in open-domain settings.The test sets use 500 randomly sampled questions per dataset after hyperparameter tuning on 100 development questions.
- Retrievers: OneR retrieves K paragraphs using only the question, while IRCoT uses BM25 with GPT3 or different-sized Flan-T5 CoT generators.
- Demonstrations: Experiments use three sampled demonstration sets and report their mean and standard deviation.
- Models: The GPT3 context limit is 8K word pieces, while Flan-T5 is limited to 6K word pieces by available GPU memory.
- Metrics: Retrieval recall measures gold paragraphs within a maximum of 15 retrieved paragraphs, with K and M selected on development data.
- QA Reader: Flan-T5 readers use Direct Prompting, whereas GPT3 readers use CoT prompting; the reader also tunes the number of distractor paragraphs M.
5 Results
IRCoT consistently improves retrieval and downstream QA over one-step retrieval across in-distribution and out-of-distribution settings, while reducing factual errors in generated reasoning. Its gains extend across model sizes, though the smallest model is an exception for QA.
- Retrieval performance: 11.3–22.6 recall points: GPT3 IRCoT improves over one-step retrieval across HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC.The corresponding improvements are 11.3, 22.6, 12.5, and 21.2 points, respectively.
- QA performance: 9.4–15.3 F1 points: Flan-T5-XXL IRCoT QA improves over OneR QA on HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC.For GPT3, the improvements are 7.1, 13.2, and 7.1 F1 points on the first three datasets; IIRC does not improve.
- Out-of-distribution evaluation: IRCoT maintains its retrieval and QA advantages when demonstrations come from one dataset and evaluation occurs on another dataset.This OOD trend holds for all evaluated dataset pairs and for both Flan-T5-XXL and GPT3.
- Reasoning factuality: 50% and 40%: IRCoT reduces factual errors over OneR on HotpotQA and 2WikiMultihopQA, respectively.Across 40-question samples, IRCoT has the fewest factual-error CoTs, followed by OneR and NoR.
- Model scaling: IRCoT improves retrieval for models from 0.2B to 175B parameters, with the difference from OneR roughly increasing with model size.For QA, IRCoT beats OneR at every evaluated size except 0.2B; IRCoT with a 3B model outperforms OneR and NoR with GPT3 at 175B.
- Comparison with prior systems: IRCoT QA significantly outperforms five recent LLM-based ODQA systems in a leaderboard-style comparison, setting a new state of the art without supervised training.The comparison is not head-to-head because systems use different APIs, knowledge sources, and language models.
6 Conclusions
IRCoT interleaves chain-of-thought reasoning and retrieval so each guides the other step by step. Across four datasets, it improves retrieval and QA for large and smaller language models while reducing factual errors in generated reasoning.
- 6 Conclusions: IRCoT interleaves CoT reasoning and retrieval, using each step to guide the next.The method performs retrieval after each reasoning step, rather than relying only on one-step question-based retrieval.
- 6 Conclusions: IRCoT significantly improves retrieval and QA over one-step retrieval across four datasets and across large and relatively smaller language models.The conclusion reports this pattern across the paper’s evaluations without isolating a single dataset or model.
- 6 Conclusions: IRCoT-generated CoTs contain fewer factual errors than those produced by comparison methods.The qualitative examples attribute this to retrieval after each reasoning step, which can prevent errors throughout the chain.
Limitations
IRCoT depends on base-model capabilities and input capacity, incurs additional computation, and partly relies on a deprecated commercial API. These constraints limit adoption, efficiency, and reproducibility.
- Limitations: IRCoT relies on zero- or few-shot CoT generation, which is common in large LMs but less common in models under 20B.The authors state that this limits IRCoT adoptability, while smaller models may increasingly acquire the required ability.
- Limitations: IRCoT requires long-input support because multiple retrieved paragraphs and QA or CoT demonstrations must fit in the LM input.The authors suggest reranking and selecting paragraphs as future work to reduce this requirement.
- Limitations: IRCoT’s retrieval and QA gains incur additional computational cost because the method makes a separate LM call for each CoT sentence.Future work could dynamically decide when to retrieve more information and when to continue reasoning with current information.
- Limitations: Some experiments used deprecated OpenAI code-davinci-002, making those results challenging to reproduce.The Flan-T5 experiments remain reproducible and showed similar trends, according to the authors.
Ethical Considerations
The paper acknowledges that retrieval augmentation does not eliminate biased or offensive generation. It therefore frames deployment in user-facing applications as requiring appropriate care.
- Ethical Considerations: Retrieval-augmented approaches may alleviate hallucination by grounding generation in external text, but they do not solve biased or offensive statements.The authors specifically caution that sensitive questions make these risks especially problematic.
- Ethical Considerations: The authors recommend appropriate care when deploying such systems in user-facing applications.The caution follows their statement that language models can hallucinate incorrect and potentially biased information.
- Ethical Considerations: All datasets and models used in the work are publicly available with permissible licenses.The passage lists the licenses for HotpotQA, 2WikiMultihopQA, MuSiQue, IIRC, and Flan-T5 models.
B Special Handling of Models for IIRC
For IIRC, the system keeps the main passage in every model input and prompts for Wikipedia page titles before retrieval. At test time, it fixes the number of generated titles at three because this improves recall.
- IIRC retrieval always retains the main passage as part of the model input.
- IIRC retrieval first prompts the model to generate relevant Wikipedia page titles using the main passage and question.
- 18Following are the corpus sizes for the datasets: HotpotQA (5,233,329), 2WikiMultihopQA (430,225), MuSiQue (139,416), and IIRC (1,882,415)
- At test time, the method generates exactly three page titles because the number of supporting titles is unknown.
- Generating more titles at test time improves recall compared with letting the model choose how many titles to generate.
C Comparison with Previous Systems for ODQA with LLMs
The paper compares IRCoT with several LLM-based open-domain QA systems, while cautioning that differing models, APIs, corpora, and retrieval choices prevent head-to-head comparison. IRCoT remains state of the art on MuSiQue but is surpassed on some other benchmarks.
- Internet-Augmented QA performs one-step Google Search retrieval, LLM-based filtering, and answer generation with Gopher 280B.
- RECITE generates relevant passages from an LLM’s memory instead of retrieving them, then conditions the answer on that generation.
- Reader performance follows IRCoT QA > OneR QA > ZeroR QA regardless of the reader’s prompting choice.
- Published systems differ in APIs, language models, retrieval corpora, and other choices, making fair scientific comparison difficult.
- IRCoT remains state of the art on MuSiQue, while DSP exceeds it by 2.0 points on HotpotQA and newer DecomP exceeds it on 2WikiMultihopQA.
- DecomP may benefit from predictable decomposition patterns in 2WikiMultihopQA, whereas their absence in HotpotQA and MuSiQue is associated with weaker performance than IRCoT.
D Additional CoT Generation Examples
Additional examples show that retrieval changes the factual reliability of generated reasoning chains: ZeroR often begins with an error, OneR fixes some nearby facts, and IRCoT can correct errors after each step.
- ZeroR frequently makes a factual error in the first reasoning sentence, derailing the subsequent chain.
- OneR often fixes factual information closest to the question but does not always correct every error.
- IRCoT retrieves after each reasoning step, allowing it to fix errors at each step.
- The IRCoT QA > OneR QA > ZeroR QA trend holds regardless of whether the reader uses direct or CoT prompting.
F Separate Reader in IRCoT QA
IRCoT can answer directly from the CoT generated during retrieval, but the experiments generally use a separate reader because it usually performs better or comparably.
- IRCoT produces a CoT during retrieval, so the answer can be extracted from that CoT without a separate reader.
- A separate reader is significantly better for Flan-T5-XXL and is always better or close for GPT3.
- Ablating the separate reader usually hurts answer F1.
G Prompts
The prompts use chain-of-thought examples and direct-answer formats across several multi-hop QA datasets. The examples demonstrate decomposing questions into intermediate facts before producing an answer.
- Prompt construction: The paper provides manually written chain-of-thought annotations for HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC.These annotations are used in the corresponding prompt listings.
- Prompt construction: GPT3 CoT prompts place Wikipedia paragraphs above the questions, whereas GPT3 Direct prompts provide the answer directly after “A:”.Flan-T5 prompts use slightly different formatting, including task-specific question prefixes.
- Prompt examples: The prompt listings include chain-of-thought annotations for multiple datasets, including HotpotQA and 2WikiMultihopQA.The paper labels these materials as Listing 1 and Listing 2, respectively.
- Reasoning examples: The examples answer multi-hop questions by identifying intermediate entities or facts and then deriving the requested answer.Examples include linking a film to its director, comparing birth dates, and identifying a manufacturing country through Mack Rides.
- Reasoning examples: The examples cover diverse reasoning operations, including temporal comparison, membership counting, nationality comparison, and relation tracing.Illustrative answers compare dates, count band members, compare directors’ nationalities, and connect people or films through shared properties.