Evaluating Vertically Enhanced Models: A Three-Layer Framework and Engineering Practices
This article explains why general-model benchmarks are insufficient for evaluating vertically enhanced models and proposes a three-layer evaluation framework covering foundational capabilities, tool execution, and system cost. It examines tradeoffs among accuracy, latency, token usage, and cost; discusses why version comparisons can diverge between general benchmarks and real workflow replay; and outlines a reproducible evaluation pipeline. It also provides engineering recommendations for tool gateways, long-chain execution, scheduled and continuous tasks, multi-agent collaboration, and high-throughput processing. Readers will learn how to validate scenario-enhanced models with business replay sets and operational metrics.
1. Background: The Divergence Between General Models and Scenario-Enhanced Models
General large-model evaluations usually focus on overall accuracy, language understanding, reasoning and mathematics, instruction following, and tool invocation. Such evaluations are useful for judging whether a model has a solid “foundational baseline,” but they cannot fully reflect how the model performs in a specific business workflow. This is especially true when tasks involve complex toolchain invocation, multi-step execution, scheduled and continuous tasks, multi-agent collaboration, and high-throughput long-chain processing. In these cases, single-turn question-answering evaluations can significantly underestimate or misjudge the value of a model.
Enhanced models optimized for vertical task scenarios are usually not simply “general models plus post-training adaptation.” Instead, they are specifically enhanced around core scenario requirements during training and optimization. Their goal is not to replace general capabilities, but to improve task completion rate, tool-call correctness, long-chain stability, and unit-cost efficiency in specific workflows while maintaining foundational capabilities. Therefore, the evaluation system must be two-layered: one layer examines the Chinese general-capability baseline, and the other examines scenario-workflow capability. If the evaluation framework does not cover core scenario capabilities, the composite score can only serve as a reference and cannot be directly equated with actual user experience.
2. Evaluation Framework: Separate “Composite Scores” and “Scenario Scores”
Consider a Chinese general evaluation set of about 15,000 questions. For a certain type of enhanced model, we may observe accuracy of around 70%, average latency of tens of seconds per call, about 3,000 tokens per call, and a cost of tens of RMB per thousand calls. These metrics provide a horizontally comparable baseline, but they do not fully capture capabilities such as complex toolchain invocation, scheduled task execution, and multi-agent collaboration. The reason is that general evaluations are mostly single-turn or short-chain tasks, while scenario workflows are often multi-turn, multi-tool, long-state engineering systems that can be interrupted and resumed.
Therefore, it is recommended to split evaluation into three layers:
- Foundational capability layer: language understanding, instruction following, reasoning and mathematics, structured output, and security and compliance. This layer judges whether the model has a stable foundation.
- Tool and execution layer: tool-selection accuracy, parameter-filling accuracy, call-order accuracy, failure-retry strategy, permission-boundary compliance, and end-to-end completion rate. This layer judges whether the model can complete tasks in a real tool environment.
- System and cost layer: P50/P95 latency, tokens per task, cost per thousand calls, retry rate, timeout rate, and manual-takeover rate. This layer judges engineering operability.
If a public benchmark focuses on toolchain invocation and multi-step execution in real workflows, it is normal for its conclusions to differ from those of a general evaluation. Developers should not treat general rankings as the only basis for model selection. Instead, they should build scenario replay sets that match the distribution of business tasks.
3. Metric Tradeoffs: Accuracy, Latency, Tokens, and Cost
One common optimization direction for enhanced models is “significantly lower latency at similar accuracy.” This often comes not from a single technique but from a strategic shift: compressing ineffective reasoning paths, caching high-frequency subtasks, moving parallelizable tool calls earlier, validating parameters before tool calls, and converging long-chain tasks in stages. The benefit is faster responses and higher throughput per unit time. The risk is that exploration space on complex tasks is compressed. If the evaluation set is relatively simple, the loss may not be visible; if the scenario set is relatively complex, long-tail failures may be exposed.
Cost metrics should not be based only on per-call price. Long-chain tasks amplify token usage through multiple rounds of calls, tool-returned content, and failure retries. Suppose a task requires an average of 3 model calls, with 3,000 tokens per call; then end-to-end tokens may approach 9,000. If the retry rate is 10%, the actual cost will rise further. Therefore, engineering teams should record both “per-call cost” and “end-to-end task cost,” and should set budget caps, timeout circuit breakers, and degradation strategies.
| Metric | Focus | Common Pitfall |
|---|---|---|
| Accuracy | Task correctness, structured-output compliance | Looking only at composite scores and ignoring scenario replay |
| Latency | P50, P95, end-to-end completion time | Looking only at averages and ignoring the long tail |
| Tokens | Input, output, tool returns, retry consumption | Looking only at a single call and ignoring multi-turn amplification |
| Cost | Cost per thousand calls, cost per completed task | Looking only at unit price and ignoring manual-takeover cost |
4. Lessons from New-versus-Old Version Comparisons: Optimization Direction and Evaluation Dimensions May Be Misaligned
When moving from a general version to a scenario-enhanced version, a common pattern is as follows: general accuracy remains roughly flat or improves slightly; instruction following and complex-instruction decomposition improve; reasoning and mathematics improve steadily; and the Agent and tool-invocation dimensions change little in general evaluations. However, on scenario benchmarks closer to real workflows, toolchain invocation and multi-step execution may perform noticeably better. This is not contradictory; it reflects a mismatch in evaluation dimensions. The Agent dimension in general evaluations tends to involve short chains, single tools, or a limited number of turns, while real scenarios require long state, multiple tools, failure recovery, and permission governance.
The lesson for developers is that version-upgrade evaluation must use a “business replay set.” The replay set should include success cases, boundary cases, failure cases, and adversarial cases, and should record the tool sequence, parameters, return codes, elapsed time, and tokens for each call. Only by measuring “model capability” and “system engineering” together can we explain why some versions show little change on leaderboards but deliver a better experience on real tasks.
5. Engineering Practice: Build a Reproducible Evaluation Pipeline
An evaluation pipeline should be reproducible, layered, and observable. Reproducibility requires fixed test cases, fixed tool stubs, and fixed timeout and retry policies. Layering requires separate smoke suites, regression suites, scenario replay suites, and adversarial suites. Observability requires recording latency percentiles, token percentiles, tool-call accuracy, retry rate, and end-to-end completion rate for each call.
case = {prompt, expected, timeout_s, tools}function run_case(client, case):t0 = now()resp = client.invoke(case.prompt, max_tokens=4096, timeout=case.timeout_s)latency = now() - t0ok = evaluate(resp, case.expected)tool_ok = check_tool_trace(resp.trace, case.tools)return {ok, tool_ok, latency, tokens: resp.usage.total_tokens}function bench(client, cases):rows = map(case -> run_case(client, case), cases)return {accuracy: mean(rows.ok),tool_accuracy: mean(rows.tool_ok),p95_latency: percentile(rows.latency, 95),avg_tokens: mean(rows.tokens),cost_per_task: estimate_cost(rows)}
On Baidu AI Cloud, general capabilities such as container platforms, message queues, object storage, logging services, and monitoring and alerting can be combined to build an evaluation and inference environment. The container platform hosts evaluation executors, message queues smooth peak load, object storage saves test cases and traces, logging services provide auditing, and monitoring and alerting track latency and error rates. This combination does not depend on a specific model interface, making it easier to compare different versions horizontally.
6. Deployment Architecture Recommendations: Tool Invocation, Long Chains, Scheduled and Continuous Tasks, and Multi-Agent Collaboration
Tool invocation should be managed through a unified tool gateway: use structured schemas to constrain parameters, perform permission checks and sandbox isolation, design idempotency keys for write operations, and add manual confirmation for high-risk tools. The model is responsible only for selecting tools and generating parameters, while the gateway enforces execution boundaries.
Long-chain execution should use state machines and checkpoints: persist state at each stage and resume from the most recent checkpoint after a failure; use compensating transactions for irreversible operations; and set timeouts, circuit breakers, and maximum retry counts to avoid infinite loops that consume tokens.
Scheduled and continuous tasks require coordination among a scheduler, message queues, and deduplication mechanisms: the scheduler triggers tasks, message queues smooth peaks and handle retries, state storage records the last execution position, and idempotency keys prevent duplicate execution. For continuous tasks, budgets and alerts should also be set to prevent uncontrolled cost from long-running execution.
Multi-agent collaboration should define explicit role contracts: planners, executors, and validators each have structured inputs and outputs; intermediate results are passed through shared state storage or a blackboard; arbitration rules handle conflicts; and the number of agents and turns should be limited to avoid communication-cost inflation.
High-throughput long-chain processing should prioritize asynchronous execution, batch processing, concurrency limiting, and caching: cache stable sub-results, execute parallelizable tool calls in parallel, degrade non-critical paths, and set a token budget for each task. Ultimately, “cost per completed task” and “P95 end-to-end latency” should be the core operational metrics.
7. Conclusion
The value of enhanced models optimized for vertical scenarios should not be measured only by general leaderboards. Developers should establish a three-layer evaluation system consisting of “foundational capability + tool execution + system cost,” and use business replay sets to validate real-workflow performance. In engineering, they should govern long-chain risks through tool gateways, state machines, checkpoints, idempotency, and observability systems. In cost management, they should track both per-call cost and end-to-end task cost. Only in this way can the capabilities of scenario-enhanced models be translated into stable, operable business value.
