acceptodds
Under review as a conference paper at ICLR 2027

GraphPTC: Guiding Programmatic Tool Calling with Dynamic Execution Graphs

Abstract

Programmatic Tool Calling (PTC) allows large language models to compose multiple tool calls with control flow and intermediate data processing within a single program block executed in a persistent runtime. Although PTC reduces model-tool interaction rounds, execution across blocks is represented as a linear history of code, standard output, and errors, leaving execution effects and dependencies implicit. Across seven benchmark settings and five backbone models, PTC underperforms Direct Tool Calling in of comparisons, by as much as percentage points, indicating that programmatic execution alone does not consistently improve performance. We introduce Graph-Structured Programmatic Tool Calling (GraphPTC), a framework that augments PTC with a task-level dynamic execution graph incrementally constructed from runtime traces. The typed graph captures tool effects, artifacts, states, and failures within blocks and explicitly links dependencies across blocks. It links declared intents to observed effects and provides structured feedback for continuing execution, patching failed steps, replanning dependency paths, or producing an answer. Across all evaluated benchmark–backbone combinations, GraphPTC outperforms both baselines, with average gains of and percentage points over Direct Tool Calling and PTC, respectively. In the efficiency evaluations, it uses – fewer input tokens than Direct Tool Calling.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.