TL;DR
RECAST (Routing Evidence through Computation, Access, and Synthesized Tools) is a novel framework that moves beyond simple information retrieval to active evidence construction. By training a lightweight "RouterLM" to iteratively select retrieval primitives or synthesize custom Python code, the system can derive complex answers—like calculating financial margins across multiple documents—that are not explicitly stated in any single source.
What Problem Does This Paper Address?
Conventional Retrieval-Augmented Generation (RAG) operates on a "find and read" philosophy: it assumes the necessary evidence exists as a discrete chunk somewhere in a database. However, many complex tasks require derived evidence. If you ask a model to identify which three-month period had the largest increase in operating margin, the answer isn't "in" the source; it must be computed by filtering, aggregating, and performing arithmetic across multiple data points.
While "agentic" RAG variants exist, they remain largely retrieval-centric, focusing on better query reformulation rather than data transformation. RECAST addresses this gap by treating computation as a first-class citizen alongside retrieval.
Methods
The RECAST architecture (illustrated in Figure 1) functions as a sequential decision process involving three specialized LLMs:
- RouterLM (The Decision Maker): A lightweight, trained model (Qwen3.5-9B) that observes the task and a "source profile." In each round, it chooses to either call a primitive, request a code synthesis, or accept the current context.
- CompilerLM (The Coder): A frozen model that translates the RouterLM’s high-level synthesis requests into executable Python code.
- AnswerLM (The Solver): A frozen model that receives the final, refined evidence and produces the natural language answer.
The system's action space (see Figure 2) includes:
- Primitives: Lexical (BM25), Semantic (vector search), and Relational (SQL) operations.
- Synthesis: Custom Python programs for logic that primitives can't handle (e.g., sliding window calculations).
Training: The authors used a two-stage approach. First, Supervised Fine-Tuning (SFT) established valid multi-round behavior. Second, Group Relative Policy Optimization (GRPO)—a reinforcement learning technique—refined the policy by rewarding trajectories that led to correct answers while maintaining structural validity.
Datasets
The authors evaluated RECAST across a diverse set of nine benchmarks representing heterogeneous data formats (CSV, JSON, HTML, text):
- In-Domain: DataBench, FinQA, HiTab, HotpotQA, LaMP, and MultiHiertt.
- Held-Out (Zero-Shot): 2WikiMultiHopQA, TAT-QA, and WikiTableQuestions.
These datasets cover everything from multi-hop Wikipedia reasoning to complex numerical analysis of hierarchical financial tables.
Key Insights and Ideas
- Computation is Complementary: Ablation studies revealed that neither retrieval primitives nor code synthesis are sufficient on their own. Primitives are efficient for "finding," while synthesis is essential for "deriving."
- Small Models Can Out-Route Giants: A specifically trained 9B parameter RouterLM outperformed a much larger, training-free Gemini 3.5 Flash router by 5.0%. This suggests that routing logic is a specialized skill that benefits significantly from targeted RL.
- Zero-Shot Generalization: The most striking finding was that a RouterLM trained on one set of tasks generalized exceptionally well to entirely different data structures (e.g., moving from financial reports to Wikipedia tables), improving over the strongest baseline by 15.0% on held-out benchmarks.
- Efficiency through Delegation: By using a small model for the iterative "thinking" steps and only invoking larger models for code compilation and final answering, RECAST achieves high success rates with 27.9% fewer total tokens than the strongest agentic baseline.
Key Results
As shown in Table 1, RECAST sets a new state-of-the-art for context construction:
- Mean Success Rate: 75.6%, outperforming the strongest large-model baseline (Interact-RAG) by 15.9%.
- Consistency: Unlike baselines that excel at either text (HotpotQA) or tables (DataBench), RECAST maintained high performance across all heterogeneous source types.
- Robustness: The performance gains held steady even when evaluated by different "judge" models (GPT-4.1 and DeepSeek-V4), proving the results aren't an artifact of a specific evaluator.
Limitations and Future Work
The authors acknowledge that constructing the training data for RECAST is computationally expensive, as it requires generating and executing thousands of trajectories. Additionally, the iterative nature of the framework increases inference latency compared to single-pass RAG.
Future research directions include developing cost-aware routing policies that explicitly trade off between the "cost" of an operation (tokens/time) and the expected "gain" in evidence quality, as well as more efficient ways to bootstrap expert trajectories for training.
Summary updated