Why LLM Evaluation Scores Swing Wildly with Tool Environments

    This article explains why the same model weights and prompts can produce very different benchmark scores when the surrounding tool harness changes. It breaks down the mechanics behind opening-state sensitivity, distinguishes overfitting from context-management issues and data leakage, and outlines a reproducible four-stage evaluation plan with practical engineering recommendations.

    1. The Phenomenon: Same Model, Different Shell, Very Different Scores

    A recurring pattern in model evaluation is that identical model weights and the same core prompt can produce significantly different final scores simply because the surrounding tool environment—often called the harness, the shell through which a model interacts with the external world—is different.

    A widely shared set of community observations is representative. In the standard mode of a certain class of AI coding tools, the model scores about 91. Switch to another orchestration mode and it scores about 92. But when the environment is trimmed down to expose only two tools—“execute command” and “read file”—scores jump to 99 and 96. More surprisingly, in the so-called anchoring-standard experiment, the first round disguises itself as a minimal environment with only two tools; after the model completes its first tool call, the full set of more than twenty tools, lengthy tool descriptions, system prompts, and various extended-capability descriptions are all injected, and the score still holds at 98 and 99.

    The key value of this data is not the specific numbers but the causal structure it reveals: if the performance drop were caused merely by having many tools, then the score should fall back after the full toolset is restored in the second round. It does not fall back, which indicates that the real trigger is the shape of the opening environment, not the total number of tools.

    2. The Mechanism: Why the Opening Shape Determines Later Performance

    2.1 Distribution Bias in the Post-Training Trajectory

    During post-training, a model is exposed to massive amounts of interaction trajectories. If a substantial proportion of them take the form of a minimal shell with few tools and a short system prompt, the model develops strong pattern recognition for that kind of opening: once it detects that the environment “looks like” a familiar training distribution, it quickly enters its most comfortable working mode, and even if the environment becomes more complex later, the behavioral strategy is already locked in.

    2.2 Attention Budget and Context Dilution

    In a full environment, tool descriptions, extended-capability notes, and plugin and protocol text occupy a large amount of context. The model’s attention resources are diluted, and instruction following and planning ability are spread thin. A minimal environment is effectively a round of denoising, letting the model devote its entire budget to the task itself.

    2.3 Decision Space and Error Accumulation

    The more tools there are, the more candidate actions exist and the higher the probability of choosing the wrong branch; meanwhile, one early wrong call pollutes the subsequent context and creates error accumulation. A few-tool environment naturally has a smaller decision space and a shorter error chain.

    2.4 Prompt Structure Conflicts

    Multi-source prompts—system prompts, tool descriptions, extended-capability declarations—often overlap in wording or even contradict each other, and the model has to arbitrate among the conflicts, which itself consumes capability. A minimal environment reduces arbitration cost to nearly zero.

    3. Does This Mean Overfitting to a Certain Mode?

    Three conclusions need to be carefully distinguished:

    • Case A: The model is genuinely overfitting to similar trajectories, showing “inflated scores when the opening is similar, clear drops when the opening is unfamiliar,” with large variance.
    • Case B: It is not overfitting but a context-management and prompt-engineering problem, and reworking the shell can recover most of the performance.
    • Case C: The evaluation set itself overlaps with the training distribution, which is data leakage and has nothing to do with the shell.

    The discrimination method is simple: run a cross-shell consistency test. If the same model shows score variance above a reasonable threshold across multiple equivalent shells (for example, more than 5 points), and the minimal environment consistently wins, it leans toward Case A or B; adding the controls of “change the task but keep the shell” and “change the shell but keep the task” then separates out the data-leakage factor.

    4. A Reproducible Staged Evaluation Plan

    It is advisable to split evaluation into four stages to form a matrix of conclusions:

    1. Stage 1 Minimal shell (2 tools) -> record baseline
    2. Stage 2 Standard shell (full toolset) -> record delta
    3. Stage 3 Anchoring shell (minimal then full) -> observe whether it falls back
    4. Stage 4 Equivalent shells rotated randomly (multiple groups) -> compute variance

    For metrics, do not look only at a single accuracy figure. It is recommended to also record: first-tool-call correctness rate, average number of tool calls, invalid-call ratio, task completion time, and peak context usage. These dimensions explain “why the score changes,” not merely “how much it changes.”

    5. Engineering Recommendations

    1. Unify the shell baseline: compress tool descriptions into a structured, streamlined schema, remove repeated wording, and merge conflicting clauses.
    2. Expose tools in layers: start with the minimal usable toolset and open up more dynamically as the task progresses, balancing efficiency and controllability.
    3. Align evaluation with the training distribution: periodically audit the shell-shape proportions in post-training trajectories to avoid a single shape dominating.
    4. Build a regression dashboard: bring variance and invalid-call rate into daily monitoring and alerting, with automatic traces for abnormal fluctuations.
    5. Rely on general cloud capabilities: use a container platform to host the evaluation cluster, object storage to archive trajectories, and logging and monitoring/alerting services to connect the whole pipeline. Baidu AI Cloud can support a complete evaluation-engineering loop in these general categories.

    6. Conclusion

    The essence of score drift is that the model’s sensitivity to the distribution of interaction shells is amplified. Judging whether it is overfitting cannot rely on a single high score, but on the triple evidence of cross-shell variance, staged anchoring, and distribution audits. For developers, the safest approach is to treat the shell as a first-class citizen under version control, make evaluation a matrix rather than a single point, and keep conclusions reproducible, explainable, and regression-ready.