Dual-Version LLM Engineering Fit Evaluation: A Task-Chain Method
When a model service releases both a high-performance version and a lightweight version, engineering teams need more than a leaderboard comparison. This article presents an end-to-end evaluation method based on real task chains, observable metrics, and layered routing. Using a personal transaction-statement backtesting project as an example, it covers data preparation, task decomposition, interface probing, database design, stability controls, human review, and cloud deployment, and it concludes with three principles for dual-version model selection.
When a model service releases both a high-performance version and a lightweight version, the real question for engineering teams is not “which version is stronger?” but “which version is more stable, more controllable, and more cost-effective in my task chain?” Leaderboard scores reflect only part of general capability. They do not directly answer whether data parsing is reliable, whether tool calls are stable, whether long tasks can be resumed, or whether generated conclusions can be reviewed.
A dual-version evaluation should therefore return to real engineering scenarios: run one complete task chain end to end, break model capability into observable metrics, and use those metrics to make selection and routing decisions.
1. Shifting the Evaluation Target: From Model Release to Engineering Usability
A dual-version release usually implies a gradient across capability, latency, and cost. The high-performance version is suitable for complex planning, code review, long-context reasoning, and multi-step report generation. The lightweight version is suitable for high-frequency extraction, format conversion, simple script generation, and low-latency interaction. A one-off question-answering test can easily mistake an occasional correct answer for stable usability.
A more reasonable approach is to design a set of real tasks and have both versions execute them under the same data, the same prompts, and the same tool conditions. Record success rate, manual intervention count, timeout rate, retry count, cost per task, and final reviewability.
At minimum, the evaluation should cover six dimensions:
- Understanding and planning: can the model break a vague requirement into executable steps?
- Code and script generation quality: can it generate runnable, maintainable code in one pass?
- Tool calling and data interface adaptation: can it probe, fetch, and ingest data under documentation constraints?
- Long-task stability: does it hang, interrupt streaming, or lose state?
- Observability: does it output progress, logs, and error causes?
- Cost and latency: does the lightweight version show clear advantages on simple tasks?
Only when these metrics are compared within the same task chain does dual-version evaluation become meaningful for engineering.
2. Practical Case: A Transaction-Statement Backtesting Analysis System
Consider a personal transaction-statement backtesting analysis project. The goal is to start from a spreadsheet-format trade confirmation statement, extract the involved securities, fetch historical daily bars and intraday data, store them in a local database, run backtesting according to fixed trading rules, and generate an analysis report. This case includes table parsing, entity extraction, interface probing, data ingestion, task scheduling, and report generation, making it a suitable comprehensive test bed for dual-version models.
The project should not hand the entire requirement to the model at once. A more reliable strategy is “plan first, split into steps, and validate each step.” In the first step, let the model extract the list of securities from the trade statement, and have a human confirm it. In the second step, generate an interface availability test script. In the third step, fetch data and ingest it into the database. In the fourth step, implement backtesting metrics. In the fifth step, generate a report and have it reviewed manually. Each step should retain inputs, outputs, and logs so that differences between the two versions can be compared at the exact step where they appear. If the model hangs during a long task, handle it with timeouts, pauses, retries, and checkpoint resume rather than repeatedly starting over.
3. Data Preparation: Spreadsheet-to-Structured Text and De-identification
When a spreadsheet is passed directly to a model for parsing, problems such as misaligned column names, misread empty values, and lost numeric formats are common. A more reliable approach is to first convert the table into structured text or a Markdown table, and add metadata to the file header, including field descriptions, time range, amount units, and buy/sell direction codes. After conversion, perform sample validation to confirm that row counts, key fields, and outliers have not been lost. For sensitive data such as transaction statements, de-identification must come first: remove account identifiers, names, contact details, and other fields, and retain only the time, security, direction, quantity, price, and fees needed for analysis.
Data preparation is also a good opportunity to evaluate the models. The lightweight version can handle batch format conversion, field extraction, and abnormal-row flagging. The high-performance version can handle field semantic inference, conversion-rule review, and sample verification. If the lightweight version is accurate enough for simple extraction, there is no need to assign all batch-processing tasks to the high-performance version. By dividing work between the two versions, teams can observe both quality and cost.
4. Task Decomposition and Prompting: Turning “Loss of Control” into “Acceptance Criteria”
The most common problem in complex tasks is that model-generated content looks complete but cannot run. The solution is not to pile on longer prompts, but to split the task into small steps that can be accepted, and to define inputs, outputs, and failure conditions for each step. For example:
- Input the structured trade-statement text and output a list of security names, deduplicated with original row numbers retained.
- After the list is manually confirmed, output an interface probing script that reports an availability matrix for each interface.
- Based on available interfaces, generate fetch tasks that record progress, failure reasons, and retry counts.
- After data ingestion, output table-structure descriptions and sample queries.
- In the backtesting stage, output metric definitions, calculation processes, and result explanations.
- In the reporting stage, attach an evidence chain and avoid giving conclusions alone.
Prompts should explicitly state: “Do not skip acceptance checks,” “Output error context on failure,” and “All conclusions must be traceable to data.” This reduces the risk of uncontrolled model improvisation and makes it easier to compare the two versions under controlled conditions.
5. Interface Probing and a Local Documentation Base: Validate Before Batch Fetching
Data interfaces often differ in permissions, rate limits, field changes, and response formats. An efficient approach is to organize interface documentation into a local Markdown documentation base, then have the model generate probing scripts based on the documentation. Test each interface for connectivity, returned fields, and sample data, and finally produce a test report. The test report should include at least the interface name, request parameters, return status, field completeness, latency, rate-limit behavior, and recommendations. Only interfaces that pass probing should enter the batch-fetching process.
Example pseudocode:
function probe_interface(interface_spec):result = call_with_timeout(interface_spec, timeout=30s)if result.status == success and required_fields_exist(result.data):return {status: "available", fields: result.fields, latency: result.latency}else:return {status: "unavailable", reason: result.error, latency: result.latency}for spec in interface_docs:report.append(probe_interface(spec))save_report(report)
At this stage, it is suitable for the lightweight version to generate probing scripts and report templates in batches, while the high-performance version reviews script boundary conditions, exception handling, and field mapping. If both versions can generate scripts, compare first-pass success rate, manual edit volume, and clarity of error localization.
6. Ingestion Standards and an Extensible Database Design
Data should not be stored in a single wide table. It is better to split tables by entity and time granularity: a security master table, daily bar table, intraday table, task table, interface test table, and backtesting result table. Each table should retain a primary key, unique constraints, collection time, data source, and version number to support idempotent writes and traceability. When intraday data is large, partition or shard by security and date. The task table should record task status, progress, retry count, and error summary to support checkpoint resume.
Example SQL:
CREATE TABLE security (security_id VARCHAR(32) PRIMARY KEY,name VARCHAR(64),market VARCHAR(16),updated_at TIMESTAMP);CREATE TABLE daily_bar (security_id VARCHAR(32),trade_date DATE,open_price DECIMAL(18,4),high_price DECIMAL(18,4),low_price DECIMAL(18,4),close_price DECIMAL(18,4),volume DECIMAL(24,4),source_version VARCHAR(32),PRIMARY KEY (security_id, trade_date));CREATE TABLE ingest_task (task_id VARCHAR(64) PRIMARY KEY,task_type VARCHAR(32),status VARCHAR(16),progress DECIMAL(5,2),retry_count INT,error_summary TEXT,updated_at TIMESTAMP);
With standardized ingestion, model-generated queries and backtesting code are easier to verify. If the table structure is chaotic, the model may generate SQL that looks correct but uses the wrong definitions, ultimately contaminating the conclusions.
7. Stability Governance: Timeouts, Retries, Idempotency, and Checkpoint Resume
During long tasks, model or tool-chain hangs are not rare. Engineering practice should treat an apparent hang as a governable failure state rather than relying on repeated manual clicks. Set timeouts, maximum retry counts, exponential backoff, and task-state persistence for each step. Batch fetching should be sharded by security and date, with failed shards retried separately. All database writes should use unique keys to ensure idempotency. Check data completeness before report generation.
Pseudocode:
function run_task(task):for attempt in 1..max_retry:try:mark_running(task)result = execute_with_timeout(task, timeout=task.timeout)mark_success(task, result)return resultexcept TimeoutError:mark_retry(task, attempt)sleep(backoff(attempt))mark_failed(task, last_error)
In a dual-version comparison, record timeout rate, retry success rate, and manual intervention count for both versions on the same tasks. If the lightweight version has low latency on simple tasks but times out frequently, its actual total cost may be higher. If the high-performance version has a high single-pass success rate but high cost, it is better suited to complex steps rather than full batch processing.
8. Dual-Version Selection and Routing Recommendations
Based on the task chain above, a routing strategy can be formed: the lightweight version handles format conversion, entity extraction, draft interface probing scripts, log summaries, and simple query generation; the high-performance version handles task planning, complex code review, backtesting definition validation, root-cause analysis of exceptions, and final report generation. Routing criteria can include task complexity, input length, historical success rate, latency budget, and cost ceiling. For high-risk steps such as trading-rule implementation and conclusion generation, enforce manual review or a second review by the high-performance version.
This “layered routing” approach is more aligned with engineering practice than simply choosing one version. It uses the lightweight version’s low latency and low cost, preserves the high-performance version’s strength in complex reasoning, and ensures observability through unified logs and acceptance standards.
9. Human Review and Conclusion Expression
Model-generated reports must include an evidence chain: data range, sample size, missing rate, metric definitions, calculation process, and exception notes. In one experiment, a model gave an extreme risk conclusion based on a limited sample. Such statements should not go directly into a final report. A more reliable practice is to require the model to output “conclusion—evidence—uncertainty—recommended review items,” and let a human confirm before finalizing. When evaluating the two versions, also include “whether conclusions are overstated” and “whether uncertainty is marked” as metrics.
10. Cloud Deployment and Summary
If deployed on the cloud, general capabilities such as Baidu AI Cloud object storage, relational databases, logging, and monitoring and alerting can build a closed loop for data persistence, task tracking, and exception alerts. Object storage can hold original trade statements, converted text, and report snapshots. Relational databases can carry structured market data and task status. Logging can record inputs and outputs at each step. Monitoring and alerting can capture anomalies in timeouts, failure rates, and data completeness. In this way, dual-version model evaluation is no longer a one-time experience but a reproducible, comparable, and governable engineering process.
In summary, evaluating dual-version LLM releases should follow three principles: use real task chains instead of single-point question answering, use observable metrics instead of subjective impressions, and use layered routing and human review instead of blind full-volume invocation. Transaction-statement backtesting is only one case; the method can be transferred to contract extraction, log analysis, data cleaning, report generation, and other scenarios. Only by embedding model capability into standardized data flows, task flows, and observation flows can dual-version selection move from experimentation to a deliverable engineering decision.
