IRCoT: interleaving retrieval with chain-of-thought reasoning

The paper proposes IRCoT, an approach for multi-step QA that interleaves retrieval with steps (sentences) in a chain of thought.

Verified

On this page

Definition

The paper proposes 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. The paper describes its main contribution as a novel retrieval method, IRCoT, that leverages the chain-of-thought generation capabilities of language models to guide retrieval and uses retrieval in turn to improve CoT reasoning. According to the paper, in multi-step QA what to retrieve depends on what has already been derived, which in turn may depend on what was previously retrieved. The paper observes that using the question to retrieve relevant text from an external knowledge source helps LLMs, but this one-step retrieve-and-read approach is insufficient for multi-step QA.

At a glance

The paper's Figure 1 caption says IRCoT interleaves chain-of-thought (CoT) generation and knowledge retrieval steps in order to guide the retrieval by CoT and vice-versa.

Diagram: The paper's method begins by retrieving a base set of paragraphs using the question as a query. > The extend CoT step uses the question, the paragraphs collected thus far, and the CoT sentences generated thus far to generate the next CoT sentence. > The expand retrieved information step uses the last CoT sentence as a query to retrieve additional paragraphs to add to the collected set. > These steps are repeated till the CoT reports an answer or the maximum allowed number of reasoning steps is reached. > Upon termination, all collected paragraphs are returned as the retrieval outcome. > Finally, the paper uses the returned paragraphs as the context for answering the question via direct QA prompting or CoT prompting.1The paper's method begins by retrieving a baseset of paragraphs using the question as a query.2The extend CoT step uses the question, theparagraphs collected thus far, and the CoTsentences generated thus far to generate thenext CoT sentence.3The expand retrieved information step uses thelast CoT sentence as a query to retrieveadditional paragraphs to add to the collectedset.4These steps are repeated till the CoT reports an answer or the maximum allowed number ofreasoning steps is reached.5Upon termination, all collected paragraphs arereturned as the retrieval outcome.6Finally, the paper uses the returned paragraphs as the context for answering the question viadirect QA prompting or CoT prompting.

How it works

The paper states that without retrieval, a model is likely to generate an incorrect reasoning step due to hallucination. It adds that without generating the first reasoning step, the text supporting the second step can't be identified easily given the lack of lexical or even semantic overlap with the question. The paper says this interleaving allows retrieving more relevant information for later reasoning steps, compared to standard retrieval using solely the question as the query.

The paper says IRCoT can be instantiated from three ingredients: a base retriever that takes a query and returns a given number of paragraphs from a corpus or knowledge source, a language model with zero/few-shot CoT generation capabilities, and a small number of annotated questions with reasoning steps in natural language plus a set of paragraphs from the knowledge source that collectively support the reasoning chain and the answer. The paper says its contribution is mainly in the retrieve step, and that it uses standard prompting strategies for the read step. In the extend CoT step, the model also uses the question and the collected paragraphs, while for the CoT part of a test instance the paper shows it only the CoT sentences generated thus far and lets it complete the rest.

Even though the model may output multiple sentences, the paper takes only the first generated sentence for each reason-step and discards the rest. The paper's Figure 2 caption says the process terminates when the generated CoT has “answer is” or the number of steps exceeds a threshold. The paper says that for the CoT prompting reader, the final sentence of the CoT is expected to be of the form “answer is: …”, so that the answer can be extracted programmatically.

The paper says the QA reader answers the question using retrieved paragraphs taken from the retriever. The paper says the ReAct system frames the problem as generating a sequence of reasoning and action steps. The paper reports that using IRCoT with GPT3 improves retrieval by up to 21 points and downstream QA by up to 15 points on four datasets: HotpotQA, 2WikiMultihopQA, MuSiQue, and IIRC.

The paper's abstract says IRCoT reduces model hallucination, resulting in factually more accurate CoT reasoning. In its limitations section, the paper says IRCoT relies on the base LM to have a zero or few-shot CoT-generation ability. The same section adds that IRCoT also relies on the base LM to support long inputs, because multiple retrieved paragraphs need to fit in the LM's input, in addition to at least a few demonstrations of QA or CoT with paragraphs.

The paper states that the performance gain of the IRCoT retriever and QA over the OneR and ZeroR baselines comes with an additional computational cost. The paper states that IRCoT makes a separate call to an (L)LM for each sentence of CoT.

Example

The paper's example question asks in what country Lost Gravity was manufactured. The paper says the Wikipedia document retrieved using the question as the query, in particular the roller coaster Lost Gravity, does not mention where Lost Gravity was manufactured. The paper says one must first infer that Lost Gravity was manufactured by a company called Mack Rides, and then perform further retrieval, guided by the inferred company name, to obtain evidence pointing to the manufacturing country.

The paper's prompts section gives manually written chain-of-thought annotations, and the one for this question reads: The Lost Gravity (roller coaster) was manufactured by Mack Rides. Mack Rides is a German company. So the answer is: Germany. In Appendix D, the paper says IRCoT involves retrieval after each step, so it can fix errors at each step. The paper notes that a factual error in a CoT does not necessarily mean the predicted answer is incorrect, and vice versa.

From the official source
Plain text
Wikipedia Title: <Page Title>
<Paragraph Text>
...
Wikipedia Title: <Page Title>
<Paragraph Text>

Q: <Question>
A: <CoT-Sent-1> ... <CoT-Sent-n>

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.