[Paper Review] RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Horizon Generation
RAT revises each chain-of-thought step by retrieving relevant information to iteratively refine long-horizon reasoning, improving factuality and performance across code generation, math, embodied planning, and creative writing.
We explore how iterative revising a chain of thoughts with the help of information retrieval significantly improves large language models' reasoning and generation ability in long-horizon generation tasks, while hugely mitigating hallucination. In particular, the proposed method -- *retrieval-augmented thoughts* (RAT) -- revises each thought step one by one with retrieved information relevant to the task query, the current and the past thought steps, after the initial zero-shot CoT is generated. Applying RAT to GPT-3.5, GPT-4, and CodeLLaMA-7b substantially improves their performances on various long-horizon generation tasks; on average of relatively increasing rating scores by 13.63% on code generation, 16.96% on mathematical reasoning, 19.2% on creative writing, and 42.78% on embodied task planning. The demo page can be found at https://craftjarvis.github.io/RAT
Motivation & Objective
- Motivate reducing hallucinations in long-horizon generation by integrating retrieval with iterative thought revision.
- Develop a zero-shot prompting pipeline (RAT) that revises each thought step using retrieved information.
- Evaluate RAT across diverse tasks (code generation, mathematical reasoning, embodied planning, creative writing) and multiple base LLMs.
- Analyze ablations to understand the impact of retrieval strategy and causal vs non-causal reasoning on performance.
Proposed method
- Generate initial zero-shot step-by-step thoughts from the task prompt.
- Iteratively revise each thought step using retrieved passages queried from an external knowledge base.
- Construct a query from the current and past revised thoughts to retrieve relevant information.
- Revise the current thought with retrieved information and append the next thought step, proceeding till all steps are revised.
- Use task-specific knowledge sources (e.g., code datasets, Minecraft wiki, web search) and embeddings (text-embedding-ada-002) to support retrieval.
- Operate in a causal, progressive fashion where thoughts are revised one-by-one to improve accuracy without overhauling earlier steps.

Experimental results
Research questions
- RQ1Does retrieval-augmented thinking improve factuality and reduce hallucinations in long-horizon generation?
- RQ2How does iterative, step-wise retrieval influence the quality of intermediate reasoning and final outputs?
- RQ3Are RAT gains consistent across code generation, mathematical reasoning, embodied planning, and creative writing, and across different base LLMs?
- RQ4What is the impact of causal versus non-causal retrieval-guided reasoning within RAT?
Key findings
- RAT yields substantial average improvements across tasks: 13.63% on code generation, 16.96% on mathematical reasoning, 19.2% on creative writing, and 42.78% on embodied task planning.
- RAT achieves new state-of-the-art levels on several benchmarks, outperforming vanilla CoT and standard RAG baselines.
- Ablation studies show the effectiveness of iterative retrieval and causal reasoning in enhancing performance.
- RAT demonstrates robustness across models (GPT-3.5, GPT-4, CodeLLaMA-7b) and tasks, with particularly large gains on GPT-4.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.