cs.AIOct 13, 2026

Compiling Expert Procedures into Verified Programs: When a Small Model Is Enough

Authors: Vishvesh Bhat, Asad Aali, Muhammad Ahmed Mohsin

Organizations: CoreThink AI · Stanford University

Abstract

In procedural tool-use domains, how much of the gap between base models is procedure rather than capability? We build an explicit program from a teacher's traces and run it in front of unchanged small models, including an 8B model. The construction, PLVR , takes the reasoning traces of a teacher, Kimi-K3, clusters their segments to locate recurring operations, has a frontier model author one typed primitive per operation, each run by a small frozen model and assembles the program by A* search over a mined rule library, under a reference-action objective. At inference the program takes one of two forms: for troubleshooting and tool search it produces the chain of thought the student would otherwise generate for itself, and the student acts on it; for multi-turn tool matching the student proposes each action and the program checks, repairs, or retries it before it goes out. On the official tau2-Bench Retail and Telecom test sets and on LiveMCPBench, with three Nemotron base models and the same program for each, the answer depends on the domain. On Telecom, Granite-4.2-8B as the student goes from 43.0% to 91.2% under the program, and every Nemotron student reaches 93.3-94.4%, against at most 58.2% for fine-tuning on the same traces, prompt optimisation of the student, or two token-matched baselines. With Granite-4.2-8B as the student, the program is within 2 to 3 points of the Nemotron students on Telecom and within 3 on Retail, and 3 to 13 points below them on LiveMCPBench: where the domain is procedural 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. The spread between base models shrinks from about 7 points to about 2, averaged over the suites, with no weights changed.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. ABACUS: Program-Guided Multistep Reasoning over Frozen Judgment Models

    Oct 19, 2026Yuhao Wang, Zelin ZangStructured Reasoning in Language ModelsEfficient Language Model Reasoning

  2. Instruction Retrieval at Inference Time for Small Language Models

    Oct 15, 2025Kenan Alkiek, David Jurgens, Vinod VydiswaranKnowledge Augmentation for Language ModelsSmall Language Models

  3. Training Language Models to Use Prolog as a Tool

    Dec 8, 2025Niklas Mellgren, Peter Schneider-Kamp, Lukas Galke PoechReward HackingLogical Reasoning