Small models trained with outcome-only rewards learn to avoid tools, while strict trajectory-matching rewards (as in ToolRL)
make them call tools but steadily accumulate invalid calls. MENTOR (Model Enhancement by Non-rigid Teacher-Optimized
Rewards) sits between these extremes: it uses the teacher’s trajectory as a reference for which tools to use,
not as a sequence to copy.
- Teacher references. A teacher (Qwen3-235B-Thinking) solves each training question, producing a trajectory
τ(t)=⟨(r1,t1,o1),…,(rLτ,tLτ,oLτ)⟩ of reasoning, tool-use and observation
steps and an answer y^(t). Only trajectories whose answer matches the ground truth are kept.
- On-policy rollouts. The student generates a group of rollouts O(s) for the same question, executing
its Python tool calls in a sandbox.
- Composite reward. Each rollout is scored with
R(O(s),O(t))=wcRc+waRa+wvRv
where Rc = 1 if the final answer matches the teacher’s answer;
the teacher-alignment reward Ra = 1 if the student used exactly the same set of tools as the teacher,
{t∣t∈τ(s)}={t∣t∈τ(t)}, regardless of order or count;
and the tool-validation reward Rv = 1 only if every tool call in the student’s trajectory executes
without error.
- Policy update. The student is optimized with GRPO: rewards are normalized within each rollout group into
advantages that update the student policy.
Training uses mathematical reasoning (AceReason-Math) as a controlled domain. Students are Qwen2.5 (1.5B, 7B) and Qwen3 (1.7B, 8B).
Baselines are the vanilla model, SFT on teacher trajectories, outcome-based RL, and Strict RL (a re-implementation of
ToolRL’s trajectory-matching reward) in the same RL framework. In-domain evaluation uses six math benchmarks
(Math-Forge, Omni-MATH, AIME24, AIME25, AMC23, MinervaMath); out-of-domain evaluation uses tools unseen in training:
the BFCL-v4 function-calling benchmark and three retrieval QA benchmarks (Bamboogle, 2WikiMultiHopQA, HotpotQA).
An alignment score (AS) based on the Jensen-Shannon divergence measures how close a model’s tool-usage distribution is to
the teacher’s.