Fast Ask: the Qwen that Ramp trained with RL to read spreadsheets

Fast Ask: the Qwen that Ramp trained with RL to read spreadsheets
17.8%of the main agent's tool calls went to exploring
14task types across three families
66.25%exact-match accuracy, against 61.88% for Opus 4.6
1.05×the time of Haiku 4.5
Fast Ask: how Ramp trained a small model with RL to read spreadsheets
I also explain it in this video, on my Articulator EN channel.

The problem: exploring is expensivelink

Ramp has a product, Ramp Sheets, with an agent that works on spreadsheets. And a spreadsheet agent is only as good as the information it retrieves: if it reads too little, it misses the answer; if it reads too much, it becomes slow, expensive and easy to distract with tabs that have nothing to do with the question.

Looking at their traces, they saw how much that exploration cost:

  • 17.8% of all tool calls made by the main agent went to opening tabs, reading ranges and discarding irrelevant sheets, before it had the data it needed to answer.
  • About 75% of those calls were immediately followed by another read. The authors say this suggests the agent often failed to find the right information on the first try. That is their interpretation, not a measurement of failures.

Their argument is that tweaking the prompt does not change the underlying loop: it would still be a large, slow, general-purpose model navigating the workbook and filtering out the noise. So they moved retrieval into a specialized subagent, Fast Ask. It receives a question like "What was the revenue from March to May?", navigates the workbook, reads the ranges it needs and returns a compact answer to the main agent.

The main agent spends 17.8% of its tool calls exploring the spreadsheet
Almost one in five of the main agent's calls went to exploring.

The model behind it is a fine-tuned Qwen3.5-35B-A3B, with roughly 3 billion active parameters.

Why a subagentlink

The authors give three reasons why retrieval deserves a specialist model:

It protects the context

If the main model reads every tab, it burns tokens on irrelevant rows and can anchor on a decoy. The subagent returns only the cells that matter, or the computed value.

Latency matters

For the user, an agent that gets the fact right away is very different from one that spends turns exploring the workbook.

It can be verified

The most important one. Many spreadsheet questions resolve to an exact value: a date, an invoice ID, an amount in cents, a yes or a no, a row.

That third reason is what opens the door to reinforcement learning: if the answer is an exact value, every attempt can be scored deterministically, with no human labels and no other model acting as a judge. The task was narrow, repeated often, sensitive to latency and objectively scorable. Those are the four conditions I take from the article for deciding when training your own model is worth it.

The training setuplink

To make the workflow trainable with RL, they framed spreadsheet interaction as an environment: many related tasks, a small tool interface and a deterministic reward function. The model does not learn from demonstrations of correct behavior; it discovers its own strategies for navigating workbooks, retrieving data and computing answers.

  • Base model: Qwen/Qwen3.5-35B-A3B.
  • Infrastructure: Prime Intellect's Lab platform, with their hosted training and the verifiers framework. The training environment mirrors the harness the model is deployed with in production.
  • Training: 100 steps, batch size 256 and 8 rollouts (attempts) per example.
  • Evaluation: every 20 steps, on 128 held-out examples, with the base model evaluated alongside the trained one.
  • No thinking mode: they disabled it so the comparison matched the low-latency production setting they care about.

If you want to see what an environment like this is made of, and how each framework handles it (including Verifiers, the one from Prime Intellect), I covered it in the post on RL environments for LLMs.

Synthetic workbooks and 14 task typeslink

Each task is a synthetic business workbook, a natural-language question and a ground-truth answer. The workbooks imitate real finance workflows: revenue rollups, invoice reconciliation, spend analysis, time-filtered lookups and aggregations that join several tables.

Synthetic data lets them generate many variations of the same problem, control the answer exactly and change the wording without changing the skill being trained. They defined 14 task types across three families:

FamilyTask types
Revenue (4)net_revenue, variance_vs_target, top_order_contribution, counterfactual_fx
Reconciliation (6)invoice_balance, customer_balance, overdue_invoices, last_payment_date, is_invoice_fully_reconciled, invoice_location
Operations (4)spend_month_total, budget_vs_actual, shared_vendor_uuid, netted_amount_2026

For each task they generated three differently phrased variants (an investor memo request, a collections follow-up, a fundraise model question), so the model does not memorize a template. Reconciliation tasks also vary in how the invoice is described, so their prompt space is larger than three per type. An example from the article:

I am tightening our investor memo. What cumulative net recognized revenue did South land across 2025-03 to 2025-05, in USD cents?

That workbook has eleven sheets: Orders, OrderLines, Shipments, Returns, OrderMonthNet, FxExposure, Contracts, FXRates, Targets, HiringPlan and CapTable. The last two have nothing to do with the question, and that is no accident.

Batches are assembled with a balanced round robin: every pass shuffles the dataset and emits all 14 types before repeating any, so they all get the same coverage. And the synthetic world is internally consistent: customers, vendors, SKUs, contract tiers and payment methods are sampled from fixed vocabularies, across thousands of generated workbooks.

The trapslink

Difficulty controls how much navigation pressure the model faces. Easy tasks usually expose a direct path to the answer. Medium and hard ones make it harder in three ways:

Decoy tabs

Sheets like HiringPlan or CapTable, with recruiters, open roles and option pools. They sound like finance, but hold nothing the question needs. A model that reads indiscriminately spends its turn budget on them.

Partial summaries

Summary sheets like RegionalPnL or SpendSummary that are missing exactly the computed columns that would give the answer. They look like a shortcut, but the model still has to verify or aggregate from the source data. At hard difficulty, they are removed.

Invoices with no name

In roughly 15-20% of reconciliation tasks, the question does not cite the invoice by its INV-#### ID, but by payment clues (source system, method, date, amount) or by a signature (customer, month, amount, due date). The reference has to be resolved before answering.

The three traps in the synthetic workbooks: decoy tabs, partial summaries and invoices with no name
The traps are there on purpose: they are the navigation failures the model will meet outside the environment.

Three tools and fifteen turnslink

The model gets three tools and a budget of 15 turns:

  • get_workbook_metadata returns sheet names, tab colors and the approximate used ranges.
  • read_ranges returns cell data, hard-capped at 1,000 cells per call. Oversized requests are rejected.
  • run_python runs sandboxed Python, standard library only. State persists across calls within the same rollout.

Keeping it this small is deliberate: with only three tools, the reward can tell an efficient trajectory from a wasteful one more easily.

The rewardlink

For each question, the model samples eight trajectories. A trajectory is the full trace: the tool calls, the reads, the Python it ran and the final answer. The verifier scores each one with a function that fits on one line:

R(y) = 1.0 · correct(y) + 0.1 · efficiency(y) + 0.05 · concise(y)

The reward mirrors what Fast Ask needs in production: return the right answer, do it quickly and avoid adding unnecessary text to the main agent's context.

  • Correctness dominates. The 1.0 term only fires if the final ANSWER: line parses into the expected type and exactly matches the ground truth.
  • Efficiency and concision are shaping terms. They cannot rescue a wrong answer, but they rank the correct ones: getting it right in five turns scores slightly higher than getting it right after wandering through irrelevant sheets.
The reward function: 1.0 for correctness, 0.1 for efficiency and 0.05 for concision
Tell me what you reward and I will tell you what your agent learns.

GRPO: advantage against the grouplink

They trained with GRPO, a policy gradient method that estimates advantages from groups of rollouts sampled for the same prompt. Instead of fitting a separate value model, it compares each rollout's reward with the others in its group. With G = 8 rollouts, the advantage of rollout i can be written like this:

A_i = R(y_i) − (1/G) · Σ_k R(y_k)

In other words, your advantage is your score minus the group average. For the same question, one rollout answers correctly in five turns and another spends its budget on decoy tabs and fails: that difference is the learning signal. Setting the off-policy correction aside, the update has this form:

∇J(θ) ≈ Σ_i Σ_t A_i · ∇ log π_θ(y_i,t | x, y_i,<t)

Every token in a trajectory is reinforced or dampened according to the advantage of the whole trajectory. This is what makes RL a natural fit for tool-using agents: nobody labels the correct next tool call, only the final outcome is scored. The math pushes probability toward whatever made the answer correct: reading the metadata first, avoiding decoy tabs, using helper summaries when they are valid, falling back to raw rows when they are not, and emitting a parseable ANSWER: line.

It is the same algorithm used to train NapMem to navigate its memory.

Asynchronous and off-policylink

In Fast Ask, a rollout is a multi-turn trajectory: inspect the metadata, read ranges, run Python and answer. Generating those rollouts is much slower than loading data in ordinary supervised fine-tuning. If training had to stop after every update and wait for perfectly fresh trajectories, the GPUs would sit idle much of the time.

Prime Intellect's prime-rl stack solves this with asynchronous off-policy training: rollout workers keep generating trajectories while the trainer updates the model. Some trajectories come from a slightly older version of the policy, and the objective corrects for that bounded staleness with importance weighting:

ρ_t(θ) = π_θ(y_t | x, y_<t) / π_gen(y_t | x, y_<t)

The ratio ρ answers a simple question: how much more or less likely is the current model to produce this token than the model that originally generated it? To keep the updates stable, Prime Intellect uses an AIPO-style clipped, importance-weighted objective:

J(θ) = Σ_i,t min( ρ_i,t(θ) · A_i ,  clip(ρ_i,t(θ), 1 − ε, 1 + ε) · A_i )

The clipping limits how much weight a token can carry when its probability has changed a lot since it was generated, so that a stale trajectory does not pull the model further than it should.

Resultslink

They evaluated the base and trained models alongside the Claude family, on held-out tasks. The metrics are exact-match accuracy and wall-clock time per rollout, relative to Haiku 4.5:

ModelExact-match accuracyTime vs Haiku 4.5
Fast Ask (trained Qwen)66.25%1.05×
Claude Opus 4.661.88%1.44×
Claude Sonnet 4.659.38%1.60×
Qwen3.5-35B-A3B base56.25%1.34×
Claude Haiku 4.551.88%1.00×
  • Ten points over the base model (from 56.25% to 66.25%), while also taking less time: from 1.34× to 1.05×.
  • A little over four points above Opus 4.6 (66.25 − 61.88 = 4.37), at a time very close to Haiku 4.5.
  • Training took about 26 hours for the 100 steps.
Exact-match accuracy and time for Fast Ask against Opus 4.6, Sonnet 4.6, the base Qwen and Haiku 4.5
More accurate than Opus at nearly Haiku's time, on this task and in their evaluation.

What the model learnedlink

According to the authors, most of the gains came from two things: the model learned to produce correctly formatted, parseable answers, and to plan tighter trajectories that waste fewer turns.

And there is one detail I find the sharpest in the article: total cells read per rollout stayed roughly flat throughout training (around 2,400 in their chart). The model did not learn to read less; it learned to allocate its reads better. In the same figure, cells per turn go up, from about 200 to about 350, while the total does not move: it reads the same amount in fewer trips. That last part is my reading of the chart; the text only talks about the total.

What doesn't add up, and what you can't concludelink

Checking the text against the article's own figures, two details do not match:

  • The reward curve. The text says reward climbed from roughly 0.2 to 0.8 over the first 40 steps and then plateaued. In the animated chart that accompanies the article, the curve starts near 0.5, dips toward 0.3 and climbs gradually to around 0.8 near step 100. They agree on where it ends, not on how it gets there.
  • The size of the evaluation. The article mentions 128 held-out examples for the intermediate evaluations. But the percentages in the final table are exact multiples of 1/160 (106, 99, 95, 90 and 83 correct out of 160), and not of 1/128. So the table seems to come from a different set, of 160 examples, which the article does not describe. That is my deduction, not something the authors state.

Neither changes the conclusion, but the numbers should be read with their limits:

  • This is not "Qwen beats Opus" in general. It is one specific retrieval task, in the authors' own evaluation, on synthetic tasks from the same environment and with thinking mode off.
  • We don't know whether it holds on real spreadsheets. The article gives no results on customer workbooks.
  • Cost is not quantified. They say it comes at "a fraction of the cost and latency" of a frontier model, without giving a cost figure.
  • The speed is "about" Haiku's: 1.05×, not 1.00×.

Summarylink

RL post-training worked here because the environment made spreadsheet retrieval measurable and repeatable: repeated decisions with clear outcomes, with no human-labeled trajectories and no LLM judge. The authors stress that the important work was not in model architecture or scale, but in environment design: the right tasks, a minimal tool interface and a reward grounded in how the product actually works in production.

And they frame it as a pattern they expect to repeat: train small, verifiable subagents for narrow bottlenecks, and let frontier models spend their tokens on judgment instead of retrieval.

In one sentence

If a task is narrow, repeated often, latency-sensitive and verifiable, a small model trained in a good environment can do it better than a large one.

Which bottleneck in your agent checks all four?

Sourceslink

Continue reading

Last posts -->

Have you seen these projects?

Gymnasia

Gymnasia Gymnasia
Expo
React Native
TypeScript
OpenAI
Anthropic

Fitness app with two agents that run entirely on the device, with no backend, so the user's data never leaves the phone. A BYOK conversational coach with local tools and a remote system prompt with offline fallback, plus a food estimator that pulls macronutrients out of a photo of the plate, with barcode scanning against OpenFoodFacts.

LangGraph Deep Researcher

LangGraph Deep Researcher LangGraph Deep Researcher
Python
LangGraph
FastAPI
React
TypeScript
Docker

Multi-agent research system built with LangGraph. A supervisor breaks your question down into topics and launches search sub-agents in parallel; each one compresses its findings before handing them to a writer agent that produces the final sourced markdown report. Live streaming over WebSockets, a configurable model per role and bring-your-own API keys that are never persisted server-side.

Tau

Tau Tau
Python
LangChain

Multi-agent tutoring system for secondary school students, with one agent per subject and course material written and validated by a team of teachers. It was used with real students at a private school in Spain and at a secondary school in Colombia.

View all projects -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to watch any talk?

Last talks -->

Do you want to improve with these tips?

Last tips -->

Use this locally

Hugging Face spaces allow us to run models with very simple demos, but what if the demo breaks? Or if the user deletes it? That's why I've created docker containers with some interesting spaces, to be able to use them locally, whatever happens. In fact, if you click on any project view button, it may take you to a space that doesn't work.

Flow edit

Flow edit Flow edit

FLUX.1-RealismLora

FLUX.1-RealismLora FLUX.1-RealismLora
View all containers -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to train your model with these datasets?

short-jokes-dataset

HuggingFace

Dataset with jokes in English

Use: Fine-tuning text generation models for humor

231K rows 2 columns 45 MB
View on HuggingFace →

opus100

HuggingFace

Dataset with translations from English to Spanish

Use: Training English-Spanish translation models

1M rows 2 columns 210 MB
View on HuggingFace →

netflix_titles

HuggingFace

Dataset with Netflix movies and series

Use: Netflix catalog analysis and recommendation systems

8.8K rows 12 columns 3.5 MB
View on HuggingFace →
View more datasets -->