WorksComputer Science
Program Learning with Verifiable Rewards: Distilling Expert Traces into Programs
Abstract
Small language models struggle with tool-use tasks that require following multi-step procedures. Whether these failures reflect limited capability or missing procedural knowledge remains unclear. We introduce Program Learning with Verifiable Rewards (PLVR), which distils expert traces into reusable programs without updating model weights. Frontier models turn recurring operations in the traces into typed primitives and rules, and search assembles them using reference actions and training-task checks. A small frozen model executes the primitives, with deterministic verifiers checking their outputs. The resulting program guides a student's reasoning or checks its proposed actions. We evaluate the same program across students on -Bench Retail and Telecom and LiveMCPBench, using synthetic training tasks and unseen benchmark test tasks. On Telecom, PLVR raises an 8B model's success rate from 43.0% to 91.2%, while larger students reach up to 94.4%, compared with 57.9% for the best baseline. On Retail and LiveMCPBench, PLVR is competitive with the best baselines, although tool search remains more dependent on the student model. These results support program learning as a way to transfer expert procedures across frozen models, trading additional inference computation for more reliable tool use.
Introduction
A small model that fails a multi-step tool-use task may lack the capability for the task, or it may only lack the procedure. The procedure is which record to read first, which check to run before which fix, and when to stop. The two look alike in an end-to-end score. They differ in what fixes them. Capability is addressed by a bigger or better-trained model. Procedure can be written down.
This paper asks how much of the gap between base models in procedural tool-use domains is procedure. We build an explicit program from a teacher’s traces and run it in front of unchanged models of different sizes, down to an 8B model. If the gap is mostly procedure, the choice of model under the program should matter little. If it is mostly capability, the program should help the stronger model more and the model should still matter. The answer we find depends on the domain. On troubleshooting and multi-turn tool matching an 8B student under the program is level with larger ones, and on tool search the student still matters.
Trace-guided program construction. PLVR takes the teacher traces that supervised fine-tuning would consume and decomposes them instead. Clustering the traces’ segments proposes where recurring operations occur. A frontier model decides what each operation is and writes it as a primitive. A primitive is a call to a small frozen model scoped to one operation, with a typed input, an output schema, and a deterministic verifier that rejects ill-formed or ungrounded outputs. The primitives are composed into a program by search. The student’s weights are never updated. The program is the object that is built.

Figure 1. Trace-guided program construction. (A) Each kept training trace is cut into segments typed as reason, call, message, or question. (B) Segments are clustered within kind. Each cluster’s behaviours become primitives, each a single call to frozen Granite-4.2-8B with a typed input, an output schema, a deterministic verifier, and a fallback (§ 3.2). (C) Training scores compare state-changing calls with required actions and end-state checks (§ 3.3). (D) A* edits executable rules and primitives, prioritising on training tasks and selecting the program by synthetic validation pass rate (§ 3.4). The program shown is an English summary of the executable code.
Two forms of the program. A base model asked to reason before acting generates a plan for itself at inference time and then follows it. For troubleshooting and tool search, the program is that plan. It is constructed once, from the teacher’s traces, as a typed composition of primitives. At inference it runs to produce the chain of thought the student then acts on. The program replaces the student’s reasoning. For multi-turn tool matching the program is a guard around the student. The student proposes each action, and the program checks it against the records, the rules, and the user’s consent, repairs it, or sends it back to be proposed again. In both forms the student is the same model with the same weights. What changes is whether its reasoning is written for it or its actions are checked for it.
Finding the program. Assembling the program is a discrete search with no gradients. A frontier model first mines a library of executable rule codeblocks from the training traces. Starting from a hand-written seed, A* edits these rules and the primitives. It scores each partial program by process distance against required actions and end-state checks on training tasks. This is a reference-process objective. We report the seed’s and the final program’s accuracy on the test suites so the search’s contribution is visible.
Results. Four results, all in Table 2. First, on Telecom, Granite-4.2-8B as the student goes from 43.0% to 91.2% under the program, and Nemotron 3.5 Lightning, Nemotron 3 Nano, and Nemotron 3 Super reach 94.4%, 93.3%, and 93.3%. No other arm on any student exceeds 57.9%. Second, with Granite-4.2-8B as the student the program is 2.1 to 3.2 points below the Nemotron students on Telecom, within 2.7 points of them on Retail, and 3.2 to 12.6 points below on LiveMCPBench. On Telecom an 8B student is enough, and on tool search the student still matters. On Retail and LiveMCPBench the program is competitive with the best baseline, above it on some students and below it on others. Third, the spread in suite-averaged accuracy between the three students shrinks from 6.4 points to 2.0, with no weights changed. Per suite, it shrinks from 15.8 to 3.5 on Retail, 15.0 to 1.1 on Telecom, and 11.6 to 9.4 on LiveMCPBench. Fourth, the search contributes. On Lightning it takes the hand-written seed from 72.8%, 68.4%, and 37.9% on the three suites to 82.5%, 94.4%, and 50.5% (59.7% to 75.8% averaged).
| System | Retail | Telecom | LiveMCP | Avg |
| Vanilla (chain-of-thought prompting) | ||||
| Nemotron 3.5 Lightning | 75.4 | 47.4 | 42.1 | 55.0 |
| Nemotron 3 Nano | 64.0 | 36.8 | 45.3 | 48.7 |
| Nemotron 3 Super | 79.8 | 51.8 | 33.7 | 55.1 |
| SFT on the kept teacher traces | ||||
| Nemotron 3.5 Lightning | 72.8 | 47.4 | 44.2 | 54.8 |
| Nemotron 3 Nano | 76.3 | 50.9 | 43.2 | 56.8 |
| Nemotron 3 Super | 86.0 | 50.0 | 56.8 | 64.3 |
| Prompt optimisation (GEPA on the student’s prompt, no program) | ||||
| Nemotron 3.5 Lightning | 79.8 | 51.8 | 46.3 | 59.3 |
| Nemotron 3 Nano | 71.9 | 54.4 | 44.2 | 56.8 |
| Nemotron 3 Super | 80.7 | 57.9 | 40.0 | 59.5 |
| ReAct planner loop on Granite-4.2-8B, token-matched | ||||
| Nemotron 3.5 Lightning | 71.9 | 32.5 | 16.8 | 40.4 |
| Nemotron 3 Nano | 64.0 | 28.1 | 17.9 | 36.7 |
| Nemotron 3 Super | 69.3 | 28.1 | 23.2 | 40.2 |
| Sample-and-judge, best of 5, Granite-4.2-8B as judge, token-matched | ||||
| Nemotron 3.5 Lightning | 82.5 | 55.3 | 42.1 | 60.0 |
| Nemotron 3 Super | 83.3 | 46.5 | 58.9 | 62.9 |
| PLVR, final program (after search, ours) | ||||
| Nemotron 3.5 Lightning | 82.5 | 94.4 | 50.5 | 75.8 |
| Nemotron 3 Nano | 83.3 | 93.3 | 45.3 | 74.0 |
| Nemotron 3 Super | 79.8 | 93.3 | 54.7 | 75.9 |
| PLVR, seed program (hand-written, before search) | ||||
| Nemotron 3.5 Lightning | 72.8 | 68.4 | 37.9 | 59.7 |
| Granite-4.2-8B alone | ||||
| Vanilla | 77.2 | 43.0 | 28.4 | 49.5 |
| PLVR, Granite as the student | 82.5 | 91.2 | 42.1 | 71.9 |
Table 2. Accuracy (%) by benchmark (pass@1 per run on -Bench). Retail has 114 tasks, Telecom 114, and LiveMCPBench 95. The program’s Nemotron Telecom cells are means over three runs. All other cells, including the Granite-as-student row, are one run. Bold on amber marks the best arm per student and column. Averages are arithmetic means of the displayed cells. The SFT row is the one fine-tune per model of § 4.3, trained on the kept teacher traces (Appendix § 13). GEPA rows optimise the student’s own prompt with no program (Appendix § 18). ReAct and sample-and-judge rows spend the program’s token budget on Granite-4.2-8B without the program (Appendices § 16 and § 17). PLVR rows (green) run the final program of § 3.4.
Scope. The method needs intermediate outputs that admit checking. Tasks whose quality is a matter of judgement rather than satisfaction, such as summarisation and open generation, are outside its scope, and we make no claim about them. Extraction was run on one teacher and three kinds of tool-use task, and we do not claim the primitives transfer to other domains.
Contributions.
An estimate of how much of the gap is procedure. One program, the same for every base model, run in front of three Nemotron students and of Granite-4.2-8B on three suites. With the 8B model as the student the program reaches 91.2% on Telecom and 82.5% on Retail, within 3 points of the Nemotron students. On LiveMCPBench the Nemotron students are 3 to 13 points ahead of it (§ 5).
Trace-guided program construction (PLVR). A frontier model authors 37 primitives from clusters of teacher-trace segments. Each is a typed call to a small frozen model carrying a deterministic verifier, so that every primitive is checked as it runs. A rule library is mined from the same traces, and assembles the program under a reference-process objective using required actions and training-task end-state checks (§ 3, Appendices § 14 and § 15). The search itself is plain and is not claimed as a contribution.
Related Work
Distillation and post-training. Knowledge distillation transfers a teacher’s behaviour into a student’s parameters, classically through soft targets and in the LLM setting through supervised fine-tuning on the teacher’s outputs or reasoning traces ([18]). RLHF fits reward models to human preferences ([8, 18]). RLVR instead rewards programmatic checks such as test execution or answer matching ([11]). PLVR consumes the same traces as trace-based SFT, but it puts the result into a program over frozen components rather than into weights, and the student’s parameters are not changed. Its objective is a process distance against required actions and training-task end-state checks.
Reasoning as programs. Program-of-thought and PAL-style methods have a model emit executable code in place of free-text reasoning ([10, 6]), and later work distils such programs into smaller models ([27]). These write the program to a fixed template per example. PLVR writes one program per task family, from operations mined out of the teacher’s traces. It runs the program either to produce the reasoning the student then follows or, in its guard form, to check and repair the actions the student proposes. The second form is closer to runtime guardrails and output verifiers than to program-of-thought. Tool-calling benchmark scores can also be affected by evaluator errors and run-to-run variability ([5]).
Process supervision and compound-system optimisation. Process supervision scores intermediate steps ([21, 16, 22, 23, 13]). ProTeGi, TextGrad, Trace, and GEPA optimise language-model systems through textual or trace feedback without derivatives through the model calls ([20, 25, 7, 1]). DSPy, ADAS, AFlow, and AgentFlow compile or search declarative pipelines and workflows ([14, 12, 26, 15]). Neurosymbolic approaches couple language models with symbolic structure and executable checks ([19, 9, 2, 4]). PLVR differs from these in where its components come from. The primitives are authored from clusters of a teacher’s traces rather than declared in advance, and the process signal combines reference actions with training-task end-state checks. The search itself is plain over a mined rule library and is not claimed as a contribution.
Methodology
A PLVR program is a composition of typed primitives arranged by a small set of operators. We describe the training data and teacher traces (§ 3.1), the primitive library (§ 3.2), the reference process and distance (§ 3.3), and the search (§ 3.4). The primitives and the clusters each is drawn from are in Appendix § 14. The seed and final programs are summarised in Appendix § 11.
Training data and teacher traces
The three evaluation suites differ in the shape of their tasks, so we built a synthetic training set of 553 tasks in three subsets, one per kind of task (Table 1). The retail subset is 142 tasks in the retail format, multi-turn tool matching against a policy. The telecom subset is 178 tasks in the telecom format, mostly troubleshooting. The tool-search subset is 233 tasks in the LiveMCPBench format, tool search over a large registry. The synthetic data are split 80/20 into training and held-aside validation tasks.
| Subset | Format | Tasks | Kept traces |
| Retail | retail format, multi-turn tool matching | 142 | 128 |
| Telecom | telecom format, troubleshooting | 178 | 178 |
| Tool-search | LiveMCPBench format, tool search | 233 | 233 |
| Total | 553 | 539 |
Table 1. The synthetic dataset and retained teacher traces, pooled across training and validation. Only the training split is used for fitting and program construction.
Generation. Claude 5 Opus generated the tasks. For retail and telecom it used -Bench’s own tools, environment, and policies and wrote new questions against them. For tool-search it used LiveMCPBench’s registry format and wrote new questions against that.
Overlap guard. No benchmark task, and nothing that could stand in for one, appears in the training set.
No benchmark instances. Every benchmark task is excluded by id, including held-out ones. On LiveMCPBench the benchmark’s tasks were never read at all.
No shared underlying data. A training task may not reuse what a benchmark task is built on. For telecom this is the same issue type and fault set. For retail it is the same customer or order.
No near-duplicates. Training task text is checked mechanically against benchmark text, and close matches are rewritten or dropped.
Held-aside tasks stay out of fitting. The synthetic validation split is fixed up front and used for selection only, not primitive extraction, rule mining, program-search scoring, or SFT fitting.
No uninformative tasks. Tasks that always pass or cannot be solved are removed.
Kimi-K3 is run on every task with the task’s tools and a system prompt that asks it to work through the task, record its steps, and finish with the tool calls. The prompt names no operation and no primitive. We keep the reasoning the provider returns separately from the reply. Traces that do not reach the task’s ground truth are discarded. Retail and telecom traces must re-score 1.0 under the evaluator, and tool-search traces must pass both an LLM judge and the task’s deterministic label. Every telecom and tool-search trace is kept. On retail, 128 of 142 are kept (90.1%). The 539 kept traces are the only demonstrations in this paper. Only retained traces in the training split enter primitive extraction, rule mining, program-search scoring, and baseline fitting. The synthetic validation split is used for checkpoint and program selection. Official benchmark scores are not used for selection or revisions. Two frontier models take part in building the program and see no benchmark data. Claude 5 Opus writes the primitives from the clustered traces (§ 3.2), and Claude Sonnet 4.5 mines the rule library the program search draws on (§ 3.4).
Primitive library
The primitives are trace-grounded and model-authored. The kept training traces are processed by segmenting each trace, typing each segment as a reason, a call, a message, or a question, embedding, and clustering with -means within each kind. This gives 3,141 segments in 35 clusters. These are 15 reason, 8 call, 9 message, and 3 question clusters (segmentation rule and embedding model in Appendix § 14.§ 1). Clustering locates where an operation lives in the traces. It does not by itself separate which decision a segment witnesses, since one segment can show several. A call segment shows the function chosen and the parameters filled. Clustering therefore proposes where operations occur. A frontier model, Claude 5 Opus, post-processes the clusters, decides what the operations are, and writes each primitive. It writes the input-output signature, the prompt, the verifier, and the fallback. The result is 37 primitives in six groups. These are understanding the message (7), finding the tools (5), building the call (8), checking the policy (7), troubleshooting conditions (6), and finishing (4). Each primitive is anchored to the clusters its segments come from. A primitive draws on 1 to 14 clusters and on 1 to 195 segments, and a cluster carries 1 to 14 primitives. Fifteen of the 37 are used in more than one subset. The rest are specific to one kind of task. The full mapping between primitives and clusters is in Appendix § 14 (Table 12 to Table 17 by group, and Table 18 by cluster).
| Primitive | Used in | Seg. | Clusters (segments each) |
| Split into requests | T, M | 12 | reason9 (7), message0 (3), call5 (2) |
| Classify one request | T, M | 9 | reason8 (4), reason2 (2), message0 (2), reason12 (1) |
| Order requests | T, M | 30 | reason17 (10), reason9 (8), reason11 (5), message4 (4), reason15 (3) |
| Route a reply | T | 1 | call13 (1) |
| Device reply | T | 195 | message8 (68), reason16 (26), message2 (25), message4 (24), reason2 (21), call2 (8), question2 (5), question5 (5), call11 (4), call13 (3), message9 (2), reason9 (2), reason14 (1), call9 (1) |
| Check a claim | T | 2 | reason10 (2) |
| Parts | M | 25 | call7 (23), call5 (2) |
Table 12. Primitives for understanding the message.
| Primitive | Used in | Seg. | Clusters (segments each) |
| Is the request achieved | M | 3 | reason17 (1), reason4 (1), message7 (1) |
| Audit | M | 171 | message1 (118), message5 (31), message3 (20), message0 (2) |
| Can the question be answered | T, M | 2 | reason5 (1), reason9 (1) |
| Write the reply | T, M | 9 | message0 (7), call5 (2) |
Table 17. Primitives for finishing.
| Cluster | Kind | Size | Domains | # | Primitives |
| reason9 | reason | 24 | telecom | 14 | Alternatives when blocked, Can the question be answered, Device reply, Does the condition hold now, Is the condition met, Is the rule a condition, Is the rule about this action, Order requests, Plan steps, Price terms, Requests covered by the same call, Split into requests, User’s own premise or condition, Where a value comes from |
| message0 | message | 236 | tool-search, retail, telecom | 12 | Audit, Classify one request, Does the condition hold now, Is the condition true by the quote alone, Is the rule about this action, Order requests, Plan steps, Reply to a confirmation, Requests covered by the same call, Split into requests, Where a value comes from, Write the reply |
| reason17 | reason | 41 | retail | 12 | Does the condition hold now, Is the condition met, Is the condition true by the quote alone, Is the problem fixed, Is the request achieved, Is the rule about this action, Order requests, Plan steps, Reply to a confirmation, Requests covered by the same call, User’s own premise or condition, Where a value comes from |
| reason5 | reason | 117 | tool-search, telecom | 11 | Alternatives when blocked, Can the question be answered, Functions a policy section governs, Is the condition true by the quote alone, Is the rule about this action, Is the setting already as wanted, Plan steps, Price terms, Question for a missing parameter, User’s own premise or condition, Widen tools |
| call5 | call | 128 | tool-search | 9 | Device action arguments, Fill the parameters, Parts, Pick the function, Search phrases, Servers for the task, Split into requests, Widen tools, Write the reply |
| reason11 | reason | 102 | telecom | 8 | Fill the parameters, Functions a policy section governs, Is the rule about this action, Order requests, Plan steps, Question for a missing parameter, Requests covered by the same call, User’s own premise or condition |
| reason2 | reason | 89 | telecom | 5 | Classify one request, Device reply, How to get a missing parameter, Question for a missing parameter, Where a value comes from |
| reason4 | reason | 88 | tool-search, telecom | 5 | Does the condition hold now, Functions a policy section governs, Is the problem fixed, Is the request achieved, Is the setting already as wanted |
| reason8 | reason | 70 | tool-search, retail | 5 | Classify one request, Is the condition met, Plan steps, User’s own premise or condition, Where a value comes from |
| call11 | call | 204 | tool-search | 4 | Fill the parameters, Pick the function, Search phrases, Servers for the task |
| call10 | call | 179 | tool-search | 4 | Fill the parameters, Pick the function, Servers for the task, Which arguments failed |
| reason14 | reason | 23 | tool-search, telecom | 4 | Device reply, Does one reading show the condition, Does the condition hold now, Is the rule a condition |
| reason15 | reason | 38 | retail | 4 | Does the condition hold now, Order requests, Requests covered by the same call, Where a value comes from |
| reason3 | reason | 36 | retail | 4 | Is the condition met, Is the condition true by the quote alone, Question for a missing parameter, Where a value comes from |
| call9 | call | 51 | telecom | 3 | Device reply, Fill the parameters, Where a value comes from |
| message1 | message | 125 | tool-search | 3 | Audit, Fill the parameters, Is the problem fixed |
| message2 | message | 175 | telecom | 3 | Device reply, Is the problem fixed, Is the setting already as wanted |
| message4 | message | 81 | telecom | 3 | Device reply, Is the condition true by the quote alone, Where a value comes from |
| message7 | message | 95 | retail | 3 | Is the request achieved, Price terms, Where a value comes from |
| message9 | message | 197 | tool-search, telecom | 3 | Device reply, Is the problem fixed, Price terms |
| reason16 | reason | 99 | telecom | 3 | Copy the rule’s condition, Device reply, Is the rule a condition |
| call13 | call | 38 | telecom | 2 | Device reply, Route a reply |
| message3 | message | 25 | tool-search | 2 | Audit, Is the problem fixed |
| message5 | message | 34 | tool-search | 2 | Audit, Price terms |
Table 18. Clusters, and the primitives each carries.
What a primitive is. Each primitive is one call to Granite-4.2-8B, frozen, under its own prompt. It has named inputs plus a shared context (the facts gathered so far, the latest user message, the agent’s previous message, and where relevant the policy), a JSON output schema, a deterministic verifier, and a fallback returned when the verifier rejects. No prompt is tuned against a benchmark or an end-task reward. The verifier makes each primitive checkable. An output that violates its schema, quotes text not verbatim in its source, cites a fact that does not exist, or gives an expression that does not evaluate is rejected, and the fallback is used.
What is automatic and what is not. Segmentation, typing, embedding, and clustering involve no language model and no hand-picked segments. The clusters, and which segments belong to them, are decided by the clustering alone. The frontier model decides which operations the clusters show and drafts each primitive’s signature, prompt, verifier, and fallback from the clusters’ members. The authors supply the seed programs and training setup; they do not edit the generated primitives, verifiers, rules, or final code. The claim is not that the primitives were recovered automatically. It is that each one is anchored to segments of the teacher’s traces, and that the whole library was authored from the kept training traces at negligible compute.
Reference process and distance
Each kept training trace gives, by code alone, the expert actions for its task. These are the sequence of state-changing actions the teacher took (a device action by the user, or a write or tool call by the agent), each with its arguments. Reads are left out. The task’s reference process contains the required actions (tool, caller, and arguments) and end-state checks. A program is scored by running it on a training task and comparing the conversation’s state-changing calls with that reference process. The action-distance component counts 1.0 for each expert action that is missing or has wrong arguments, 0.5 for each action out of order, 0.5 for each extra state-changing action, and 1.0 for an abnormal ending, divided by the number of expert actions. The process distance also incorporates the task’s end-state checks. Lower is better, and a program’s score is the mean process distance over a fixed batch of training tasks, averaged over two runs per candidate. This is the reference-process objective the search minimises. No model judges a conversation. These training-time reference actions and end-state checks are not available to the program at inference.
Program search
A program composes executable rule codeblocks with its primitives. The rules come from a library that Claude Sonnet 4.5 mines from the kept training traces once, before the search. There are 61 rules from the tool-search traces and 64 from the telecom traces. Appendix § 15 gives one-line English summaries of their behaviours, rather than the executable code (Table 19 and Table 20). The combined library of 125 rules is the candidate set for every block. The retail block has no library of its own and draws on the rules mined from the telecom and tool-search traces.
| Id | Rule | What the expert does |
| M01 | Read before use | Reads a source before doing anything with its contents |
| M02 | Complete answer | The final answer includes everything the task asked for |
| M03 | Stop after answering | Takes no further action after the final answer |
| M04 | Inputs before calculating | Retrieves all input values, then computes locally |
| M05 | No tools for simple logic | Never searches for a tool to do arithmetic, parsing or filtering |
| M06 | Gather before writing | Finishes all data gathering before writing an output |
| M07 | Report the output | The answer names where the output went and summarises it |
| M08 | Only needed fields | Takes only the fields needed from a structured result |
| M09 | All sources first | Retrieves from every source before composing the answer |
| M10 | Direct lookup | Retrieves a named entity directly, without searching first |
| M11 | One fetch per entity | Answers several questions about an entity from one result |
| M12 | One call per entity | Uses a separate call for each entity of the same type |
| M13 | Superlatives by comparison | Retrieves all values, then compares to find the top one |
| M14 | Alternative after error | Tries a different approach, not the same call again |
| M15 | Carry identifiers forward | Uses an identifier from one result in the next call |
| M16 | Build in order | Creates the container, then its structure, then its content |
| M17 | Preserve existing content | Reads what exists, then writes old and new content together |
| M18 | Filter locally | Reads the whole dataset and filters it itself |
| M19 | Count locally | Reads the data and counts it itself |
| M20 | Exact text | Uses text the task specifies word for word |
| M21 | Exact output location | Uses the output location exactly as given |
| M22 | Aggregate after reading | Reads all data, computes, then writes results |
| M23 | Dependent values in order | Gets each input a calculation depends on, in order, then calculates |
| M24 | Inputs with the result | States the inputs, the result and the factor used |
| M25 | Resolve both ends before relating | Resolves both entities before asking for the relation between them |
| M26 | Entity before attribute | Resolves an entity before querying an attribute of it |
| M27 | Context before a dependent value | Gets the context a value depends on, then asks for the value |
| M28 | Read each part | Reads each part of a source separately, then combines |
| M29 | Locate before updating | Finds the items to change, then writes each one |
| M30 | Report the count changed | States how many items were updated |
| M31 | Include the artefact reference | Puts the produced artefact’s reference in the answer |
| M32 | Shape data for the consumer | Transforms earlier results into the format the next tool needs |
| M33 | Search then details | Searches, then fetches details by the result’s identifier |
| M34 | Check state before changes | Checks current state or history before making changes |
| Id | Rule | What the expert does |
| M35 | Ordered change sequence | Checks, stages, then commits a change with the given description |
| M36 | Create then switch | Creates a new context, then switches to it as a separate step |
| M37 | Exact names | Resolves names exactly as given |
| M38 | Required format | Uses the value format the tool requires |
| M39 | Range query | Uses one range query in place of a call per item |
| M40 | Specialised lookup | Uses the dedicated lookup tool for an identifier system |
| M41 | Right reader for the format | Uses the reader made for the source’s format, not a generic one |
| M42 | Fix after validation error | Retries with parameters corrected from the error |
| M43 | Nearest valid input | Tries the nearest valid input when the given one has no data |
| M44 | Different tool after empty result | Moves to a more direct query or a known identifier |
| M45 | Read before editing | Reads a source before making a precise edit |
| M46 | Count before changing | Counts occurrences, then makes the modification |
| M47 | Read all before comparing | Reads every source before a comparison or join |
| M48 | Filter before random pick | Filters first, then passes only that subset on |
| M49 | Computed values are own work | Computed figures come from its own calculation on retrieved data |
| M50 | Units in answer | States units with quantities |
| M51 | Show the calculation | Gives the formula or breakdown for computed results |
| M52 | Format for the target | Formats structured data for the target’s type |
| M53 | Current time from a service | Retrieves the date or time, and does not assume it |
| M54 | One call per target | Converts separately for each target |
| M55 | All calls then one answer | Makes every needed call, then gives a combined answer |
| M56 | One request if the split fails | Treats the whole task as one request when the split gives nothing usable |
| M57 | Search in the tool’s form | Uses the form the search tool requires and never repeats a search unchanged |
| M58 | Call values from the task or results | Values in a call come from the task or a tool result |
| M59 | Empty is not success | Treats an empty result, or one that fails for every item, as not a success |
| M60 | Drop a dead source | Does not use again a source that fails to connect or lacks the tool |
| M61 | Budget in calls | Counts the planner budget in calls per action, not seconds |
Table 19. The tool-search rule library (61 rules).
| Rule | What the expert does |
| Identify first | Looks up the user before anything else |
| Target details first | Reads the target record’s details before target-specific work |
| Confirm the fix at the end | Runs the task’s success check to confirm the fix |
| Grant each permission | Grants each required permission separately |
| Clear the blocking state first | Clears a state that blocks everything else before other troubleshooting |
| Check detailed status | Reads detailed state on connectivity problems |
| Overview early | Checks a quick overview early |
| Restart after a settings reset | Always follows a settings reset with a restart |
| Enable on the account first | Enables a feature on the account before the user toggles it on the device |
| Check app permissions | Verifies the relevant app’s permissions |
| Fix the mode setting | Sets a restrictive mode to the preferred one |
| Verify after changes | Runs a check to verify service after changes |
| Check configuration | Verifies the configuration values |
| Reset bad configuration | Resets and restarts when a configuration value is wrong |
| Verify usage before adding | Checks usage before adding an allowance |
| Enable the disabled service | Turns a service on when it is disabled |
| Reseat a missing component | Asks the user to reseat a component that is not detected |
| Find the right record | Reads all records to match the user’s identifier |
| Toggle on the device after the account | Toggles the feature on the device after enabling it on the account |
| Interfering feature off | Turns off an interfering feature during troubleshooting |
| Check component status | Verifies the component is active on service issues |
| Read plan details | When limits or prices matter |
| Check the problem early | Confirms the reported problem before attempting fixes |
| Check for interference | Looks for interfering features during troubleshooting |
| Restart after resuming | Asks for a restart right after resuming service |
| Disconnect a slow intermediary | When an intermediary is connected and slow |
| Limiter off | Turns a limiter off when it is on |
| Maximum allowed amount | Adds the maximum amount allowed |
| Bills before resuming | Checks for overdue bills on a suspended account |
| Diagnose before changing | Runs user-side checks before account changes |
| Rule | What the expert does |
| Mode setting early | Checks the mode setting early in troubleshooting |
| Read before changing a record | Never changes settings without reading them first |
| Customer acts on their device | Never calls user-side tools directly |
| Verify payment | Confirms the bill shows as paid before proceeding |
| Payment request first | Sends it before asking the user to pay |
| Both permissions | Grants every missing permission if any is missing |
| Toggle if still off | When the device shows the feature off after enabling it |
| Locked component to a human | Transfers at once when a component needs an unlock code |
| Restart after setting changes | After configuration or mode changes |
| Underlying service first | Fixes the underlying service first when both are reported |
| Reseat after restart fails | On no-signal problems |
| Check installed apps | When the app’s name is uncertain |
| Blocking state before toggles | Never toggles services while a blocking state is on |
| Ended contract to a human | Transfers without trying to resume service |
| Cycle the blocking state | Toggles it on then off before restarting, on no signal |
| One step at a time | Executes a procedure written as a list of steps one step at a time |
| Argument names the target | An identifying argument names the target, not the change to make |
| Refusal cites the rule | A refusal cites a value the rule’s text mentions |
| Quantities from records | Every quantity is user-stated or computed from records |
| Target in the named state | When the request names a state, the target chosen is in that state |
| Escalate after a failed attempt | Escalates only after the action was attempted and refused or failed |
| Dates computed in code | Computes time conditions in code against the date the rules give |
| Fill from the record | Takes a value the user did not give from the record and confirms it |
| User’s fallback | Applies the user’s stated fallback when the request cannot be met |
| Permitted equivalent | Uses an equivalent action a rule permits when the rule blocks the requested one |
| Refuse only on a rule | Refuses only when the rule check produced the refusal |
| Explicit agreement | Agreement is explicit, covers one state change, and is not inferred from a choice among options or a qualified yes |
| Confirm once | Does not confirm an agreed state change a second time |
| Agreed change first | Carries out an agreed state change before anything else |
| Irreversible last | Does irreversible actions last, after telling the user they are final |
| Correction everywhere | Applies a correction everywhere the corrected value appears |
| Drop a no-op | Drops an action that would change nothing |
| Checks stay internal | Does not surface internal checks to the user as questions |
| No early escalation | Does not escalate while the user is still willing to continue |
Table 20. The telecom rule library (64 rules).
starts from the seed. Successor edits insert, remove, or move a primitive or rule, or change its flags. Only edits that type-check are allowed. Partial programs are scored by the distance of § 3.3 plus a small cost per rule,
where is the number of rules switched on and is the mean process distance of § 3.3, so of two programs at the same distance the smaller wins. Each round evaluates up to unexplored candidates with the lowest . Search stops after three rounds without improvement in the best or pass rate, or on reaching the program-evaluation budget. The final program has the highest pass rate on the held-aside synthetic validation split among the candidates reached. Search uses Nemotron 3.5 Lightning as the student, with Granite-4.2-8B running the primitives; the selected program is then held fixed for every student.
The run. The search scored 32 programs for the telecom block, 87 for the retail block, and 9 for the tool-search block (the seed, six group edits, their merge, and the final program). Settings and the Granite scoring cost of each block are in Appendix § 10 (Table 4 and Table 5).
| Item | Value |
| state | executable rule codeblocks composed with primitives, starting from the seed |
| rule library | 125 codeblocks mined once by Claude Sonnet 4.5 from training traces. 61 from tool-search, 64 from telecom (English summaries in Appendix § 15). The same library for every block, retail included |
| successor | insert, remove, or move a primitive or rule, or change its flags; only edits that type-check are allowed |
| evaluation | fixed training-task batch; two runs per candidate averaged; up to lowest- unexplored candidates per round |
| stopping | three rounds without improvement in the best or pass rate, or the program-evaluation budget |
| final pick | highest pass rate on the held-aside synthetic validation split among candidates reached |
| search models | Nemotron 3.5 Lightning as student, Granite-4.2-8B for primitives; selected program fixed across students |
| Granite scoring cost | telecom 257,557 calls, 1,159M tokens. Retail 96,814 calls, 605M tokens. Tool-search 29,412 calls, 104M tokens |
| mining cost | tool-search 6 calls, 47,047 prompt and 17,685 completion tokens. Telecom 10 calls, 239,600 and 29,500 |
| objective | . counts rules switched on; is mean process distance against required actions and end-state checks (§ 3.3) |
Table 4. Settings of the A* program search.
| Block | Programs scored |
| Telecom | 32 |
| Retail | 87 |
| Tool-search | 9 (seed, six group edits, their merge, final) |
Table 5. Programs scored by the search, per block.
Seed and final program. The seed is three hand-written blocks, one per subset of the training set, joined into one program. The telecom block walks the policy’s checklist in order, reads the system state before each fix rule, does not repeat a fix already in place, and re-runs the check until it passes. The tool-search block retrieves candidate tools for each request, picks one, fills its parameters, calls it, and checks whether the request is achieved. At inference these checks read only the observable conversation and tool results, never hidden task state, benchmark grader feedback or assertions, or gold actions. The retail block takes the base model’s proposed action each turn and checks it before it goes out. Unknown tools and malformed ids are rejected. A change must take every value from a record that was read or from the customer’s words. The customer must be identified and own the record, and the policy rule must hold. A change goes out only after the customer’s yes and is never made twice, and a claimed “done” without the call is retried. The search added rules to all three blocks. Both programs are summarised in Appendix § 11, and Table 6 gives the seed and final scores. On Lightning, the seed scores 72.8% on Retail, 68.4% on Telecom, and 37.9% on LiveMCPBench. The final program scores 82.5%, 94.4%, and 50.5%.
| Suite | Seed | Final |
| Retail | 72.8 | 82.5 |
| Telecom | 68.4 | 94.4 |
| LiveMCPBench | 37.9 | 50.5 |
Table 6. Seed and final program on Nemotron 3.5 Lightning. Accuracy (%) on the official test sets.
Experiments
Benchmarks
We train on the set of § 3.1 and evaluate on the official -Bench Retail and Telecom test sets ([3]) and on LiveMCPBench ([17]). -Bench is multi-turn dialogue against a stated policy, evaluated by the benchmark’s task evaluator with a simulated user. A small tool set makes correctness turn on ordering and admissibility. LiveMCPBench is tool selection and invocation over a large MCP registry. Correctness turns on choosing the right tool from many and binding arguments that resolve. Each suite has a training subset in its format (§ 3.1). Retail has 114 test tasks, Telecom 114, and LiveMCPBench 95.
Models
The primitives run on Granite-4.2-8B, frozen, each under its own prompt. The students are Nemotron 3.5 Lightning, Nemotron 3 Nano, and Nemotron 3 Super (checkpoints in Table 9). Each receives every treatment. The treatments are vanilla, fine-tuning on the traces, GEPA, the two token-matched baselines, and the program.
| Student | Checkpoint |
| Nemotron 3 Nano | nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 |
| Nemotron 3.5 Lightning | nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 |
| Nemotron 3 Super | nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16 |
Table 9. Student checkpoints.
Baselines
All trace-based arms use the same retained training traces and synthetic training split. Held-aside synthetic validation data are used for selection only. No arm uses any other demonstrations.
Fine-tuning on the traces (SFT). The student is fine-tuned on the traces in two variants. The process arm trains on the teacher’s reasoning followed by its final calls, so the student learns to reproduce the procedure before answering. The outcome arm trains on input to final calls only, with the reasoning removed. Learning rate, LoRA rank, and epoch are swept per model and variant and selected by solved count on the held-aside traces of each subset. One fine-tune per model is evaluated on the benchmarks and is the fine-tuning comparator in Table 2. Construction, sweep, and the selected configurations are in Appendix § 13 (Table 10 and Table 11).
| Setting | Value |
| method | LoRA |
| loss | cross-entropy on assistant tokens only |
| optimiser | Adam |
| schedule | linear decay to zero, |
| batch | 8 |
| max length | 16,384 tokens |
| seed | 0 |
| validation sampling | temperature 0, 8,192 max tokens |
| swept | , rank , 6 epochs (a few 1 or 8), checkpointed every epoch, epoch selected post hoc |
| runs | 72, 24 per student (8 configurations per cell) |
Table 10. Fine-tuning settings and sweep.
| Cell | Student | lr | rank | epoch |
| process | Nano | 32 | 6 | |
| outcome | Nano | 8 | 1 | |
| process+outcome | Nano | 32 | 2 | |
| process | Lightning | 8 | 2 | |
| outcome | Lightning | 32 | 6 | |
| process+outcome | Lightning | 8 | 3 | |
| process | Super | 8 | 3 | |
| outcome | Super | 32 | 1 | |
| process+outcome | Super | 32 | 1 |
Table 11. Selected fine-tuning configuration per cell and student.
Prompt optimisation (GEPA). The student’s own system prompt is optimised with GEPA (Agrawal et al. [1]) on the training set, and the student is then run as a native tool-calling agent with no program. This tests whether optimising the student’s prompt alone reaches what the program reaches. Construction, budget, and the per-student outcome are in Appendix § 18 (Table 23 and Table 24).
| Setting | Value |
| data | the training and held-aside splits of § 3.1, the same as the SFT arm |
| budget | 10 iterations, minibatch 16, 8 workers |
| reflection model | openai/gpt-4.1 |
| reward | outcome only. Exact call-set match, no process reward |
| parent selection | Pareto front over per-instance scores, max(pareto(pool), key = mean) |
| accept rule | child’s minibatch mean exceeds parent’s. Accepted children join the pool |
| selection | best score on the held-aside split |
Table 23. GEPA settings.
| Student | Best train | Best val |
| Nemotron 3 Super | 0.838 | 0.950 |
| Nemotron 3 Nano | 0.818 | 0.906 |
| Nemotron 3.5 Lightning | 0.800 | 0.805 |
Table 24. GEPA outcome per student. Scores are the fraction of instances with an exact call-set match on the training and held-aside splits.
Vanilla. The student with chain-of-thought prompting and no other treatment. The program replaces this chain of thought, or checks the actions it leads to.
Token-matched baselines. Two arms spend the same tokens per task as the final program, with Granite-4.2-8B doing the extra work, so that the program is compared against other uses of the same budget on the same small model. ReAct runs a plan, act, and reflect loop in the style of ReAct (Yao et al. [24]). Each turn, Granite-4.2-8B plans, the student acts from that plan placed where its own reasoning would go, and Granite critics review the action, with up to two revisions. The loop runs under the program’s Granite token budget (Appendix § 16, Table 21 and Table 22). Sample-and-judge samples five candidate responses and has Granite-4.2-8B, as a judge, select one, so that the total tokens match the program’s. The judge prompt is in Appendix § 17.
| Step | What happens |
| Plan | Granite-4.2-8B reads the instructions, the tools, and the conversation and returns the situation, the applicable rules, and the next step. |
| Act | The student continues from that plan, placed where its own reasoning would go, and emits one action. |
| Reflect | One Granite critic per aspect reviews the action. On a revise verdict the student retries with the critique. After the last revision round, the last action is returned. |
Table 21. The three steps of the ReAct planner loop.
| Setting | Value |
| Granite input-token budget per task | 450,000 (estimated as characters/4.2 + 60 per call) |
| critics | policy, grounding |
| maximum revision rounds | 2 |
| critic share of the budget | 0.5 |
| planning | on |
| tool-description cap | 500 characters |
| planner calls per customer turn | 60 |
| student max_tokens | 3,000 |
Table 22. Settings of the ReAct planner loop.
Protocol
The program is built once from the training set (§ 3.4) and held fixed. The program is evaluated three times on Telecom and once on every other suite. Granite as the student and every other arm are reported as single runs per cell. Reported scores are means over those runs. Token counts per task are recorded for every arm, with the student’s and Granite’s tokens separated (Appendix § 12).
Results
Table 2 reports every arm on -Bench Retail and Telecom and LiveMCPBench, per suite, and Figure 2 plots the same cells. The program rows run the same program, the same primitives on the same frozen Granite-4.2-8B, in front of each student, with no weights changed anywhere. Every cell except the Nemotron program’s Telecom cells is a single run, so differences of a few points between arms are not resolved. We describe them as competitive rather than ranking them.

Figure 2. Every arm on every student, per suite. The bars are the cells of Table 2. Sample-and-judge was not run on Nano. The PLVR bars are the same program in front of each student. On Telecom the program is the only arm above 57.9% on any student. On Retail and LiveMCPBench it is competitive with the best baseline.
How much of the result is the program
Granite as the student. Run with Granite-4.2-8B as the student, producing the final response itself (one run per suite), the final program scores 82.5% on Retail, 91.2% on Telecom, and 42.1% on LiveMCPBench (Table 2). Granite untreated scores 77.2%, 43.0%, and 28.4%, so the program raises it by 5.3, 48.2, and 13.7 points. Against the Nemotron students under the same program (Figure 3b), Granite is 2.1 to 3.2 points below on Telecom, within 2.7 points on Retail (above Super, level with Lightning, below Nano), and 3.2 to 12.6 points below on LiveMCPBench. On Telecom and Retail an 8B student under the program is level with the larger ones, and on Telecom it is within 3.2 points of the best result in the table. On LiveMCPBench the student still matters.

Figure 3. (a) Spread between the three Nemotron students, untreated and under the program (§ 5.1); “Avg” is the spread in suite-averaged accuracy, computed before rounding. (b) Granite-4.2-8B as the student against the three Nemotron students under the same program. The light bar is the Nemotron mean and the whiskers are the minimum and maximum. (c) On Lightning, the hand-written seed, the program a frontier model proposes without traces or primitives (§ 5.6, Retail and Telecom only), and the final program after search (§ 5.5). All values are from Table 2 and Table 3.
The base model matters less. Search uses Lightning as the student, and the selected program is held fixed across students. The primitives run on Granite-4.2-8B, and the three program rows differ only in which model reads the chain of thought or has its actions checked. Untreated, the three students are spread over 15.8 points on Retail, 15.0 on Telecom, and 11.6 on LiveMCPBench (6.4 in suite-averaged accuracy). Under Table 2: Accuracy (%) by benchmark (pass@1 per run on -Bench). Retail has 114 tasks, Telecom 114, and LiveMCPBench 95. The program’s Nemotron Telecom cells are means over three runs. All other cells, including the Granite-as-student row, are one run. Bold on amber marks the best arm per student and column. Averages are arithmetic means of the displayed cells. The SFT row is the one fine-tune per model of § 4.3, trained on the kept teacher traces (Appendix § 13). GEPA rows optimise the student’s own prompt with no program (Appendix § 18). ReAct and sample-and-judge rows spend the program’s token budget on Granite-4.2-8B without the program (Appendices § 16 and § 17). PLVR rows (green) run the final program of § 3.4.
the program the spread is 3.5, 1.1, and 9.4 (2.0 in suite-averaged accuracy, Figure 3a). The spread closes on the two suites where an 8B student is level with the larger ones and stays on the suite where the student matters.
Against fine-tuning on the traces
Fine-tuning on the kept traces moves each student by a few points per suite. Its largest single gain over the untreated student is 23.1 points (Super, LiveMCPBench). The program, built from the same traces, is ahead of the fine-tune on Telecom by 47.0, 42.4, and 43.3 points on Lightning, Nano, and Super. On Retail it is ahead by 9.7 and 7.0 points for Lightning and Nano and behind by 6.2 for Super (79.8% against 86.0%). On LiveMCPBench it is ahead by 6.3 and 2.1 for Lightning and Nano and behind by 2.1 for Super (54.7% against 56.8%). The program’s largest single gain over the untreated student is 56.5 points (Nano, Telecom).
Against prompt optimisation of the student
GEPA optimises the student’s own prompt with no program. Its largest gains over the untreated student are on Nano (Telecom 36.8% to 54.4%, Retail 64.0% to 71.9%) and on Super’s Telecom and LiveMCPBench (51.8% to 57.9%, 33.7% to 40.0%). The program is ahead of GEPA on Telecom by 42.6, 38.9, and 35.4 points. On Retail it is ahead by 2.7 and 11.4 for Lightning and Nano and behind by 0.9 for Super (79.8% against 80.7%). On LiveMCPBench it is ahead by 4.2, 1.1, and 14.7.
Against the same token budget without the program
The two token-matched arms spend what the program spends, on the same Granite-4.2-8B, without the program. The ReAct planner loop is below the untreated student on every suite and every student except Nano on Retail (64.0% in both). Spending the program’s budget on a plan, act, and reflect loop makes the student worse, not better. Sample-and-judge with five candidates is the strongest baseline on Lightning’s Retail and on Super’s LiveMCPBench. On Retail it is level with the program for Lightning (82.5% for both) and 3.5 above it for Super (83.3% against 79.8%). On LiveMCPBench it is 8.4 below the program for Lightning and 4.2 above it for Super (58.9% against 54.7%). On Telecom it is 39.1 and 46.8 points below. Against the best baseline in each cell, the program on Retail is level on Lightning, 7.0 above on Nano, and 6.2 below on Super. On LiveMCPBench it is 4.2 above on Lightning, level on Nano, and 4.2 below on Super. We read these two suites as competitive, not as a ranking.
What the search contributes
On Lightning, the hand-written seed program scores 72.8% on Retail, 68.4% on Telecom, and 37.9% on LiveMCPBench (Table 2). The searched program scores 82.5%, 94.4%, and 50.5% (Table 6, Figure 3c), a gain of 9.7, 26.0, and 12.6 points (59.7% to 75.8% averaged over the suites). The search added rules to all three blocks. The added rules are marked line by line in Appendix § 11.
Ablation without traces or primitives
One variant removes both things the traces give the method. These are the expert actions that score the search, and the primitives Claude 5 Opus writes from the clustered traces. In their place Claude Sonnet 4.5 proposes the program itself. Both versions start from the same hand-written seed, which scores 72.8% on Retail and 68.4% on Telecom on Lightning. The proposer keeps a working memory of its own, a list of findings and rules that it updates after each proposed program is scored, and at each round proposes edits to the current program. Programs are scored on task outcome on the training tasks, pass or fail as decided by each task’s own end-state check. Nothing is compared with expert actions, and the proposer’s own judgement is never used as a score. The run made 25 proposer calls for telecom (518,200 prompt and 11,650 completion tokens) and 31 for retail (539,400 and 15,500).
Without the traces and the primitives, the proposed program reaches 77.2% on Retail and 75.4% on Telecom on Lightning, against 82.5% and 94.4% (Table 3, Figure 3c). It is 5.3 points lower on Retail and 19.0 lower on Telecom. On Telecom it is above the seed (68.4%) and the fine-tune (47.4%) but well below the program built from the teacher’s actions. This bears on the procedure thesis in two ways. The seed alone takes Lightning from 47.4% to 68.4% on Telecom, and a frontier model’s edits from its own knowledge of the domain, with no traces, take it to 75.4%, so a large part of what the student lacks is procedure that can be written down without the teacher. The remaining 19.0 points come only when the procedure is taken from the teacher’s actions, so the traces supply procedure that neither the seed nor the frontier model’s prior knowledge does.
| Program construction | Retail | Telecom |
| PLVR, A* over mined rules and primitives, reference-process objective | 82.5 | 94.4 |
| Sonnet proposes the program, no traces, no primitives, outcome-scored | 77.2 | 75.4 |
Table 3. Ablation on Nemotron 3.5 Lightning. Accuracy (%) on the official test sets. Both arms start from the same hand-written seed.
Tokens and compute
Appendix § 12 gives tokens per task for every arm (Table 7, Figure 4) and the cost of producing each arm (Table 8). Under the program the student itself reads 248,100 to 255,900 input tokens per task and writes 1,300 to 2,200 output tokens. Granite-4.2-8B adds 100 to 117 primitive calls per task, reading 326,500 to 407,500 tokens and writing 8,000 to 9,700 in total. The untreated student reads 45,907 to 76,916 input tokens per task and writes 2,323 to 3,997. Fine-tuning and GEPA are within the same range. The two token-matched arms make 97 to 107 Granite calls per task, against 100 to 117 for the program, and read 479,000 to 734,000 Granite input tokens against the program’s 326,500 to 407,500. Per task, a run under the program costs 4.7 to 9.8 times the FLOPs of a vanilla run. Producing the program cost FLOPs in Granite scoring, once for all three students. Producing one fine-tune cost to FLOPs for the selected run and to for the sweep that selected it, per student. The accounting rules and the per-student figures are in Appendix § 12.
| Student | Arm | Tasks | Student Output | Student Input | Granite-4.2-8B Calls | Granite-4.2-8B Output | Granite-4.2-8B Input |
| Nemotron 3.5 Lightning | Vanilla | 278 | 2,323 | 45,907 | – | – | – |
| SFT | 278 | 1,646 | 37,704 | – | – | – | |
| GEPA | 278 | 2,356 | 45,137 | – | – | – | |
| ReAct | 228 | 10,700 | 176,800 | 100 | 29,100 | 492,000 | |
| Sample-and-judge | 228 | 25,700 | 532,700 | 99 | 29,500 | 634,000 | |
| PLVR | 228 | 1,300 | 249,200 | 112 | 9,000 | 377,000 | |
| Nemotron 3 Nano | Vanilla | 270 | 3,997 | 76,916 | – | – | – |
| SFT | 278 | 4,518 | 83,366 | – | – | – | |
| GEPA | 181 | 3,546 | 40,498 | – | – | – | |
| ReAct | 228 | 15,100 | 183,800 | 107 | 35,700 | 522,000 | |
| Sample-and-judge | 228 | 77,300 | 612,200 | 102 | 87,500 | 734,000 | |
| PLVR | 228 | 2,200 | 255,900 | 100 | 8,000 | 326,500 | |
| Nemotron 3 Super | Vanilla | 278 | 2,672 | 63,948 | – | – | – |
| SFT | 278 | 2,640 | 56,071 | – | – | – | |
| GEPA | 278 | 2,747 | 63,682 | – | – | – | |
| ReAct | 228 | 9,400 | 175,800 | 97 | 26,400 | 479,000 | |
| Sample-and-judge | 228 | 26,400 | 574,800 | 105 | 30,400 | 686,000 | |
| PLVR | 228 | 1,400 | 248,100 | 117 | 9,700 | 407,500 |
Table 7. Tokens per task, mean over the -Bench evaluation runs, counted with each model’s own tokenizer. Vanilla, SFT, and GEPA rows pool the runs they were measured on (task counts shown). PLVR, ReAct, and sample-and-judge rows pool Retail and Telecom (228 tasks). For PLVR (green) the student’s tokens and Granite-4.2-8B’s tokens (summed over the primitive calls in a task) are shown separately. For ReAct and sample-and-judge the Granite columns are the loop or the sampling and judging, and output includes reasoning tokens. Their student columns are the student’s own calls under the loop or across the five samples. The program’s student output count is from Telecom, where it was counted exactly.

Figure 4. Input tokens per task by arm, log scale, from Table 7. Blue is the student’s own input and green is Granite-4.2-8B’s input summed over its calls. Vanilla, SFT, and GEPA make no Granite calls. S&J is sample-and-judge.
| Arm | Lightning (3B) | Nano (3B) | Super (12B) |
| SFT, selected run only | |||
| SFT, full sweep (24 runs) | |||
| PLVR search (Granite scoring, three blocks) | , once | ||
| PLVR rule mining (Claude Sonnet 4.5) | 16 calls, 287k prompt and 47k completion tokens, once |
Table 8. Cost of producing each arm, in FLOPs. Fine-tuning is per student. The search is run once and its program is used by every student. The selected-run figure is the one fine-tune of Table 2. The sweep is all 24 runs that selection drew on. The rule-mining row is an API model whose size is not public, so its FLOPs are not counted.
Discussion
How much is procedure depends on the domain. The three suites give different answers. On Telecom the program with Granite-4.2-8B as the student scores 91.2%, every Nemotron student under it 93.3 to 94.4%, and no other arm above 57.9%. The procedure is nearly the whole result, and on this suite an 8B model is enough to run it. The result is in-domain compositional generalisation. The program is built from synthetic tasks in the benchmark’s own environment, with its tools and policies, and is run on the benchmark’s test tasks, which it has not seen. It is not a claim about transfer to another domain. Telecom is also where the program’s student runs longest, about 40 turns per task against about 9 on Retail. On Retail the program with Granite as the student scores 82.5%, within 2.7 points of the Nemotron students, so there too the choice of student matters little under the program, though the program’s margin over the baselines is small. On LiveMCPBench the program with Granite as the student reaches 42.1% and the Nemotron students are 3.2 to 12.6 points ahead of it. The student’s tool choice and argument binding still count. We read the part of the gap between base models that the program closes as an estimate of how much of that gap is procedure. The program also carries the frontier models’ prior knowledge (§ 5.6), so the estimate is an upper bound.
The same program for every student. The program is the same object in every row. The primitives run on Granite-4.2-8B, the search was run with Lightning as the student, then held fixed across students. Under it, the three Nemotron students land within 1.1 points of each other on Telecom and 3.5 on Retail, and Granite as the student lands within 3.2 points of them on both. On LiveMCPBench they stay 9.4 points apart. Where the base model still matters is where the student is doing part of the work.
What it costs. The cost of the program is in inference tokens. The student reads 3.3 to 5.4 times as many input tokens as under the other arms, and Granite’s calls add more than that again. Per task this is 4.7 to 9.8 times the FLOPs of a vanilla run (Appendix § 12). Producing the program cost FLOPs in Granite scoring, counting every Granite token in full and excluding the rule-mining calls, once for all three students. Producing one fine-tune cost to for the selected run and to for the sweep that selected it, per student. No weights change, and the search was run once and the resulting program is shared by every student.
Limitations. The gain is not attributed to the traces alone. The hand-written seed, Claude 5 Opus (which writes the primitives), and Claude Sonnet 4.5 (which mines the rules) all contribute, and neither frontier model is a blank slate about customer service or tool use. The ablation that removes the traces and the primitives still reaches 75.4% on Telecom (§ 5.6), and that ablation covers Retail and Telecom only. All cells but the Nemotron program’s Telecom cells are single runs, so differences of a few points are not resolved. The synthetic training tasks share the Retail and Telecom domains with the test suites and the LiveMCPBench format with LiveMCPBench, so domain knowledge can pass from the training set into the primitives, the rules, and the fine-tunes. The training tasks and their answers are different from the test tasks. The authors verified this.
Conclusion
We compiled a teacher’s procedure into a program rather than into a student’s weights. The primitives are authored by a frontier model from clusters of the teacher’s traces, each run by a small frozen model and verified as it runs. They are assembled by a over a rule library mined from the same traces under a reference-process objective, and used at inference to write the student’s chain of thought or to check the actions the student proposes. Run in front of three Nemotron base models and on its own, the one program estimates how much of each domain is procedure. On Telecom the estimate is that nearly all of it is. Granite-4.2-8B as the student goes from 43.0% to 91.2%, every Nemotron student reaches 93.3 to 94.4%, and no other arm passes 57.9%. On that suite an 8B model is enough. This is in-domain compositional generalisation, from synthetic tasks in the benchmark’s environment to its unseen test tasks. On Retail the 8B student under the program is within 2.7 points of the Nemotron students. On LiveMCPBench the Nemotron students are 3 to 13 points ahead of it. On those two suites the program is competitive with the best baseline. No weights are updated, the program is the same for every base model, and the spread between base models shrinks where the program does the work. The program was produced once, at FLOPs, and costs 5 to 10 times a vanilla run to execute. Its output is a program rather than a checkpoint. It can be read at every step, it is the same for every base model, and it can be revised one primitive at a time. The next test is cross-domain transfer, a program built in one environment run in another.
Broader Impact Statement
Procedural tool-use programs could improve service reliability, but incorrect actions could alter customer records or expose personal data. Real-world use should retain access controls, require consent for consequential changes, limit personal-data access, and support human escalation. The reported benchmark results do not establish deployment safety; the primitive verifiers check specific output constraints rather than end-to-end safety.
Reproducibility Statement
The method is specified in § 3. The synthetic training set and the kept teacher traces are described in § 3.1. The search settings are in Appendix § 10. The seed and final programs are summarised in Appendix § 11. The primitive library and its mapping to trace clusters are in Appendix § 14. The mined rule libraries are in Appendix § 15. The construction of every baseline is in Appendices § 13, § 16, § 17, and § 18. Token and compute accounting is in Appendix § 12. The synthetic dataset, the program, the primitives, and the search code will be released following peer review.
Search settings
Table 4 gives the settings of the program search of § 3.4. Table 5 gives the number of programs the search scored per block.
Seed and final programs
The program is three blocks, one per subset of the training set. These are a telecom block for troubleshooting, a retail block for multi-turn tool matching, and a tool-search block for the LiveMCPBench format. Each block is summarised here twice in English, as the hand-written seed and as the final program after search. These are summaries of executable code, not the full runtime. In the final summaries, a line with a leading + (green) describes a rule added from the mined codeblock library, with the library id for tool-search rules (Appendix § 15). Unmarked lines are from the seed. The retail block’s added rules come from the same library, mined from the telecom and tool-search traces. Table 6 gives the seed and final scores on Nemotron 3.5 Lightning. The search’s contribution is discussed in § 5.5.
Large language models assisted with manuscript editing.
Telecom block (troubleshooting)
Seed. The hand-written block.
split the message into requests
for each request that reports a problem:
walk the policy's checklist in its written order
for each fix rule:
read the current state of the system
do not repeat a fix that is already in place
re-run the policy's check; stop when it passes
drop duplicate actions
Final. The block after the search. Green lines are the rules the search added.
split the message into requests
for each request that reports a problem:
+ identify first: looks up the user before anything else
+ find the right record: reads all records to match the user's identifier
go through the rules' diagnostic steps in their written order
+ one step at a time: executes a procedure written as a list of steps one
+ step at a time
for each rule of the form "if <condition>, apply <fix>":
+ check the problem early: confirms the reported problem before
+ attempting fixes
+ customer acts on their device: never calls user-side tools directly
read the current state
+ read before changing a record: never changes settings without reading
+ them first
skip a fix whose effect is already in place
+ argument names the target: an identifying argument names the target,
+ not the change to make
+ refusal cites the rule: a refusal cites a value the rule's text
+ mentions
+ before a state-changing action:
+ quantities from records: every quantity is user-stated or computed
+ from records
+ target in the named state: when the request names a state, the target
+ chosen is in that state
+ verify payment: confirms the bill shows as paid before proceeding
+ after a state-changing action, request the follow-up step at once:
+ restart after a settings reset, restart after resuming,
+ toggle on the device after the account
+ escalate after a failed attempt: escalates only after the action was
+ attempted and refused or failed
+ dates computed in code: computes time conditions in code against the date
+ the rules give
+ ended contract to a human: transfers without trying to resume service
re-run the rules' success check; stop when it passes
remove duplicate actions
Retail block (multi-turn tool matching)
The base model proposes each turn’s action and the block checks it before it goes out.
Seed. The hand-written block.
each turn:
proposal = base model's next action (a lookup, a message or a change)
unknown tool or malformed id -> rejected, proposed again
a change: every value must be in a record that was read or in the
customer's words
a change: customer identified, owns the record, policy rule holds;
else refuse
a change goes out only after the customer's yes to its values
a change already made is not made again
"done" claimed without the call -> retry
no offers the customer did not ask for
if nothing above fires -> the proposal goes out unchanged
Final. The block after the search. Green lines are the rules the search added.
each turn:
proposal = base model's next action (read, message, or state change)
# validity
the action must exist and its arguments must be well-formed
+ fix after validation error: retries with parameters corrected from the
+ error (M42)
# grounding: every value has a source
every value in a state change comes from an observed record or the user
+ fill from the record: takes a value the user did not give from the record
+ and confirms it
+ computed values are own work: computed figures come from its own
+ calculation on retrieved data (M49)
+ carry identifiers forward: uses an identifier from one result in the next
+ call (M15)
# reference: resolve what the user means before acting
+ read all before comparing: reads every source before a comparison or join
+ (M47)
+ preserve existing content: reads what exists, then writes old and new
+ content together (M17)
+ superlatives by comparison: retrieves all values, then compares to find
+ the top one (M13)
+ user's fallback: applies the user's stated fallback when the request
+ cannot be met
# permission: the rules decide, not the base model
a state change requires: user identified, owns the target, rules allow it
+ no tools for simple logic: never searches for a tool to do arithmetic,
+ parsing or filtering (M05)
+ permitted equivalent: uses an equivalent action a rule permits when the
+ rule blocks the requested one
+ refuse only on a rule: refuses only when the rule check produced the
+ refusal
# consent
a state change goes out only after the user agrees to its exact values
+ explicit agreement: agreement is explicit, covers one state change, and
+ is not inferred from a choice among options or a qualified yes
+ confirm once: does not confirm an agreed state change a second time
# ordering
+ agreed change first: carries out an agreed state change before anything
+ else
+ irreversible last: does irreversible actions last, after telling the user
+ they are final
+ correction everywhere: applies a correction everywhere the corrected
+ value appears
+ drop a no-op: drops an action that would change nothing
# restraint
a state change already made is not repeated
a claim of completion without the action is retried
nothing is offered that the user did not ask for
+ checks stay internal: does not surface internal checks to the user as
+ questions
+ stop after answering: takes no further action after the final answer
+ (M03)
+ no early escalation: does not escalate while the user is still willing to
continue
if nothing above fires -> the proposal goes out unchanged
Tool-search block (LiveMCPBench format)
Seed. The hand-written block.
split the task into requests
for each request:
retrieve candidate tools for the request
pick one, fill its parameters
call it
check whether the request is achieved
answer
Final. The block after the search. Green lines are the rules the search added.
split the task into requests
+ one request if the split fails: treats the whole task as one request when
the split gives nothing usable (M56)
+ complete answer: the final answer includes everything the task asked for
(M02)
for each request:
retrieve candidate tools for the request
+ search in the tool's form: uses the form the search tool requires and
never repeats a search unchanged (M57)
pick one, fill its parameters
+ fix after validation error: retries with parameters corrected from the
error (M42)
+ exact text: uses text the task specifies word for word (M20)
+ read before use: reads a source before doing anything with its contents
(M01)
+ read before editing: reads a source before making a precise edit (M45)
+ call values from the task or results: values in a call come from the task
or a tool result (M58)
call it
+ empty is not success: treats an empty result, or one that fails for every
item, as not a success (M59)
+ alternative after error: tries a different approach, not the same call
again (M14)
+ different tool after empty result: moves to a more direct query or a
known identifier (M44)
+ drop a dead source: does not use again a source that fails to connect or
lacks the tool (M60)
+ specialised lookup: uses the dedicated lookup tool for an identifier
system (M40)
check whether the request is achieved
+ all calls then one answer: makes every needed call, then gives a combined
answer (M55)
+ report the output: the answer names where the output went and summarises
it (M07)
+ gather before writing: finishes all data gathering before writing an
output (M06)
+ stop after answering: takes no further action after the final answer
(M03)
+ budget in calls: counts the planner budget in calls per action, not
seconds (M61)
answer
+ computed values are own work: computed figures come from its own
calculation on retrieved data (M49)
Tokens and compute
This appendix gives the token counts per task for every arm (Table 7), the FLOP accounting behind the per-task and production costs quoted in § 5.7 and § 6, and the cost of producing each arm (Table 8).
Tokens. Table 7 and Figure 4 give tokens per task on the two domains. Under the program the student itself reads 248,100 to 255,900 input tokens per task and writes 1,300 to 2,200 output tokens. Granite-4.2-8B adds 100 to 117 primitive calls per task, reading 326,500 to 407,500 tokens and writing 8,000 to 9,700 in total. The untreated student reads 45,907 to 76,916 input tokens per task and writes 2,323 to 3,997. Fine-tuning and GEPA are within the same range. The two token-matched arms make 97 to 107 Granite calls per task, against 100 to 117 for the program, and read 479,000 to 734,000 Granite input tokens against the program’s 326,500 to 407,500.
FLOPs. We count active parameters tokens for inference and active parameters token-passes for training. We take 3B active parameters for Lightning and Nano, 12B for Super, and 8B for Granite-4.2-8B. The input counts in Table 7 are cumulative over calls. Granite’s calls run with prefix caching and about 80% of its input tokens are served from cache, which we cost at zero. The student’s cached fraction was not measured, so student input is costed in full for every arm. Per task, a vanilla run costs , , and FLOPs on Lightning, Nano, and Super. A run under the program costs , , and , of which Granite is , , and . The ratios are 9.8, 5.6, and 4.7.
Cost of producing each arm. Table 8 gives the cost of producing each arm. The fine-tuning sweep is 24 runs per student (Appendix § 13), token-passes in total per student. The search is 383,783 Granite calls and 1.87 billion tokens over the three blocks (257,557 calls and 1,159M tokens for telecom, 96,814 and 605M for retail, 29,412 and 104M for tool-search, Appendix § 10), run once for all three students. Mining the rule library took Claude Sonnet 4.5 16 calls. These are 6 for the tool-search traces (47,047 prompt and 17,685 completion tokens) and 10 for the telecom traces (239,600 and 29,500). It is an API model whose size is not public, so its FLOPs are not counted in Table 8.
Table 8: Cost of producing each arm, in FLOPs. Fine-tuning is per student. The search is run once and its program is used by every student. The selected-run figure is the one fine-tune of Table 2. The sweep is all 24 runs that selection drew on. The rule-mining row is an API model whose size is not public, so its FLOPs are not counted.
Fine-tuning baselines
The fine-tuning arm of the comparison is supervised fine-tuning of each Nemotron student on the kept training traces of § 3.1. This appendix gives its construction, sweep, and selection.
What is matched
Data. Matched exactly. Both arms use the retained training traces from the same synthetic split of § 3.1. Retained validation traces are used only for selection. No official benchmark test data enter fitting or selection.
Rows. Fine-tuning uses the kept teacher traces of the training split of each subset (§ 3.1). For retail there is one row per task. For telecom and tool-search there is one row per assistant turn, since those tasks are multi-turn. Validation uses the traces of the held-aside split. Maximum length is 16,384 tokens and no row was truncated in any run.
Models. The three Nemotron students, fine-tuned directly. They are Nemotron 3.5 Lightning, Nemotron 3 Nano, and Nemotron 3 Super (Table 9).
The variants
Every row shares a chat layout. The system instruction is identical throughout and names no primitive. The user message carries the environment state, tool schemas, and numbered turns exactly as the teacher saw them. The arms differ only in the assistant target. The outcome arm’s target is the final reply with the tool calls only. The process arm’s target is the teacher’s reasoning as a thinking block followed by the final calls. A third cell, process+outcome, has the same target as the process arm and was swept separately. The sweep for all three cells is reported below.
Training and sweep
Table 10 gives the training settings and the sweep.
Selection
Selection maximises val_solved on the held-aside traces of the three subsets, breaking ties by lower validation NLL. An instance is solved when the predicted calls block exactly matches the ground truth (no type errors, loss 0). The selections are in Table 11.
Primitive extraction in full
Segmentation and clustering
The kept training traces are split into 3,141 segments, each typed as a reason, a call, a message, or a question. Segmentation walks each trace’s message list. Only assistant messages produce segments, and each produces one segment per thing it emitted. A non-empty reasoning field gives one reason segment. Each entry in the tool-call list gives one call segment. Non-empty content gives one message segment, or a question segment if it ends in a question mark. User and tool messages produce no segments. They accumulate into the context (the last user message and the pending tool results) that is attached to the next assistant segment, and the pending results are cleared after each agent turn. The cut is therefore per emitted product rather than per turn. One assistant turn with reasoning, two calls, and a closing message becomes four segments.
A segment is represented by the agent’s output at that point only, truncated to 2,000 characters. For a reason this is the reasoning span. For a call it is the literal name({json args}). For a message or question it is the message text. The surrounding context (user message, tool results, turn, domain, function) rides on the segment and reaches the frontier-model stages but is never embedded. Segments are embedded with text-embedding-3-small (1,536 dimensions, L2-normalised). All similarities are cosine. Segments are clustered with -means within each kind, giving 35 clusters. These are 15 reason (876 segments), 8 call (1,064), 9 message (1,159), and 3 question (42).
From clusters to primitives
Clusters locate which segments a primitive lives in. They do not separate which decision that segment witnesses. Claude 5 Opus post-processes the clusters. It decides which operations they show and writes each primitive’s prompt, input-output signature, verifier, and fallback. The 37 primitives are listed in Table 12 to Table 17 by group, with the subsets they are used in (T = telecom, M = tool-search, R = retail), the number of segments assigned to them, and the clusters those segments come from.
| Primitive | Used in | Seg. | Clusters (segments each) |
| Servers for the task | M | 59 | call1 (26), call5 (17), call10 (16) |
| Search phrases | M | 7 | call1 (5), call5 (2) |
| Widen tools | M | 4 | reason5 (2), call5 (2) |
| Pick the function | T, M | 35 | call5 (17), call1 (16), call10 (2) |
| Plan steps | T, M | 26 | reason17 (13), reason5 (6), reason9 (4), message0 (1), reason11 (1), reason8 (1) |
Table 13. Primitives for finding the tools.
| Primitive | Used in | Seg. | Clusters (segments each) |
| Fill the parameters | T, M, R | 30 | call9 (11), call5 (8), call10 (6), message1 (2), call1 (2), reason11 (1) |
| Where a value comes from | T, M | 35 | message0 (15), call9 (6), reason9 (3), reason3 (3), reason15 (1), message7 (1), reason17 (1), reason13 (1), message4 (1), reason8 (1), reason2 (1), reason1 (1) |
| How to get a missing parameter | T, M | 27 | reason2 (26), reason1 (1) |
| Question for a missing parameter | T, R | 20 | reason2 (13), reason5 (3), reason11 (2), reason3 (2) |
| Device action arguments | T | 2 | call5 (2) |
| Requests covered by the same call | T | 6 | reason9 (2), reason17 (1), message0 (1), reason15 (1), reason11 (1) |
| Price terms | T | 9 | message5 (4), reason5 (1), message9 (1), question4 (1), reason9 (1), message7 (1) |
| Which arguments failed | T, M | 1 | call10 (1) |
Table 14. Primitives for building the call.
| Primitive | Used in | Seg. | Clusters (segments each) |
| Functions a policy section governs | T, R | 14 | reason5 (9), reason4 (4), reason11 (1) |
| Is the rule a condition | T, R | 3 | reason14 (1), reason16 (1), reason9 (1) |
| Is the rule about this action | T | 17 | reason17 (8), reason5 (4), reason9 (2), message0 (2), reason11 (1) |
| Is the condition met | T, R | 7 | reason9 (3), reason17 (2), reason3 (1), reason8 (1) |
| User’s own premise or condition | T | 36 | reason17 (16), reason11 (8), reason9 (5), reason5 (5), reason8 (2) |
| Alternatives when blocked | T | 10 | reason5 (9), reason9 (1) |
| Reply to a confirmation | T | 5 | message0 (4), reason17 (1) |
Table 15. Primitives for checking the policy.
| Primitive | Used in | Seg. | Clusters (segments each) |
| Copy the rule’s condition | T | 1 | reason16 (1) |
| Does one reading show the condition | T | 1 | reason14 (1) |
| Does the condition hold now | T | 11 | reason17 (3), reason9 (3), message0 (2), reason14 (1), reason15 (1), reason4 (1) |
| Is the condition true by the quote alone | T | 5 | reason17 (1), reason3 (1), reason5 (1), message4 (1), message0 (1) |
| Is the setting already as wanted | T | 14 | message2 (5), reason4 (4), message8 (3), reason5 (2) |
| Is the problem fixed | T | 29 | reason4 (9), message2 (7), message9 (4), message3 (4), message1 (2), question2 (2), reason17 (1) |
Table 16. Primitives for troubleshooting conditions.
Clusters, and the primitives each carries
Table 18 lists every cluster with its kind, its size, the training subsets its segments come from, and the primitives it carries.
| Cluster | Kind | Size | Domains | # | Primitives |
| message8 | message | 191 | telecom | 2 | Device reply, Is the setting already as wanted |
| question2 | question | 13 | telecom | 2 | Device reply, Is the problem fixed |
| reason1 | reason | 35 | tool-search, telecom | 2 | How to get a missing parameter, Where a value comes from |
| call11 | call | 38 | telecom | 1 | Device reply |
| call2 | call | 272 | telecom | 1 | Device reply |
| call7 | call | 154 | retail | 1 | Parts |
| question4 | question | 4 | telecom | 1 | Price terms |
| question5 | question | 25 | telecom | 1 | Device reply |
| reason10 | reason | 27 | tool-search | 1 | Check a claim |
| reason12 | reason | 76 | retail | 1 | Classify one request |
| reason13 | reason | 11 | tool-search, retail | 1 | Where a value comes from |
Table 25 (PDF p. 26).
Mined rule libraries
For the search of § 3.4, Claude Sonnet 4.5 mines a rule library from the kept training traces in a few calls. The two libraries below are used together, as one candidate set of 125 rules, for every block, including the retail block, which has no library of its own. Mining is several extraction calls over batches of traces, then one merge call. Each rule is an executable codeblock; the tables give one-line English summaries of its behaviour. The tool-search library (61 rules, Table 19) took 6 calls (5 extraction, 1 merge, 47,047 tokens in, 17,685 out). The telecom library (64 rules, Table 20) took 10 calls (9 extraction, 1 merge, 239,600 tokens in, 29,500 out).
Tool-search (LiveMCPBench format), 61 rules
:::
Telecom, 64 rules
The ReAct planner loop
Each customer turn runs the loop of Table 21 until the student emits an action. The settings are in Table 22.
The sample-and-judge prompt
The judge is Granite-4.2-8B. Identical candidate next steps are pooled, and each option is shown with the number of the five samples that proposed it.
System. The system prompt of the judge.
You are the selection module of a tool-using assistant. The assistant produced several candidate next steps (OPTIONS),
each with the number of independent samples that proposed it. Pick the ONE option that best follows the INSTRUCTIONS and
is best supported by the CONVERSATION SO FAR and the tool results. When options are equally good, prefer the one proposed
by more samples. Answer with one JSON object: {"choice": <option number>, "reason": str}
User. The user message, with the fields the harness fills in.
INSTRUCTIONS:
{system or '(none)'}
TOOLS:
{render_tools(tools)}
CONVERSATION SO FAR:
{render_conv(conv)}
OPTIONS:
1. [{votes} of {n} samples] {show(option)[:3000]}
2. [...]
GEPA baseline on the student’s prompt
This is the prompt-optimisation arm of § 4.3. The student’s own system prompt is optimised with GEPA [1] and the student is then run as a native tool-calling agent with no program. The budget was 10 iterations. The held-aside score was plateauing by then, so more iterations were not run. The settings are in Table 23 and the per-student outcome is in Table 24.
References
- [1]Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumbh Shandilya, Michael J Ryan, Meng Jiang, Christopher Pott, Koushik Sen, Alexandros G. Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. GEPA: Reflective prompt evolution can outperform reinforcement learning, 2026. URL https://arxiv.org/abs/2507.19457.
- [2]Debangshu Banerjee, Changming Xu, Eugene Ie, Ming Zhang, Daiyi Peng, Chu-Cheng Lin, Tarun Suresh, and Gagandeep Singh. Severa: Verified synthesis of self-evolving agents, 2026. URL https://arxiv.org/abs/2603.25111.
- [3]Victor Barres, Honghua Dong, Soham Ray, Xujie Si, and Karthik Narasimhan. τ²-bench: Evaluating conversational agents in a dual-control environment, 2025. URL https://arxiv.org/abs/2506.07982.
- [4]Vishvesh Bhat, Emmanuel Anaya Gonzalez, Jay Vaghasia, and Asad Aali. Forethought: Verifiable reasoning from neurosymbolic primitive programming, 2026a. URL https://arxiv.org/abs/2607.04096.
- [5]Vishvesh Bhat, Jay Vaghasia, Muhammad Ahmed Mohsin, and Asad Aali. Benchmarking the benchmarks: A validity audit of tool-calling evaluation, 2026b. URL https://arxiv.org/abs/2607.02577.
- [6]Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W. Cohen. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. Transactions on Machine Learning Research, 2023. URL https://arxiv.org/abs/2211.12588.
- [7]Ching-An Cheng, Allen Nie, and Adith Swaminathan. Trace is the next AutoDiff: Generative optimization with rich feedback, execution traces, and LLMs, 2024. URL https://arxiv.org/abs/2406.16218.
- [8]Paul Christiano, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences, 2023. URL https://arxiv.org/abs/1706.03741.
- [9]Debargha Ganguly, Srinivasan Iyengar, Vipin Chaudhary, and Shivkumar Kalyanaraman. Proof of thought: Neurosymbolic program synthesis allows robust and interpretable reasoning, 2024. URL https://arxiv.org/abs/2409.17270.
- [10]Luyu Gao, Aman Madaan, Shuyuan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. PAL: Program-aided language models. In Proceedings of the 40th International Conference on Machine Learning, 2023. URL https://arxiv.org/abs/2211.10435.
- [11]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, Xiaokang Zhang, Xingkai Yu, Yu Wu, Z. F. Wu, Zhibin Gou, Zhihong Shao, Zhuoshu Li, Ziyi Gao, Aixin Liu, Bing Xue, Bingxuan Wang, Bochao Wu, Bei Feng, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chong Ruan, Damai Dai, Deli Chen, Dongjie Ji, Erhang Li, Fangyun Lin, Fucong Dai, Fuli Luo, Guangbo Hao, Guanting Chen, Guowei Li, H. Zhang, Hanwei Xu, Honghui Ding, Huazuo Gao, Hui Qu, Hui Li, Jianzshong Guo, Jiashi Li, Jingchang Chen, Jingyang Yuan, Jinhao Tu, Junjie Qiu, Junlong Li, J. L. Cai, Jiaqi Ni, Jian Liang, Jin Chen, Kai Dong, Kai Hu, Kaichao You, Kaige Gao, Kang Guan, Kexin Huang, Kuai Yu, Lean Wang, Lecong Zhang, Liang Zhao, Litong Wang, Liyue Zhang, Lei Xu, Leyi Xia, Mingchuan Zhang, Minghua Zhang, Minghui Tang, Mingxu Zhou, Meng Li, Miaojun Wang, Mingming Li, Ning Tian, Panpan Huang, Peng Zhang, Qiancheng Wang, Qinyu Chen, Qiushi Du, Ruiqi Ge, Ruisong Zhang, Ruizhe Pan, Runji Wang, R. J. Chen, R. L. Jin, Ruyi Chen, Shanghao Lu, Shangyan Zhou, Shanhuang Chen, Shengfeng Ye, Shiyu Wang, Shuiping Yu, Shunfeng Zhou, Shuting Pan, S. S. Li, Shuang Zhou, Shaoqing Wu, Tao Yun, Tian Pei, Tianyu Sun, T. Wang, Wangding Zeng, Wen Liu, Wenfeng Liang, Wenjun Gao, Wenqin Yu, Wentao Zhang, W. L. Xiao, Wei An, Xiaodong Liu, Xiaohan Wang, Xiaokang Chen, Xiaotao Nie, Xin Cheng, Xin Liu, Xin Xie, Xingchao Liu, Xinyu Yang, Xinyuan Li, Xuecheng Su, Xuheng Lin, X. Q. Li, Xiangyue Jin, Xiaojin Shen, Xiaosha Chen, Xiaowen Sun, Xiaoxiang Wang, Xinnan Song, Xinyi Zhou, Xianzu Wang, Xinxia Shan, Y. K. Li, Y. Q. Wang, Y. X. Wei, Yang Zhang, Yanhong Xu, Yao Li, Yao Zhao, Yaofeng Sun, Yaohui Wang, Yi Yu, Yichao Zhang, Yifan Shi, Yiliang Xiong, Ying He, Yishi Piao, Yisong Wang, Yixuan Tan, Yiyang Ma, Yiyuan Liu, Yongqiang Guo, Yuan Ou, Yuduan Wang, Yue Gong, Yueheng Zou, Yujia He, Yunfan Xiong, Yuxiang Luo, Yuxiang You, Yuxuan Liu, Yuyang Zhou, Y. X. Zhu, Yanping Huang, Yaohui Li, Yi Zheng, Yuchen Zhu, Yunxian Ma, Ying Tang, Yukun Zha, Yuting Yan, Z. Z. Ren, Zehui Ren, Zhangli Sha, Zhe Fu, Zhean Xu, Zhenda Xie, Zhengyan Zhang, Zhewen Hao, Zhicheng Ma, Zhigang Yan, Zhiyu Wu, Zihui Gu, Zijia Zhu, Zijun Liu, Zilin Li, Ziwei Xie, Ziyang Song, Zizheng Pan, Zhen Huang, Zhipeng Xu, Zhongyu Zhang, and Zhen Zhang. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature, 645(8081):633–638, 2025. ISSN 1476-4687. doi: 10.1038/s41586-025-09422-z. URL http://dx.doi.org/10.1038/s41586-025-09422-z.
- [12]Shengran Hu, Cong Lu, and Jeff Clune. Automated design of agentic systems, 2025. URL https://arxiv.org/abs/2408.08435.
- [13]Ryo Kamoi, Yusen Zhang, Nan Zhang, Sarkar Snigdha Sarathi Das, Ranran Haoran Zhang, Wenpeng Yin, and Rui Zhang. Efficient prm training data synthesis via formal verification, 2026. URL https://arxiv.org/abs/2505.15960.
- [14]Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. DSPy: Compiling declarative language model calls into self-improving pipelines, 2023. URL https://arxiv.org/abs/2310.03714.
- [15]Zhuofeng Li, Haoxiang Zhang, Seungju Han, Sheng Liu, Jianwen Xie, Yu Zhang, Yejin Choi, James Zou, and Pan Lu. In-the-flow agentic system optimization for effective planning and tool use, 2026. URL https://arxiv.org/abs/2510.05592.
- [16]Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step, 2023. URL https://arxiv.org/abs/2305.20050.
- [17]Guozhao Mo, Wenliang Zhong, Jiawei Chen, Qianhao Yuan, Xuanang Chen, Yaojie Lu, Hongyu Lin, Ben He, Xianpei Han, and Le Sun. LiveMCPBench: Can agents navigate an ocean of MCP tools?, 2025. URL https://arxiv.org/abs/2508.01780. arXiv:2508.01780.
- [18]Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022. URL https://arxiv.org/abs/2203.02155.
- [19]Liangming Pan, Alon Albalak, Xinyi Wang, and William Wang. Logic-LM: Empowering large language models with symbolic solvers for faithful logical reasoning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 3806–3824, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-emnlp.248. URL https://aclanthology.org/2023.findings-emnlp.248/.DOI
- [20]Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, and Michael Zeng. Automatic prompt optimization with "gradient descent" and beam search, 2023. URL https://arxiv.org/abs/2305.03495.
- [21]Jonathan Uesato, Nate Kushman, Ramana Kumar, Francis Song, Noah Siegel, Lisa Wang, Antonia Creswell, Geoffrey Irving, and Irina Higgins. Solving math word problems with process- and outcome-based feedback, 2022. URL https://arxiv.org/abs/2211.14275.
- [22]Peiyi Wang, Lei Li, Zhihong Shao, R. X. Xu, Damai Dai, Yifei Li, Deli Chen, Y. Wu, and Zhifang Sui. Math-Shepherd: Verify and reinforce LLMs step-by-step without human annotations, 2024. URL https://arxiv.org/abs/2312.08935.
- [23]Zhiheng Xi, Chenyang Liao, Guanyu Li, Yajie Yang, Wenxiang Chen, Zihao Zhang, Binghai Wang, Senjie Jin, Yuhao Zhou, Jian Guan, Wei Wu, Tao Ji, Tao Gui, Qi Zhang, and Xuanjing Huang. AgentPRM: Process reward models for LLM agents via step-wise promise and progress, 2025. URL https://arxiv.org/abs/2511.08325.
- [24]Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. ReAct: Synergizing reasoning and acting in language models. In International Conference on Learning Representations, 2023. URL https://arxiv.org/abs/2210.03629.
- [25]Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin, and James Zou. TextGrad: Automatic "differentiation" via text, 2024. URL https://arxiv.org/abs/2406.07496.
- [26]Jiayi Zhang, Jinyu Xiang, Zhaoyang Yu, Fengwei Teng, Xionghui Chen, Jiaqi Chen, Mingchen Zhuge, Xin Cheng, Sirui Hong, Jinlin Wang, Bingnan Zheng, Bang Liu, Yuyu Luo, and Chenglin Wu. AFlow: Automating agent workflow generation, 2025. URL https://arxiv.org/abs/2410.10762.
- [27]Xuekai Zhu, Biqing Qi, Kaiyan Zhang, Xinwei Long, Zhouhan Lin, and Bowen Zhou. PaD: Program-aided distillation can teach small models reasoning better than chain-of-thought fine-tuning. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics, 2024. URL https://arxiv.org/abs/2305.13888.