How to Evaluate a Large Model’s Real Capability in Complex Engineering Tasks

    This article explains how to assess large language models in realistic engineering scenarios. It breaks down three types of capabilities—code generation and repository-level changes, agent tasks, and long-horizon reasoning—and provides practical methods for building your own evaluation set, interpreting benchmark scores, quantifying subjective impressions, and calculating cost per successful run. The goal is to help engineering teams move beyond single-number leaderboards and make model choices based on task-specific evidence and reproducible testing.

    Section 1: Clarify the Problem – Why Evaluations Often Disagree

    The same large model can be praised by some users as a big step forward, while others find it less useful than the previous generation in daily work. Both judgments are often based on real observations, and the disagreement usually comes from different perspectives.

    Evaluators typically rely on three types of signals:

    • Standardized benchmark scores: Scores on a fixed question set, useful for horizontal comparison, but the distribution of questions is limited.
    • Task-specific success rate: The proportion of tasks fully completed in your own project or business scenario.
    • Subjective impression: Response speed, instruction-following accuracy, efficiency of error recovery, and the model’s understanding of context and intent.

    These three signals measure different things. A high score does not mean the model will always complete your task. A poor subjective impression may come from the interaction interface rather than from the model’s reasoning ability itself. Therefore, before evaluation, you should first clarify: What task do I actually need to solve?

    Section 2: Break Down the Three Core Capabilities

    2.1 Code Generation and Repository-Level Modification

    Single-file completion and repository-level refactoring differ greatly in difficulty. Repository-level tasks usually require the model to:

    • Read multiple modules and understand their dependencies.
    • Preserve interface compatibility when making changes, avoiding breakage in other callers.
    • When tests fail, locate the root cause and iteratively fix it.

    For these tasks, the acceptance criterion should be whether the complete test suite passes, not whether the generated code “looks reasonable.” Here is an example of acceptance criteria:

    1. Task: Refactor a synchronous data access layer into an asynchronous implementation
    2. Acceptance criteria:
    3. 1. All unit tests pass (process exit code is 0)
    4. 2. Public interface signatures remain backward-compatible
    5. 3. New code introduces no new static-check warnings
    6. 4. Do not modify test assertions to make tests pass

    The fourth criterion is critical. If the model changes assertions to “pass” the tests, the apparent success rate will be inflated, but the actual delivery quality will be poor.

    2.2 Agent Tasks

    Agent tasks refer to scenarios where the model independently plans steps, calls tools, observes the execution results, and adjusts its plan accordingly. Evaluation can focus on four aspects:

    • Plan reasonableness: Does it first collect necessary information before executing side-effectful operations?
    • Tool-call accuracy: Do parameters match the tool’s defined structure? Are there repeated, invalid calls?
    • State maintenance: In longer workflows, does it forget previously set constraints?
    • Stopping condition: After the task is complete, can it terminate promptly, avoiding infinite loops or excessive operations?

    Special attention should be given to “side-effectful operations.” Operations such as deleting files, sending messages, or modifying configuration should require a confirmation step, or be executed only in an isolated environment.

    2.3 Long-Horizon Reasoning

    The main risk in long-chain reasoning is error accumulation. If one step produces an incorrect premise, subsequent steps continue from that wrong premise, and the final conclusion may still appear complete. The countermeasure is to insert checkpoints at key nodes: require the model to output intermediate conclusions, then verify them with scripts or manual review. For example, in numerical calculation tasks, you can ask the model to first provide the formula and input assumptions, then the result, and finally run an independent calculation to verify.

    Section 3: How to Interpret Benchmark Scores

    Public benchmark scores have reference value, but they must be interpreted carefully. The main issues include:

    1. Data contamination: Training data may overlap with test questions, making scores higher than the true generalization ability.
    2. Question distribution bias: Most benchmarks favor algorithmic questions or short-horizon tasks, which differ greatly from long-cycle maintenance work in real enterprises.
    3. Randomness: The same model may produce different results on the same question across multiple samples. A single run’s score is not very reliable.
    4. Prompt sensitivity: System prompts, example formats, output constraints, etc., can significantly affect results. When comparing, you must fix the prompt template.
    5. Judging logic: Some benchmarks rely on automated judging rules that may have loopholes, causing misjudgments.

    A practical recommendation is to run each task at least five times, and report the mean and standard deviation. If the difference in means between two models is smaller than the standard deviation, you should not conclude that “A is better than B.”

    Section 4: Build Your Own Evaluation Set

    A self-built evaluation set is more relevant to your business than public leaderboards. The steps are:

    1. Extract tasks: Select 30 to 100 tasks from real tickets, bug records, and historical requirements, and stratify them by difficulty.
    2. Write judgment criteria: For each task, design automatically verifiable criteria, such as unit tests, static checks, or structured-output validation.
    3. Fix the run configuration: Record the prompt template, sampling parameters, context length, and model version to ensure reproducibility.
    4. Run multiple times and record metrics: Record success rate, time spent, number of retries, and number of manual interventions.
    5. Attribute failure cases: Categorize failure reasons into understanding errors, implementation errors, tool misuse, context loss, environment issues, etc., for targeted improvement.

    Here is a simplified evaluation framework in pseudocode:

    1. struct TaskResult {
    2. task_id: Int,
    3. passed: Bool,
    4. elapsed_seconds: Float,
    5. retry_count: Int,
    6. remark: String
    7. }
    8. function run_task(task_id, model_call, auto_judge, prompt, max_retries):
    9. retry_count = 0
    10. start_time = current_time()
    11. loop:
    12. output = model_call(prompt)
    13. (passed, remark) = auto_judge(output)
    14. if passed or retry_count >= max_retries:
    15. break
    16. retry_count = retry_count + 1
    17. return TaskResult(task_id, passed, current_time() - start_time, retry_count, remark)
    18. function summarize(result_list):
    19. success_rate = count(passed) / len(result_list)
    20. median_elapsed = median([r.elapsed_seconds for r in result_list])
    21. return success_rate, median_elapsed

    There are two points to note. First, “model_call” and “auto_judge” are implemented by you according to your own interface. Second, if auto-judging requires executing model-generated code, it must be run in an isolated environment with restricted network and file-system permissions. Otherwise, a single misoperation could affect real data.

    Section 5: Convert Subjective Impressions into Comparable Data

    Subjective feelings are not impossible to quantify. Use a fixed scoring sheet and record the following for each run:

    • Requirement comprehension: Does the first output hit the intent? Record as yes or no.
    • Fix efficiency: The number of rounds from first failure to passing.
    • Instruction following: Number of times an explicit constraint is violated.
    • Code readability: Whether it conforms to team standards, score from 1 to 5.
    • Interaction cost: Number of times a human needs to add clarifications.

    When the same reviewer grades the same batch of tasks, the results are more trustworthy. If conditions allow, have two or more reviewers grade independently, then calculate inter-rater agreement before using the results.

    Section 6: Distinguish Model Capability from Interaction Experience

    Beyond model capability, the interface layer also affects user experience. Common factors include first-token latency, stability of streaming output, context recovery in long sessions, permission prompts during file or command execution, and task resumption after network interruptions.

    These issues belong to product engineering. They should be recorded separately, so that interface lag is not mistakenly attributed to model reasoning weakness. For example, you can measure first-token latency (time from submission to first character) and end-to-end total time separately, then combine with user feedback to determine where the bottleneck is.

    Section 7: Select Models Based on Cost per Successful Run

    Unit price is a common comparison dimension, but for tasks that require repeated retries, unit price does not reflect the true cost. Use the following formulas:

    • Single-task cost = (input token count × input unit price) + (output token count × output unit price) + (retry count × single-task cost)
    • Cost per successful run = single-task cost ÷ task success rate

    Assume two models, for illustration only:

    • Model A: single-task cost 0.20 CNY, success rate 60% → cost per successful run ≈ 0.33 CNY
    • Model B: single-task cost 0.35 CNY, success rate 90% → cost per successful run ≈ 0.39 CNY

    In this hypothetical case, Model B has a higher single-task cost, but its cost per successful run is close to Model A’s, and it can reduce manual rework. When choosing, you should also factor in the time spent on manual review and modification to get a complete cost picture.

    Section 8: Implementation Advice and Common Pitfalls

    Implementation Advice

    1. Before selecting a model, run your own evaluation set fully. Do not rely on a single leaderboard.
    2. Keep manual review for high-risk tasks. Do not merge generated code directly into the main branch.
    3. Build a regression test set. Every time you change the model version or modify the prompt template, rerun the regression set to detect performance changes.

    Common Pitfalls

    • Overinterpreting a single benchmark score without checking for data contamination or prompt sensitivity.
    • Using only a small number of examples, leading to unstable conclusions.
    • Ignoring randomness; always run multiple times and report the variance.
    • Confusing interaction latency or UI issues with model reasoning ability.
    • Forgetting to factor in retry costs when comparing prices.

    By following the methods above, you can move from vague opinions to evidence-based evaluations, and select the model that truly works for your complex engineering tasks.