# CAPE: Coordinating Calibration and Search for Tool-Use Policies

arXiv: https://arxiv.org/abs/2611.31938 · HTML: https://mlsanity.com/paper/2611.31938/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 16 of its 21 references that are in the map.
- Submitted 24 Nov 2026, announced 25 Nov 2026.

## Builds on (most cited first, 16 of 16)

- [ReAct: Synergizing Reasoning and Acting in Language Models](https://mlsanity.com/paper/2210.03629/) (2022)
- [Executable Code Actions Elicit Better LLM Agents](https://mlsanity.com/paper/2402.01030/) (2024)
- [An LLM Compiler for Parallel Function Calling](https://mlsanity.com/paper/2312.04511/) (2023)
- [ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Models](https://mlsanity.com/paper/2305.18323/) (2023)
- [ADaPT: As-Needed Decomposition and Planning with Language Models](https://mlsanity.com/paper/2311.05772/) (2023)
- [Safe Policy Improvement with Baseline Bootstrapping](https://mlsanity.com/paper/1712.06924/) (2017)
- [PDDLStream: Integrating Symbolic Planners and Blackbox Samplers via Optimistic Adaptive Planning](https://mlsanity.com/paper/1802.08705/) (2018)
- [Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Models](https://mlsanity.com/paper/2308.00675/) (2023)
- [Safe Reinforcement Learning via Shielding under Partial Observability](https://mlsanity.com/paper/2204.00755/) (2022)
- [PLAY2PROMPT: Zero-shot Tool Instruction Optimization for LLM Agents via Tool Play](https://mlsanity.com/paper/2503.14432/) (2025)
- [Generalized Lazy Search for Robot Motion Planning: Interleaving Search and Edge Evaluation via Event-based Toggles](https://mlsanity.com/paper/1904.02795/) (2019)
- [Near Optimal Bayesian Active Learning for Decision Making](https://mlsanity.com/paper/1402.5886/) (2014)
- [A Unifying Formalism for Shortest Path Problems with Expensive Edge Evaluations via Lazy Best-First Search over Paths with Edge Selectors](https://mlsanity.com/paper/1603.03490/) (2016)
- [Lazy Receding Horizon A* for Efficient Path Planning in Graphs with Expensive-to-Evaluate Edges](https://mlsanity.com/paper/1803.04998/) (2018)
- [Safe POMDP Online Planning via Shielding](https://mlsanity.com/paper/2309.10216/) (2023)
- [OpaqueToolsBench: Learning Nuances of Tool Behavior Through Interaction](https://mlsanity.com/paper/2602.15197/) (2026)

## Abstract (arXiv)

A tool call can fail even when the operation behind it is correct, because the receiving tool parses delimiters, dates or record layouts under a configuration the agent cannot inspect. Compiling a tool-use policy for such a tool requires both calibration, which evaluates candidate calls on candidate configurations, and search over the evaluated calls. The two share one compilation budget: calibrating everything first postpones any improved policy until the end, while re-solving every partially known model delays the next useful query. A call becomes usable as soon as its effects are known on the configurations that reach it. We present CAPE, a training-free compiler built on this observation. It maintains an executable policy at all times, directs calibration to the calls that can improve this policy, and tightens bounds only where doing so ends calibration early. Returned policies preserve every configuration the initial policy completes, and CAPE certifies optimality when its executable and optimistic values meet. On CSV and JSON workflows built from 64 requests, CAPE reaches the independently computed optimum in 502 of 504 compilations while taking 22.0% less compilation time than eager exact search. On larger CSV families it returns policies with higher completion at similar compilation time, and it raises completion by 15.38 to 34.66 percentage points over an LLM that revises its serialization from error feedback.
