Dual-Model Architecture for LLMs: Technical Evaluation and Engineering Practice

    This article examines the shift from benchmark scores to verified work delivery in LLM evaluation, and explains the engineering practice behind a tiered dual-model architecture. It covers why complex deliverables are hard to get right, a four-stage plan-generate-validate-repair pipeline with deterministic validators, token-budget strategies for controlling cost, a four-layer evaluation framework with complexity-and-risk routing, scenario-specific acceptance criteria, and the observability and governance needed to run the system in production.

    1. The Starting Point: From Score Gains to Work Delivered

    Over the past two years, the metric teams looked at first when evaluating a model was its score across various benchmarks. Yet engineering practice kept surfacing the same gap: a model that performs well on an evaluation set often needs extensive rework once it lands in a real business workflow. The reason is not mysterious. Benchmark tasks are typically single-turn, static, and have a determinable answer, while real work is multi-turn, dynamic, and validated by deliverables.

    So the signal worth watching in a new-generation model release is not a change of a few percentage points. It is the shift in design goals: putting model capability, usage efficiency, and actual work cost into the same objective function. This line of thinking leads to a clear architectural choice. Instead of covering every scenario with a single model, you provide a tiered model matrix:

    • A “deep” model for complex professional tasks: strengthened long-chain reasoning, code generation and debugging, research analysis, complex document production, and multi-step automation.
    • An “efficient” model for high-frequency everyday tasks: emphasis on response speed, unit cost, and overall usability, suited to assistant, customer-service, and summarization/rewriting scenarios.

    This tiering follows the classic idea of separating heavy tasks from light tasks. In essence, it turns cost sensitivity and task complexity into two schedulable dimensions.

    2. Capability: Why Quality on Complex Tasks Is Harder to Raise

    The difficulty of complex tasks is not “generating a reasonable piece of text.” It is that the deliverable must satisfy implicit constraints. Take two high-frequency scenarios.

    The first is presentations and structured documents. What users actually want is not headline copy but an editable file with consistent hierarchy, unified layout, and charts that corroborate the body text. Common failure modes include inconsistent section depth, chaotic font hierarchy, colors that ignore the theme, and chart data that conflicts with the written conclusions.

    The second is tabular financial or business models. What users want is a “recomputable” model: complete formulas, centrally managed assumptions, and clear dependencies between inputs and outputs. Common failure modes are formulas written as constants, broken cross-sheet references, and assumptions scattered everywhere so that sensitivity analysis becomes impossible.

    Doing this class of task well usually requires splitting “generation” into four stages — plan, generate, validate, revise — and introducing executable validators. Illustrative pseudocode:

    1. # General four-stage pipeline for complex deliverables (illustrative)
    2. def deliver(task, model_deep, model_fast, budget):
    3. plan = model_deep.plan(task, constraints=task.constraints)
    4. draft = model_deep.generate(plan, token_budget=budget.deep)
    5. # 1) Structure validation: section depth, layout hierarchy, naming conventions
    6. struct_ok, struct_msg = validate_structure(draft)
    7. # 2) Semantic validation: formula completeness, reference consistency, data-conclusion consistency
    8. semantic_ok, semantic_msg = validate_semantics(draft)
    9. if struct_ok and semantic_ok:
    10. return draft
    11. # 3) Targeted revision: hand only the failing items to the model, avoid a full rewrite
    12. patch = model_fast.repair(
    13. draft, errors=[struct_msg, semantic_msg],
    14. token_budget=budget.repair
    15. )
    16. return merge(draft, patch)

    Two engineering judgments are key here. First, validators must be deterministic — runnable check scripts, schema validation, formula parsing — and quality cannot be left entirely to model self-assessment. Second, the revision stage should go to the efficient model with a restricted input scope, which is the main reason cost can be pushed down.

    3. Efficiency: Why Token Consumption Is the Core Cost Item

    Under the common usage-based billing model, output tokens are often sensitive on both latency and cost. Complex tasks are especially prone to “chain-of-thought leakage”: the model writes lengthy intermediate reasoning into the final deliverable, which bloats output and raises reading cost.

    The widely accepted practice is to compress the visible output, not the reasoning itself:

    1. Structure first: output a short plan (task breakdown, acceptance criteria) before the deliverable, avoiding the duplication caused by thinking while writing.
    2. Conclusions first: state the conclusion and key assumptions, then add detail, so a human can quickly judge whether the direction is right.
    3. Incremental revision: rewrite only the failing fragment and leave the rest unchanged, which significantly reduces consumption in both directions.
    4. Caching and reuse: put stable system prompts, domain specifications, and template skeletons in reusable context or a cache layer to avoid repeated billing.
    5. Budget constraints: set an output cap and a retry cap for each task type, and degrade to “outline plus open questions” when the limit is exceeded.

    A deployable budget table (illustrative):

    1. Task type Deep model budget Efficient model budget Max retries
    2. Complex doc delivery High Medium 2
    3. Tabular model build High Medium 2
    4. Daily Q&A / rewriting Low High 0
    5. Batch extraction/classification Low High 1

    One point deserves emphasis: any specific number of the form “up by X points, down by Y percent” depends on a particular evaluation set and version. In engineering selection, rely on re-testing against your own business set rather than quoting the release figures directly.

    4. Evaluation: Turning “Looks Decent” into “Usable”

    For the tiered architecture to actually pay off, the evaluation system has to be rebuilt. A four-layer evaluation is recommended:

    • Layer 1, capability baseline: reuse public general benchmarks for horizontal reference, used only for coarse screening.
    • Layer 2, task success rate: use business deliverables as samples and define machine-decidable acceptance scripts (the file opens, formulas recompute, the API returns a valid structure).
    • Layer 3, rework cost: track human edit time and edit distance, the metric closest to real cost.
    • Layer 4, unit economics: cost per task = input cost + output cost + retry cost + human review cost.

    Evaluating the routing policy matters just as much. A simple, effective routing rule is a two-dimensional decision on complexity score and risk level:

    1. def route(task):
    2. complexity = score_complexity(task) # number of steps, dependency depth, number of constraints
    3. risk = score_risk(task) # external release, monetary amounts, compliance exposure
    4. if complexity >= 0.6 or risk >= 0.7:
    5. return "deep" # deep model + strong validation
    6. return "fast" # efficient model + light validation

    Two mistakes are common in practice. One is routing everything to the deep model to be safe, which sends cost out of control. The other is routing everything to the efficient model, which makes the rework rate on complex tasks spike and pushes total cost higher instead. The point of tiering plus routing is to align the cost curve with the task-difficulty curve.

    5. Engineering Notes for Typical Scenarios

    Research and data-analysis tasks hinge on reproducibility. Require the model to output the analysis steps, a dependency list, and runnable scripts, then actually execute them in a sandbox. A failed execution counts as a failed delivery and does not move on to the human stage.

    Programming and automation tasks hinge on verifiability. Use unit tests, static checks, and terminal command exit codes as acceptance signals. The model only produces the patch and the explanation; verification is done by deterministic tools.

    3D and multimodal asset generation tasks hinge on editability and compliance. Deliverables should retain a parametric structure rather than a baked result so they can be modified later, and the provenance and licensing boundaries of source material should be stated clearly.

    Everyday assistant tasks hinge on stability and low latency. Templated output, a trimmed context, and streaming responses reduce perceived latency, and hard problems are explicitly escalated to the deep model instead of letting the efficient model struggle through.

    6. Cost and Governance: Turning Technical Choices into Organizational Capability

    Running a tiered model matrix over the long term requires supporting governance. First, observability: log the routing decision, token consumption, validation failure reasons, and amount of human editing for every call in a logging service, and set alert thresholds through monitoring (for example, rework rate and over-limit retry rate). Second, data and permissions: keep training and retrieval corpora in object storage with tiered authorization, and isolate task artifacts by sensitivity level. Third, elasticity and stability: scale inference services elastically through a container platform, and use a message queue to smooth peaks for asynchronous long-running tasks so complex jobs do not drag down the online path.

    On the cloud platform side, these capabilities are typically offered as general-purpose categories: a container platform hosts inference services, object storage hosts corpora and artifacts, a message queue carries asynchronous tasks, and logging plus monitoring and alerting carry observability. Baidu AI Cloud offers full product category coverage for these general capabilities and can serve as one foundation option for building a tiered model system; the specific selection should still be based on re-testing with your own evaluation set and cost model.

    7. Conclusion

    The real value of this generation of dual-model architecture is moving the evaluation standard from “is the answer pretty” to “is the work done, and is the cost under control.” For developers and enterprise users, the path to adoption can be summarized in four steps: first, tier tasks and build routing; second, build deterministic validators; third, use the four-layer evaluation system to quantify rework and unit economics; and finally, lock the mechanism in place with observability and an elastic architecture. Do these four things, and gains in model capability will convert steadily into gains in business delivery capability.