Organizations: Amazon Services Inc., Palo Alto, CA, USA. · Department of Computer Science and Engineering, HKUST, Hong Kong SAR, China. · School of Computational Science and Engineering, Georgia Institute of Technology, Atlanta, GA, USA.
Multi-step tool orchestration remains challenging for LLMs, as state-of-the-art models frequently fail on full sequence execution due to parameter errors. Training for these workflows faces two obstacles: the lack of environments supporting complex real-world API dependencies, and sparse binary rewards that provide no signal for partial correctness. We propose a reinforcement learning framework addressing both challenges. First, we construct a deterministic environment backed by a large-scale cache of real API responses, enabling constrained synthesis of valid multi-step traces with controllable complexity. Second, we introduce a graduated reward that decomposes correctness into atomic validity (call-level correctness at increasing granularity) and orchestration consistency (correct sequencing with dependency respect). On ComplexFuncBench, our approach substantially improves turn accuracy, with ablations confirming both reward components are essential. Cross-benchmark evaluation on BFCL v4 shows that the learned orchestration skills transfer to entirely different API ecosystems (e.g., agentic web search and memory management), yielding consistent gains while maintaining stable single-step performance. Code is available at https://github.com/horizon-rl/ToolOrchestrationReward
Figures & tables
Figure 1: Framework overview using hotel booking as a running example. Phase 1 : Collect real API responses and curate workflow templates with dependency structures. Phase 2 : Sample cache entries following dependencies, then generate queries matching sampled parameters. Phase 3 : LLM interacts with the deterministic environment through multi-turn rollouts, receiving graduated rewards ( Ratomic + Rorch ) for GRPO updates.
Table 2
Model-LR
Zero-shot
SFT-3
SFT-10
GRPO-3
GRPO-10
SFT+GRPO-3
SFT+GRPO-10
Qwen3-8B-1e-6
34.4
32.6
31.7
36.4
30.2
31.1
29.9
Qwen3-8B-5e-6
–
–
–
28.7
29.6
22.9
28.4
Qwen2.5-7B-1e-6
13.4
11.5
13.5
25.8
23.9
27.1
16.0
Qwen2.5-7B-5e-6
–
–
–
24.1
21.3
16.5
12.1
Table 3: Training with Constrained Synthetic Data (Turn Acc %). Numbers in column headers indicate samples per workflow template (e.g., SFT-3 = SFT with 3 samples/template, GRPO-10 = GRPO with 10 samples/template). Evaluated on full 1000-sample test set.
Web Search
Memory
Mode
Model
Overall
Agg.
Base
No Snip.
Agg.
KV
Vector
Rec. Sum.
FC
Qwen3-8B
10.5
3.5
5.0
2.0
17.4
8.4
13.6
30.3
Qwen3-8B+Ours
16.1
10.5
13.0
8.0
21.7
13.6
15.5
36.1
Prompt
Qwen3-8B
10.1
7.0
5.0
9.0
13.1
4.5
7.1
27.7
Qwen3-8B+Ours
15.4
10.0
11.0
9.0
20.9
6.5
16.1
40.0
Table 4: BFCL v4 Agentic category breakdown (%). Web Search and Memory are entirely different API ecosystems from the Booking.com training domain. +Ours denotes GRPO-3.
Model-LR
1
3
5
7
Qwen3-8B-1e-6
31.0
32.4
32.5
31.1
Qwen3-8B-5e-6
29.4
26.4
30.3
27.3
Qwen2.5-7B-1e-6
19.0
19.0
22.2
22.3
Qwen2.5-7B-5e-6
22.4
27.4
22.8
19.3
Table 5: Effect of Data Scale (Turn Acc %). Scale denotes target samples per workflow; actual totals are 67, 179, 283, 383.
Figure 2: Training dynamics under different reward configurations. Left : Ratomic only achieves high atomic validity but orchestration collapses. Middle : Rorch only achieves perfect orchestration but atomic validity drops. Right : Combined reward achieves balanced improvement.
Figure 3: Turn Accuracy (%) stratified by (a) dependency depth and (b) dependency pattern. Performance degrades with depth and for fan-out patterns. RL training provides consistent improvements across all stratifications.
Error Type (%)
Zero
SFT
GRPO
Call-Level (among produced calls)
Func. Selection Err
15.0
15.3
14.8
Parameter Err
18.7
18.2
16.5
Parameter-Level (given correct func.)
Query Param Err
14.7
15.8
12.7
Dep. Param Err
7.9
4.9
5.6
Table 6: Error analysis on ComplexFuncBench (Qwen3-8B). Call-level : among produced calls; param-level : given correct function; seq-level : why incomplete samples stopped.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 4: Breakdown of Ratomic into AST validation (static) and semantic validation (execution). Rorch only training maintains RAST but Rsem collapses, indicating syntactically valid but semantically broken calls.
Figure 5: Tool calling success metrics during training. Left : Tool calling success rate measures whether predicted calls match ground truth. Right : Tool executable rate measures whether calls execute without errors. Ratomic only achieves highest success rates, while Rorch only shows lower execution success despite high orchestration scores.
Figure 6: Training vs validation metrics for the Combined model. All three metrics ( Ratomic , Rorch , Mean Reward) show consistent improvement on both training and validation sets, with a moderate generalization gap indicating some overfitting to the training distribution.
Type
Dist.
Zero-shot
GRPO-3
RL-Oracle
fallback_logic
5%
43.2
54.7
51.6
explicit_conj.
86%
34.9
35.8
43.6
alternative_opt.
4%
24.4
43.7
48.1
parallel_conj.
5%
21.5
18.1
23.6
Overall
–
34.4
36.4
43.4
Appendix
Table 7: Turn Accuracy (%) stratified by logical composition type. The dataset is dominated by explicit_conjunction (86%), with other patterns representing edge cases.
Domain
Zero-shot
SFT-3
GRPO-3
Attraction
49.8
57.9
60.7
Car-Rental
52.6
57.7
58.6
Hotels
25.4
22.6
29.0
Flights
33.4
29.4
33.6
Cross-domain
27.6
21.9
25.9
Overall
34.4
32.6
36.4
Appendix
Table 8: Turn Accuracy (%) by API domain. Single-domain tasks (Attraction, Car-Rental) are generally easier than cross-domain tasks. SFT degrades cross-domain performance while GRPO maintains or improves across all domains.
Mode
Model
Overall
Agentic
Multi-Turn
Live
Non-Live
Halluc.
FC
Qwen3-8B
41.6
10.5
41.6
80.4
88.8
80.5
Qwen3-8B+Ours
43.4
16.1
40.2
80.8
86.4
81.8
Prompt
Qwen3-8B
38.7
10.1
31.6
80.1
89.3
82.4
Qwen3-8B+Ours
39.5
15.4
27.8
78.8
89.8
81.6
Appendix
Table 9: BFCL v4 overall summary (%). FC = Function Calling; Prompt = Prompt mode.
Training LLMs to orchestrate multi-step tool calls is held back by three coupled obstacles: realistic stateful execution environments are costly to build, synthetic training queries are often detached from the server's actual state (so the generated tool calls fail to execute), and recall-based RL rewards incentivize verbose tool-calling patterns. We present PROVE (Programmatic Rewards On Verified Environments), a framework with three contributions: (1) a library of 20 stateful MCP (Model Context Protocol) servers exposing 343 tools, enabling live-execution RL training with session-scoped state isolation; (2) a state-machine data synthesis pipeline that generates multi-turn tool-call trajectories grounded in live-sampled server state, so generated queries reference entities that actually exist; and (3) a multi-component programmatic reward with an adaptive efficiency penalty that counters the verbosity incentive of recall-based rewards. We train four models (Qwen3-4B, Qwen3-8B, Qwen2.5-7B, Granite-4.1-8B) with GRPO on the resulting ~13K training examples. On BFCL Multi-Turn, tau2-bench, and T-Eval, PROVE yields improvements of up to +10.2, +6.8, and +6.5 points respectively, demonstrating that this framework yields consistent gains on multi-step tool orchestration across two model families.
Tool-using large language model (LLM) agents often face a fundamental tension between answer quality and execution cost. Fixed workflows are stable but inflexible, while free-form multi-step reasoning methods such as ReAct may improve task performance at the expense of excessive tool calls, longer trajectories, higher token consumption, and increased latency. In this paper, we study agent orchestration as an explicit decision problem rather than leaving it entirely to prompt-level behavior. We propose a utility-guided orchestration policy that selects among actions such as respond, retrieve, tool call, verify, and stop by balancing estimated gain, step cost, uncertainty, and redundancy. Our goal is not to claim universally best task performance, but to provide a controllable and analyzable policy framework for studying quality-cost trade-offs in tool-using LLM agents. Experiments across direct answering, threshold control, fixed workflows, ReAct, and several policy variants show that explicit orchestration signals substantially affect agent behavior. Additional analyses on cost definitions, workflow fairness, and redundancy control further demonstrate that lightweight utility design can provide a defensible and practical mechanism for agent control.
Boyan Liu, Gongming Zhao, Hongli Xu
University of Science and Technology of China, Hefei, Anhui, China · Suzhou Institute for Advanced Research, University of Science and Technology of China
Tool use enables large language models to solve complex tasks through sequences of API calls, yet existing reinforcement learning approaches fail to scale to multi-step composition settings. Outcome-based rewards provide only sparse feedback, while trajectory-supervised rewards depend on annotated reference solutions, penalizing valid alternatives and limiting scalability. We propose TIER: Trajectory-Invariant Execution Rewards, a reward framework that derives supervision directly from function schemas and runtime execution, rather than from reference trajectories. The reward decomposes into format validity, schema adherence, execution success, and answer correctness, providing dense, interpretable sequence-level feedback derived from fine-grained verification of individual steps of tool use. This design allows any valid execution path to receive credit, naturally supporting multiple solution strategies and adapting to evolving tool interfaces. On DepthBench, a compositional benchmark stratified by depth (1 to 6 steps), TIER achieves >90% accuracy across steps, where trajectory-supervised rewards collapse beyond step-4. We further demonstrate consistent gains on benchmarks like BFCL v3 and NestFUL. Ablation studies confirm that all reward components are necessary, highlighting the importance of multi-level supervision for compositional reasoning.