How to Evaluate an AI Coding Assistant: Real Capability and Cost-Effectiveness
This article outlines a reproducible method for assessing AI coding assistants beyond subjective impressions and public leaderboards. It uses a time-boxed live test as a case study and shows how to lock down evaluation variables, score capability across difficulty tiers from basic coding tasks to complex cross-file changes, and turn cost-effectiveness into a formula that accounts for model calls, context and retrieval, retries, and human review. It also lists common ways results are misread and offers practical steps for embedding evaluation into a development workflow, including tiered model routing, continuous testing, observability, and security considerations.
1. Introduction: After the launch hype, you need a reproducible answer sheet
Every time a new large model is released, community discussion tends to focus on two things. One is subjective impressions, such as “the code looks nicer” or “it occasionally gets stuck.” The other is leaderboard numbers, where different leaderboards use different test sets and scoring methods. For an engineering team, the real questions are different: once the model takes over everyday coding tasks, can it deliver reliably? And once you factor in call cost and time cost, is it worth it?
A more dependable approach is to put it through an exam. The sample below is a time-boxed live test. The candidate is a newly released AI coding assistant running in an agent-based coding host environment, and it answers through a continuous conversation. The network is disabled throughout, and any external links in the questions are not accessed. Each question has a 30-minute limit, and six questions of increasing difficulty are tested in sequence, for a cumulative answer time of roughly 43 minutes.
This record is worth reading closely not because of any conclusion it reaches, but because of how it is designed: the variables are clear, the process is documented, and the timing is verifiable. Building on it, this article distills a methodology for internal vendor selection and answers three questions: how to design the evaluation, how to interpret results, and how to calculate cost-effectiveness.
2. Start with identity: a model’s self-description is information to be verified
1. Starting point: a self-introduction
The first question asks the model to state what model it is, what version it is, and when its knowledge was last updated. The model answers that it is a certain new version of the model running in an agent-based coding host environment; that its knowledge cutoff is based on information provided by the runtime environment; and, in particular, that this information comes from the system prompt rather than “introspection,” and that the closer the content is to the cutoff date, the sparser its memory of it. It takes about 1 minute 14 seconds.
This answer carries far more information than a “version number,” and it points to three types of problems.
2. Version and knowledge boundary must be based on platform information
The current mainstream approach is for the host system to inject the model identifier, runtime environment, and knowledge boundary into the system prompt. Whether this information is accurate depends on the platform configuration, and the fact that a model “can state a version number” does not mean it is correct by default. Verification should go back to the platform documentation, the model metadata, or a fixed standard system prompt that injects standard information directly.
3. “Memory gets sparser closer to the cutoff date” is worth testing
If this phenomenon is real, then when you use “recent public events” to test the knowledge boundary, whether the model can answer normally depends largely on how far the time of questioning is from the cutoff date. A rigorous approach is to design several questions with different timeliness, record the answers and the use of retrieval tools, and then judge the knowledge boundary, rather than just asking once, “When do you think your cutoff is?”
4. “Knowing that you are uncertain” is itself a capability
The model proactively distinguishes between “what the system told me” and “my own memory,” and explains the source of uncertainty. This is information-provenance capability, and it is key to hallucination control. It can be quantified: whether information citations are labeled with sources, whether out-of-bounds questions are refused or accompanied by a request for supplementary material, and whether uncertain content is explicitly stated as such. These three points should be fixed check items in the question set.
5. Incidental finding: long-term memory lacks a reliable time anchor
When asked about recent public events, the model gives several specific examples. Some of these events are real and verifiable, while others cannot be verified at all, and it is impossible to tell whether the training data was actually biased or whether memory confusion occurred during generation. In either case, this shows that the model’s long-term memory lacks a reliable time anchor; it cannot say clearly how far its memory goes.
This leads to the first engineering conclusion: knowledge boundaries can only be guaranteed by the platform and the retrieval system; they cannot be left to the model’s self-certification.
3. Experimental design: lock the variables first, then talk about capability
The exam conditions of this test are themselves worth borrowing, and can be summarized in six points:
| Element | Setting in this test | Design intent |
|---|---|---|
| Object under test | A fixed model version running in a fixed agent host environment | Results can be traced to a specific version |
| Network | Disabled throughout; external links not accessed | Isolate the influence of retrieval tools |
| Time | 30-minute limit per question | Prevent a single question from dragging on indefinitely |
| Question order | Fixed numbering, answered in sequence | Make it easy to compare difficulty distribution |
| Timing | Record total time and per-question time | Enable efficiency calculation |
| Traceability | Full record of questions and answers retained | Results can be reviewed |
Two additional notes:
- Total duration is not the sum of per-question times. The six questions in this test totaled about 43 minutes, which is not only far below the 180-minute limit but also includes manual overhead such as reading the questions, switching between them, taking notes, and copying answers. Therefore, 43 minutes measures the time for the “entire evaluation,” while per-question time and token consumption are the direct data for efficiency analysis.
- Disabling the network is a double-edged sword. It rules out interference from differences in retrieval, but it also rules out the ability to look up documentation and read dependency source code in real development. An enterprise internal test should add a “network allowed” control group and also record the number and quality of retrieval requests the model initiates on its own.
4. Layering capability: breaking “real capability” into scorable dimensions
It is too coarse to ask only “Can it write code?” A question set designed with increasing difficulty is recommended (the T0 to T5 below are illustrative, numbered in ascending order of difficulty), with each dimension paired with observable metrics:
- T0 Cognitive: environment and identity awareness, and awareness of information sources. Metrics are information accuracy rate and source-labeling rate.
- T1 Basic: single-file, clearly bounded implementations, such as data validation or format conversion. Metrics are first-round correctness rate and average number of rounds.
- T2 Medium: multiple functions working together, such as parsing a configuration and generating a report. Metrics are test-case pass rate and timeout rate.
- T3 Complex: cross-file changes or performance optimization, requiring adherence to existing conventions and, where necessary, presenting trade-offs. Metrics are regression pass rate, manual rework, and token consumption.
- T4 High difficulty: boundary conditions, exceptional paths, and concurrent scenarios. Metrics are extreme-case pass rate and explanation quality.
- T5 Comprehensive: open-ended tasks, such as completing a requirement, self-testing, and fixing defects within a small project that has a basic structure. Metric is end-to-end success rate.
The higher you go, the more obvious the capability differences become. On entry-level questions alone, multiple models may score closely; hard and very hard questions often determine real-world usability. This test focused on understanding the actual performance and stability of the model’s newest version, and this is precisely why hard questions are the dividing line.
5. Cost and cost-effectiveness: writing “cost-effectiveness” as a formula
Whether something is “cost-effective” must be quantified, and can be defined as the combined cost per successful task:
cost per successful task = (model call cost + context and retrieval cost + retry and rework cost + human review cost) / number of successful tasks
The four types of cost come from:
- Model call cost: input and output tokens are priced separately, and in long conversations history is repeatedly carried in, so the input portion keeps accumulating.
- Context and retrieval cost: codebase indexing, document retrieval, and feeding back tool-call results all count as hidden overhead.
- Retry and rework cost: failed tasks are billed the same way, and consumption multiplies when stuck in a loop.
- Human cost: the time spent reading, reviewing, patching, and accepting the work is often the largest single item in the whole calculation.
A low-cost model that repeatedly fails can end up costing more than a mid-tier model that succeeds on the first try. Using a manual hourly rate of RMB 100 as an example, if a task’s call cost is only RMB 0.5 but a human spends 10 minutes on review and patching, that comes to RMB 16.7. In other words, human cost is more than 30 times the call cost. At this point, how much cheaper the model itself is barely affects the conclusion; reducing human involvement is the main lever for cutting costs.
To make results statistically comparable, it is advisable to define a unified result-recording format for each evaluation run:
{"run_id": "eval-20261110-01","task": {"id": "T3","difficulty": "hard","time_limit_min": 30,"network": "off"},"result": {"status": "pass","first_try_pass": false,"elapsed_min": 6.5,"rounds": 4,"input_tokens": 48210,"output_tokens": 7630,"tool_calls": 12},"review": { "manual_min": 8, "rework_lines": 23 },"environment": { "host": "agent-coding-host", "model_version": "vX.Y" }}
Building on this, you can also calculate a combined score for each task:
combined score = 100 × [0.30 × pass status + 0.20 × (1 − first-try failure rate)+ 0.15 × efficiency score + 0.25 × cost score + 0.10 × human-effort score]where:pass status = 1 for full pass, 0.5 for partial pass, 0 for failefficiency score = clamp(1 − (per-question time − 5) / (time limit − 5), 0, 1)cost score = clamp(baseline unit cost / this task's unit cost, 0, 1)
Both the weights and the parameters should be calibrated by the team according to business goals, and fixed along with the version of the evaluation set, to ensure comparability across versions.
6. Interpreting results: avoiding five common misreadings
- Drawing a conclusion from one run: a single result only reflects performance on specific questions at a specific moment, so run at least three rounds at three different points in time and take the median.
- Averages hide long tails: failures are concentrated in the tail tasks, so while the median total time may look good, the tail tasks are the real source of risk. Timeout rate and failure rate should be tracked separately.
- Comparing across different environments: change the host environment, whether networking is allowed, or whether the prompts are the same, and the conclusion can reverse. Cross-environment comparisons are meaningless.
- Treating the evaluation set as a product spec: once a public question set flows into training data, scores will be inflated. Internal evaluation sets should be maintained privately, replaced periodically, and supplemented with a batch of never-before-published new questions.
- Watch out for “brand preference” and self-report bias: if the reviewer knows who is being tested, scores are easily influenced by expectations, so blind evaluation should be used. A model saying “I think I did a good job” also does not equal passing the test.
7. Putting it into practice: embedding evaluation into the development workflow
- Tiered routing: route models by task complexity, for example assigning comment generation and simple refactoring to lightweight models and complex design to more capable models, achieving overall optimum at low cost.
- Continuous evaluation: integrate the question set into the CI pipeline and automatically rerun it on every model version upgrade to prevent regressions.
- Observability: record token consumption, rounds, elapsed time, and failure reasons for every session, and use logging services and monitoring/alerting to detect anomalies, such as repeated failures on a single task or a sudden surge in loop calls. Evaluation results and logs can be archived to object storage or a cloud database for version traceability and comparison. On platforms such as Baidu AI Cloud, general-purpose products like object storage, logging services, monitoring and alerting, and container platforms can provide the support without customization.
- Security and compliance: code may contain internal assets, so for confidential projects prioritize a dedicated environment and follow the principle of least privilege, granting access only to the necessary directories and tools.
- Human-machine collaboration: automated test passing is only the baseline; code review and security scanning remain indispensable.
8. Conclusion
Back to the original question: how should you judge a new model’s real capability and cost-effectiveness? The answer is not in the hype, nor in a single experience, but in a well-designed answer sheet, including a locked-down environment, a transparent process, and quantifiable metrics. In that time-boxed live test, the model completed identity awareness in just 1 minute 14 seconds and clearly explained its information sources, and this way of answering is itself part of the answer: explainable, traceable, and reviewable — that is the real standard enterprises can rely on when selecting.
