Evaluating LLM Engineering Capability: Benchmarking Instruction Following and Reasoning
This article proposes a scenario-based framework for evaluating large language models on real engineering work. It breaks coding ability into five distinct scenarios, turns vague complaints about instruction following into machine-checkable metrics such as constraint hit rate, out-of-scope change rate, rework rounds, and self-check effectiveness, and separates legitimate safety constraints from hallucinated over-engineering. It also covers measuring refusal rates in authorized security research, layered testing of multi-step mathematical reasoning, and folding quota consumption and queueing time into total cost. Readers get a reproducible evaluation skeleton, scoring criteria, and a practical path from one-off subjective impressions to a continuously running quality gate.
1. Define the Scenario Before Judging “Usability”
Evaluations of LLM coding ability often contradict each other because the word “usable” means something different to each evaluator. The picture becomes clear as soon as you split the scenarios apart:
- Everyday coding: completion, single-function implementation, error explanation. Measured by syntactic correctness and first-pass rate.
- Architecture and refactoring: cross-file changes, interface design, directory and dependency restructuring. Measured by stability under design constraints and minimality of the change.
- Long-horizon tasks: the closed loop from requirement to implementation to self-testing. Measured by whether the task is retained without mid-course drift.
- Complex reasoning: mathematical proofs, algorithm derivations, formal expression. Measured by self-consistency across multi-step chains.
- Authorized security research: code auditing, vulnerability reproduction, fix verification. Measured by refusal boundaries and accuracy of technical terminology.
It is entirely possible for one model to excel at scenario 1 while constantly “adding its own scenes” in scenario 2. That is not a mutual contradiction.
2. Turn “Instruction Following” into Acceptance Criteria
“Seems to have checked repeatedly, but still needs several rounds of rework” is a typical subjective description. To make it measurable, the implicit expectations in the prompt must be made explicit as an acceptance checklist:
- Constraint hit rate: the proportion of explicit constraints (language, framework version, naming conventions, forbidden dependencies) that are honored.
- Out-of-scope change rate: the number of files, abstraction layers, and configuration entries added without being requested.
- Rework rounds: the number of interaction rounds needed to meet the acceptance criteria. This is the metric closest to real cost.
- Self-check effectiveness: defect density that remains after the model claims it has “checked”.
A schematic evaluation skeleton (vendor-agnostic, attachable behind any model invocation interface):
def run_case(case, model_client):history = []for round_idx in range(MAX_ROUNDS):reply = model_client.chat(case.prompt, history)history.append(reply)result = run_checks(case.checks, reply) # compile, unit tests, static analysisif result.passed:return {"rounds": round_idx + 1, "violations": result.violations}return {"rounds": MAX_ROUNDS, "violations": result.violations}
The key point is that checks must be machine-decidable: does it compile, do the unit tests pass, was a forbidden dependency introduced, does the generated file list match expectations. Anything that can only be judged by human eyes cannot support cross-model comparison.
3. Separate Reasonable Constraints from Hallucinated Over-Engineering
A common complaint in engineering practice is that models produce “unrequested self-imposed limits and baffling designs.” These are actually two different problems and need to be attributed separately:
- Reasonable constraints: deliberately narrowing the implementation space for security, compatibility, or maintainability, for example refusing to concatenate query strings, insisting on parameterized access, or avoiding unnecessary new dependencies. This behavior should be treated as a positive signal.
- Over-engineering: introducing factories, event buses, and multi-layer configuration abstractions when the requirement is on the order of a hundred lines; or inventing runtime constraints that do not exist in order to avoid the task itself.
The test is straightforward: ask the model to write down, for every non-essential design decision, the verifiable consequence of “what would happen if we did not do this.” Anything that cannot produce a concrete failure scenario is redundant. Making this requirement part of the prompt usually reduces the out-of-scope change rate significantly.
4. Treat Refusal Rate as a First-Class Metric
In authorized code auditing, vulnerability reproduction, and fix verification, a rising refusal rate destroys usability outright: it delivers no security benefit, only task interruption. Evaluation should record three figures: full refusal rate, degraded answer rate (a correct but over-generalized conclusion), and effective answer rate. The usage boundary must also be explicit — all test targets should be systems you own or are authorized to test, and the evaluation set itself should strip operational details of real in-the-wild vulnerabilities, keeping only fix and verification level descriptions.
5. Test Complex Reasoning and Math in Layers
Math and proof tasks are good probes for multi-step reasoning because they have objective right and wrong answers and are hard to guess through pattern matching. Three layers are recommended:
- Derivation problems with a standard answer, to measure accuracy.
- Propositions with no existing proof in the literature that must be constructed from scratch, to measure genuine generation ability.
- Long-output tasks, for example writing a proof as a structurally complete English lecture note using standard math typesetting syntax, to measure long-range consistency and format adherence.
Scoring ignores writing style and looks at only three things: whether the proposition statement was altered, whether every step has a checkable justification, and whether the final conclusion closes against the premises. These problems have another value: they expose a “copying tendency.” If a model’s output overlaps heavily with existing literature while claiming an independent proof, it should be marked as a failure outright.
6. Count Quotas and Queueing in Total Cost
However strong a model is, its engineering value drops sharply if each task consumes too much quota or if peak hours mean long waits. Convert to monthly cost using “average consumption per task × daily task count,” and count queueing time as part of the delivery cycle. The engineering countermeasure is tiered routing: high-frequency, low-difficulty tasks go to a lightweight configuration, while complex reasoning and architecture tasks call the high-end model, combined with local caching and result reuse. This usually cuts consumption substantially.
7. Conclusion
Evaluating a model should not stop at adjectives like “garbage” or “very strong.” The actionable approach: build 30 to 50 in-house scenario cases, use machine-decidable acceptance scripts to compute first-pass rate, rework rounds, out-of-scope change rate, and refusal rate, then sample reasoning ability in layers by task difficulty, and finally convert quota consumption and queueing time into total cost. The resulting conclusions are reproducible and regression-testable, and can be re-run quickly after a model iteration — turning selection from a one-off subjective impression into a continuously running quality gate.
