TL;DR
REAPER is a lightweight, reasoning-based planner designed to handle complex, multi-step retrieval in RAG systems. By using a specialized 7B-parameter LLM to generate entire retrieval plans in a single step, it achieves a 10x reduction in latency compared to traditional agentic approaches while outperforming massive classification ensembles with significantly less training data.
What Problem Does This Paper Address?
Modern Retrieval-Augmented Generation (RAG) systems no longer rely on a single monolithic database. Instead, they must navigate a maze of heterogeneous sources, including product catalogs, review indexes, and external APIs.
For complex queries—such as "How much memory is on my Galaxy phone?"—a system must perform multi-step retrieval: first identifying the specific phone from a user's order history, then fetching the technical specifications for that specific model.
Current solutions fall into two camps, both with significant drawbacks:
- LLM Agents: These interleave reasoning and retrieval (Chain-of-Thought). While flexible, each "thought" step adds seconds of latency, making them too slow for real-time conversational assistants.
- Classifiers: These route queries to specific tools. While fast, they are rigid, struggle with multi-step logic, and require tens of thousands of examples to learn a single new tool.
Methods
REAPER (REAsoning-based PlannER) adopts a "Reasoning WithOut Observation" (ReWOO) philosophy. It uses a single, smaller LLM (Mistral-7B-Instruct-v0.2) to generate a complete execution plan—including tool selection, sequencing, and arguments—before any retrieval occurs.
To make a 7B model perform at this level, the authors developed a sophisticated data generation and fine-tuning pipeline:
- Tool Evolve (TEvo): This module generates semantically similar paraphrases of tool descriptions and instructions. This forces the model to actually "understand" what a tool does rather than just memorizing specific keywords.
- Tool-Task Generator (TTG): To teach the model the logic of planning, the authors created secondary tasks such as reordering shuffled steps, completing partial plans, or identifying missing parameters.
- Diverse Query Sampler (DQS): Using RoBERTa-based embeddings, this ensures the training set covers a wide spectrum of semantic diversity, preventing the model from overfitting to a few common query shapes.
- Balanced Fine-Tuning: The model is trained on a mix of specialized planning tasks and general instruction-following data (Generic-IFT) to prevent "catastrophic forgetting" of its reasoning capabilities.
Datasets
- In-Domain Data: A curated set of 6,000 unique queries related to conversational shopping (e.g., order history, product Q&A, shipping status).
- Baseline Data: A massive set of 150,000 queries used to train a RoBERTa-based ensemble classifier for comparison.
- General IFT Data: Open-source datasets including ShareClaude and ToolAlpaca, further augmented via an Evol-Instruct framework to increase complexity.
Key Insights and Ideas
- Planning is a specialized skill: A small model (7B) can outperform much larger models (like Claude 3 Sonnet) at retrieval planning if it is specifically fine-tuned for the structure of the task.
- Single-shot planning kills latency: By generating the entire plan at once, REAPER avoids the "stop-and-think" overhead of traditional agents. As shown in the results, REAPER's planning takes ~207ms, whereas an agentic approach takes ~2s per step.
- Data efficiency over data volume: REAPER achieved 96% accuracy using only 6,000 in-domain examples, whereas the classification baseline required 150,000 examples to reach 94% accuracy.
- The "Hallucination" hurdle: Even large models like Claude 3 Sonnet tend to hallucinate extra steps or unnecessary explanations when asked to plan. Fine-tuning on diverse, constrained tasks (via TTG) is essential to keep the planner "on the rails."
Key Results
The authors evaluated REAPER against a Mistral 7B (zero-shot) and a high-performing RoBERTa ensemble classifier.
| Metric | Mistral (No fine-tuning) | Ensemble Classifier | REAPER |
|---|---|---|---|
| Tool Selection Accuracy | 72% | 94% | 96% |
| Argument Accuracy | - | 88% | 92% |
| Training Examples Needed | N/A | ~150,000 | ~6,000 |
REAPER demonstrated remarkable scalability. When adding a brand-new retrieval source, the model achieved an F1 score of 0.92 with just 286 additional examples. It even showed the ability to use entirely new tools zero-shot, provided they were described well in the prompt.
Limitations and Future Work
- Ambiguity Handling: While REAPER is excellent at planning for clear queries, the authors note that truly ambiguous user requests still pose a challenge for single-step planners.
- Static vs. Dynamic: The current architecture assumes the plan can be fully formed upfront. For tasks where the second step strictly depends on the specific content of the first retrieval (beyond just a product ID), a hybrid approach might be necessary.
- Future Directions: The authors suggest exploring how REAPER can be further optimized for even smaller models (e.g., 1B-3B parameters) to further reduce hardware costs.
Summary updated