Specialized Retrieval Subagent with Reinforcement Learning Post-Training for Spreadsheet Navigation

ramp · Finance · 2026 · source Agentic: yes · promotional bias: low · summary-only (no fetched source) · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Spreadsheet-agent retrieval and model specialization

Ramp needed to reduce retrieval inefficiency inside Ramp Sheets because the main spreadsheet agent spent a large share of tool calls navigating sheets, reading ranges, and retrying failed reads instead of solving user tasks.

Constraints:

Architecture

Ramp carved spreadsheet retrieval out of the main Ramp Sheets agent and trained Fast Ask, a narrow Qwen 3.5-35B-A3B retrieval subagent, using RL on synthetic spreadsheet workbooks. The subagent uses a small tool interface to inspect workbook metadata, read ranges, run sandboxed Python, and return exact answers, letting frontier models spend tokens on judgment rather than navigation.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  ramp_sheets_main_agent["Ramp Sheets main agent"] --> fast_ask_retrieval_subagent["Fast Ask retrieval subagent"]
  fast_ask_retrieval_subagent --> workbook_metadata_tool["Workbook metadata tool"]
  fast_ask_retrieval_subagent --> range_reader_tool["Range reader tool"]
  fast_ask_retrieval_subagent --> sandboxed_python_tool["Sandboxed Python tool"]
  synthetic_workbook_environment["Synthetic workbook environment"] --> fast_ask_retrieval_subagent
  synthetic_workbook_environment --> deterministic_reward_verifier["Deterministic reward verifier"]
  deterministic_reward_verifier --> prime_intellect_training_stack["Prime Intellect training stack"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Ramp Sheets main agent General spreadsheet agent that delegates retrieval-heavy bottlenecks. Fast Ask retrieval subagent
Fast Ask retrieval subagent Specialized Qwen-based model trained to retrieve exact spreadsheet answers with low latency. Ramp Sheets main agent, Workbook metadata tool, Range reader tool, Sandboxed Python tool
Workbook metadata tool Returns sheet names, tab colors, and approximate used ranges. Fast Ask retrieval subagent
Range reader tool Reads bounded cell ranges from the spreadsheet. Fast Ask retrieval subagent
Sandboxed Python tool Runs standard-library Python for computation within a rollout. Fast Ask retrieval subagent
Synthetic workbook environment Provides generated business workbooks, questions, and exact ground-truth answers for RL rollouts. Fast Ask retrieval subagent, Deterministic reward verifier
Deterministic reward verifier Scores final trajectories for exact correctness, efficiency, and concision. Synthetic workbook environment, Prime Intellect training stack
Prime Intellect training stack Runs GRPO-style RL training and hosted infrastructure for the specialist model. Deterministic reward verifier

Data flow

A spreadsheet question is routed to Fast Ask. The retrieval subagent inspects workbook metadata, reads bounded ranges, optionally runs sandboxed Python, and emits a parseable final answer. During training, synthetic workbooks with ground-truth answers score complete tool-use trajectories with deterministic correctness, efficiency, and concision rewards.

3 supporting quotes
“The model operates with a minimal tool interface consisting of only three tools and a 15-turn budget.”summary, stated
“Correctness dominates with a 1.0 weight, firing only when the final "ANSWER:" line parses into the expected type and exact-matches ground truth.”summary, stated
“Rather than collecting human demonstrations or real production data, Ramp generated a synthetic dataset of business workbooks with natural language questions and ground truth answers.”summary, stated

Why this architecture

Ramp specialized retrieval because the task was narrow, verifiable, latency-sensitive, and responsible for a measurable production bottleneck. Exact-answer rewards let them train a smaller subagent while preserving frontier-model capacity for judgment-heavy work.

3 supporting quotes
“This verifiability makes the task a natural fit for reinforcement learning since trajectories can be scored deterministically without requiring human labelers or LLM-as-judge approaches.”summary, stated
“The case study explicitly frames Fast Ask as an example of a pattern they expect to use more broadly: train small, verifiable subagents for narrow bottlenecks”summary, stated
“let frontier models spend their tokens on judgment instead of retrieval.”summary, stated

Models used: Qwen 3.5-35B-A3B · Claude Opus 4.6 · Claude Haiku 4.5

Scale

Alternatives considered (roads not taken)

Prompting the main general-purpose spreadsheet agent harder

Rejected because: Ramp chose a separate specialist because prompting would still leave a large, slower general-purpose model responsible for navigation.

“Rather than attempting to solve this through better prompting techniques, which would still leave a large, slower general-purpose model responsible for navigation”summary, stated

Human demonstrations or real production data for training

Rejected because: Synthetic workbooks provided exact ground truth, controlled task variation, and scalable verifiable training examples.

“Rather than collecting human demonstrations or real production data, Ramp generated a synthetic dataset of business workbooks with natural language questions and ground truth answers.”summary, stated

Large frontier models for the retrieval bottleneck

Rejected because: The trained smaller specialist outperformed Claude Opus 4.6 on exact-match accuracy while running at Haiku-class latency.

“a small specialized model trained for a specific production task can outperform much larger frontier models on that task while being substantially faster and cheaper to run.”summary, stated

Patterns

tool-use-orchestration (agent architecture)

Fast Ask learns spreadsheet retrieval through a constrained three-tool interface and bounded turn budget rather than unrestricted workbook exploration.

“The model operates with a minimal tool interface consisting of only three tools and a 15-turn budget. The get_workbook_metadata tool returns sheet names, tab colors, and approximate used ranges.”summary, stated

synthetic-data-generation (training data)

Ramp generated synthetic business workbooks with ground-truth answers to scale verifiable retrieval training without human demonstrations.

“Ramp generated a synthetic dataset of business workbooks with natural language questions and ground truth answers.”summary, stated

eval-driven-development (evaluation)

The retrieval subagent was trained and evaluated with exact-match rewards and held-out examples aligned to the production retrieval task.

“Evaluation ran every 20 steps on 128 held-out examples, with the base model evaluated alongside the trained checkpoint to track improvement.”summary, stated

latency-optimization (serving)

Ramp optimized a small specialist to preserve production latency while reducing costly, repeated spreadsheet reads by the main agent.

“retrieval is latency-sensitive; the user experience degrades substantially if the main agent spends many turns exploring the workbook rather than getting needed facts quickly.”summary, stated

fine-tuning-adaptation (model adaptation)

The Qwen base model was post-trained with RL for a narrow spreadsheet-navigation task.

“Ramp used Group Relative Policy Optimization (GRPO), a policy gradient method that estimates advantages from groups of rollouts sampled for the same prompt.”summary, stated

Tradeoffs

Train a narrow retrieval subagent.

Chose A specialized RL-trained Qwen model for Fast Ask over Leaving retrieval inside the main general-purpose agent.

Rationale: The specialist targets a measurable latency and cost bottleneck while freeing frontier models for judgment-heavy work.

“creating a specialized retrieval subagent. This architectural decision reflects sophisticated LLMOps thinking about decomposing complex agent workflows into specialized components”summary, stated

Use deterministic exact-match reward.

Chose Correctness-dominant RL reward with small efficiency and concision terms over Subjective human or LLM-as-judge trajectory scoring.

Rationale: Retrieval answers are verifiable, so deterministic rewards avoid noisy subjective labels while still shaping efficient behavior.

“Correctness dominates with a 1.0 weight, firing only when the final "ANSWER:" line parses into the expected type and exact-matches ground truth.”summary, stated
“This eliminates the need for expensive human annotation of correct tool-use sequences while still providing effective learning signal.”summary, stated

Use synthetic workbook tasks for RL.

Chose Generated business workbooks with controlled task types and exact answers over Human demonstrations or real production-data collection.

Rationale: Synthetic data allowed scale, reliability, task variation, and exact-answer control, but leaves some uncertainty about real-world generalization.

“This synthetic approach offers several LLMOps advantages: it enables scaling the task distribution while keeping it reliable”summary, stated
“The case study doesn't report performance on actual production queries from real users, which may contain distributions of difficulty, ambiguity, and edge cases not captured in the synthetic data.”summary, stated

Gotchas (what bit them)

General agents can burn tool calls on navigation instead of task progress.

Root cause: Spreadsheet retrieval caused repeated reads and inefficient exploration inside the main agent workflow.

Resolution: Split the bottleneck into a specialized retrieval subagent trained to return the relevant cells or computed values.

“about 75% of these retrieval calls were immediately followed by another read call, indicating that the agent frequently failed to retrieve the correct information on the first attempt”summary, stated
“a retrieval subagent can return only the answer-relevant cells or computed values.”summary, stated

Synthetic retrieval tasks can be too clean unless they include production-like ambiguity.

Root cause: Clean workbooks do not force models to handle distractors, unreliable shortcuts, or ambiguous identifiers.

Resolution: Ramp added difficulty levels with decoy sheets, incomplete helper summaries, hard cases, and obfuscated invoice references.

“Easy tasks usually provide a direct path to the answer, while medium and hard tasks use three strategies to increase difficulty: distractors, unreliable shortcuts, and ambiguous identifiers.”summary, stated

Tool-use RL can be slowed by rollout generation.

Root cause: Agent rollouts involve multi-turn metadata reads, range reads, Python execution, and final answers, making rollout generation slower than supervised data loading.

Resolution: Use asynchronous off-policy training so rollout workers continue generating trajectories while the trainer updates the model.

“rollout generation is much slower than ordinary supervised fine-tuning data loading because rollouts consist of multi-turn trajectories”summary, stated
“asynchronous off-policy training, which enables learning from trajectories generated by slightly older versions of the model”summary, stated

Evaluation

Ramp evaluated the base model, trained Fast Ask model, and Claude-family models on a held-out exact-match retrieval task set with wall-clock rollout time.

Metrics: Base Qwen3.5-35B-A3B accuracy: 56%. · Trained Fast Ask accuracy: 66%. · Claude Opus 4.6 accuracy: 62%. · Training took approximately 26 hours.

3 supporting quotes
“The evaluation compared the base model, trained model, and Claude family models on a held-out task set measuring exact-match accuracy and wall-clock time per rollout.”summary, stated
“The base Qwen3.5-35B-A3B model achieved 56% accuracy, while the trained Fast Ask model achieved 66% accuracy—a 10 percentage point improvement.”summary, stated
“The trained model beat Claude Opus 4.6 (62% accuracy) by 4 percentage points while running at Haiku 4.5 latency.”summary, stated

Outcomes

The summary reports a 26-hour RL run, 100 training steps, batch size 256, eight rollouts per example, and 128-example held-out evaluations every 20 steps.

“The base Qwen3.5-35B-A3B model achieved 56% accuracy, while the trained Fast Ask model achieved 66% accuracy—a 10 percentage point improvement.”summary, stated
“training also reduced average completion time rather than increasing it, suggesting the model learned more efficient navigation patterns.”summary, stated