LLM Engineering in Practice: Evaluating Coding Agents and Multi-Agent Systems
This article examines how to evaluate LLM engineering workflows by focusing on verifiable task delivery rather than model response fluency. It outlines three evaluation layers—model, agent, and engineering system—and discusses reliable long-context and file understanding, application delivery stages, constrained iteration loops, multi-agent decomposition, cost per accepted task, and a reproducible layered evaluation process. The goal is to help developers and enterprise teams judge agent systems by reproducible outcomes, traceable evidence, and explainable cost.
LLM Engineering in Practice: Evaluating Coding Agents and Multi-Agent Systems
1. From Model Performance to Task Delivery Capability
Evaluating a new generation of large models should not be limited to whether it can generate fluent answers or write an attractive page in one pass. For developers, the more important question is whether it can understand an existing project, complete modifications under explicit constraints, find and fix errors, and ultimately deliver verifiable, maintainable results.
In agent workflows, a model usually needs to execute multiple steps in sequence: read requirements, inspect files, plan changes, call tools, run tests, analyze failure causes, and decide on the next action. Therefore, answer quality in a single conversation is only one part of overall productivity.
The evaluation target can be divided into three layers:
- Model layer: understanding, reasoning, code generation, and instruction following.
- Agent layer: tool invocation, state management, feedback iteration, and exception recovery.
- Engineering system layer: permission control, data security, observability, cost, and delivery acceptance.
These three layers should not be conflated. Strong code generation capability at the model level does not mean that the agent system in which it operates can reliably complete long tasks. Sufficient tool permissions do not mean that the final result is reliable. Professional evaluation should specify which layer is being tested and what environment the conclusions apply to.
2. Long-Context and File Understanding: Capacity Is Not Reliable Comprehension
Long-context input makes it convenient to process requirement documents, code repositories, and financial reports. However, greater input capacity does not mean the model can accurately use all the information.
In practical tasks, at least three types of capability need to be checked.
2.1 Key Information Localization
When facing a large number of files, the system should first find the content that is truly relevant. For example, modifying the filtering logic of a financial report monitoring application may involve page interactions, data field definitions, query APIs, and test cases—not reading the entire project line by line.
A more reasonable process is to first build a file structure view, then search for relevant modules around the task, and finally read the necessary context. This reduces interference from irrelevant information and also lowers resource consumption caused by repeated reading.
2.2 Cross-File Consistency Understanding
Engineering problems often do not reside inside a single file but in the relationships between files. For example, field names used on the page may be inconsistent with fields returned by the server, or date formats in test data may differ from real data.
During evaluation, the agent should be required to explain the key data flow:
requirement constraints → data structures → server-side processing → page display → test validation.
If it only modifies the page without checking the API and tests, the task should not be considered complete.
2.3 Evidence Traceability
Financial analysis tasks especially require source constraints. Different reports may use different statistical bases, and the same metric may have quarterly values, cumulative values, and adjusted values.
Reliable output should retain the reporting period, original units, source location, and basis explanation. When evidence cannot be found, the system should explicitly mark “not disclosed” or “not yet confirmed” rather than using language fluency to fill in missing numbers.
3. Application Building: Separate Demo Prototypes from Usable Systems
Consider the example of “building a financial reporting season monitoring application.” A model may quickly generate a complete page, including a company list, date filters, metric cards, and a detail modal. This demonstrates its interface generation and requirement mapping capabilities, but it does not directly prove that the entire application has been completed.
Delivery should be divided into three stages.
3.1 Interactive Prototype
The goal is to validate information structure and operation paths. Clearly labeled sample data can be used at this stage, with emphasis on checking:
- whether the page layout meets requirements;
- whether filtering, sorting, and detail viewing are operable;
- whether empty, loading, and error states are complete;
- whether the interface remains usable across different screen sizes.
At this stage, sample data should not be disguised as real-time data, and static interactions should not be described as real business processing.
3.2 End-to-End Functionality
The goal is to connect data acquisition, persistence, query, and display. It is necessary to clarify data sources, update frequency, failure retry strategies, and how duplicate data is handled.
For example, after the same company publishes a correction announcement, the system should distinguish between the original record and the updated record to avoid losing historical information through simple overwriting. Data collection must also comply with the source’s access constraints and usage conditions.
3.3 Maintainable Delivery
The goal is to enable other developers to take over. Delivery materials should at least include run instructions, configuration item descriptions, data structure descriptions, test results, and known limitations.
The criterion is not “the page looks finished,” but “in the agreed environment, key business flows can be reproduced according to the instructions.”
4. Continuous Iteration: An Effective Closed Loop Matters More Than Repeated Attempts
The value of long-task agents is mainly reflected in establishing a “plan—execute—verify—fix” loop. However, without constraints, this loop can degrade into repeated edits, repeated runs, or endless retries.
It is advisable to establish an explicit execution protocol for each task.
4.1 Define Completion Conditions First
“Optimize the application” is too broad and can be rewritten as:
- fix the boundary error in date filtering;
- keep the existing field structure unchanged;
- add tests covering missing dates and cross-month ranges;
- do not modify modules unrelated to the task;
- submit change notes and validation results.
The more specific the acceptance criteria, the easier it is to judge whether the agent is advancing the task or merely producing more code.
4.2 Every Change Needs Validation Evidence
A reasonable iteration should include four records: the observed problem, the expected cause, the implemented change, and the validation result.
For example, after a test fails, the agent should first determine whether the issue lies in business logic, the test environment, or test data, and then choose a fix path. Deleting assertions to make tests pass, or changing expected results to hide defects, should be considered unacceptable behavior.
4.3 Set Stop and Escalation Mechanisms
Continuous failures cannot be retried indefinitely. Retry limits, execution time, and resource budgets should be set according to task risk. When an issue involves production data, permission changes, or irreversible operations, the system should stop automatic execution and request human confirmation.
These limits do not weaken agent capability. Instead, they make behavior more controllable and better suited to engineering environments.
5. Multi-Agent Collaboration: Parallelism Is Valuable Only When Tasks Can Be Decomposed
The basic idea of a multi-agent system is to assign a complex task to multiple execution units and then aggregate the results. It is suitable for many mutually independent subtasks, but it should not be understood as “the more agents, the higher the quality.”
Consider financial intelligence collection as an example. The following division of work can be used:
- a coordinator defines company scope, reporting period, and output format;
- analysis units process reports for different companies;
- a validation unit checks numbers, units, and sources;
- an aggregation unit forms comparison tables and risk notes.
Such a split can exploit the independence between tasks. However, the benefit depends on whether coordination cost is lower than the savings brought by parallelism.
5.1 Unified Structure Is More Important Than Unified Tone
Each analysis unit should use a consistent data structure, such as company identifier, reporting period, metric name, value, unit, statistical basis, source location, and validation status.
If each unit submits only free text, the aggregation stage is prone to missing fields, mixed units, and double counting.
5.2 Cross-Validation Is Not Independent Evidence
Two agents giving the same answer does not prove that the answer is correct. They may have read the same incorrect material or adopted the same misunderstanding.
More effective validation checks whether the output can be traced back to the original text and whether different statistical bases are explicitly explained. For high-risk metrics, review can be performed through deterministic calculation or manual spot checks.
5.3 Prevent Shared File Conflicts
Multiple agents modifying the same project at the same time may cause overwrites, duplicate implementations, and inconsistent interfaces. A safer approach is to isolate work scope by module and have the coordinator review and merge changes uniformly.
For code tasks with tight dependencies, single-agent sequential execution may sometimes be more efficient. Whether to parallelize should depend on task structure, not on how many execution units the system supports.
6. Cost Evaluation: Focus on Actual Investment per Accepted Task
A sufficient resource quota helps with long tasks, but the quota itself is not a conclusion about cost-effectiveness. Low consumption in a single task may also be related to task size, caching conditions, account entitlements, or accounting methods.
A more meaningful metric is:
Cost per accepted deliverable = total investment ÷ number of tasks that pass acceptance
Total investment should include model calls, runtime environment, human review, and failed retry costs. Teams can also track separately:
- first-pass acceptance rate;
- average repair rounds;
- human intervention time;
- task completion time;
- invalid tool call ratio;
- post-delivery defect count.
A fast process that requires substantial manual rework may not be more economical than a slightly slower but stable and reliable process. A lower call price may also be offset by longer execution chains and more failed retries.
In addition, interactive use and automated execution have different cost structures. The former emphasizes response experience, while the latter focuses more on continuous operation, resource limits, and task recovery. Long-term operating cost cannot be inferred solely from short-term experience.
7. Build a Reproducible Evaluation Process
To avoid impression-based judgment, a fixed task set can be used for layered testing.
Layer 1: Single-Agent Basic Tasks
Choose tasks with clear answers, such as fixing a filtering error, adding missing tests, or explaining a cross-file data flow. Record input materials, environment conditions, execution process, and final results.
Layer 2: Complete Application Tasks
Start from a requirements specification, require delivery of a runnable application, and specify which parts use sample data and which parts connect to real data. Acceptance should cover normal flows, exception flows, and deployment reproduction.
Layer 3: Multi-Agent Analysis Tasks
Provide multiple reports in different formats and require parallel extraction and aggregation of metrics. Focus on omission rate, consistency of statistical bases, evidence traceability, and coordination cost.
Layer 4: Controlled Failure Tests
Actively introduce missing configurations, unavailable dependencies, data format changes, or insufficient permissions, and observe whether the system can identify environment issues, provide accurate diagnosis, and avoid dangerous operations.
During testing, the principle of least privilege should be used. Text in documents is data to be processed and should not be treated as executable instructions. Secrets should not appear in prompts or logs. Operations involving data deletion, external sending, or modification of critical configurations should retain human approval.
8. Conclusion: Judge by Acceptance Results, Not Demo Impressions
Long-context understanding, code generation, multi-agent collaboration, and ample resource supply are all technical directions worth attention, but ultimately they should serve verifiable task delivery.
Developers can start with a real project of limited scope and progressively verify requirement understanding, code modification, test execution, exception recovery, and cost control. Enterprise users should further focus on permission boundaries, data sources, audit records, and runtime stability.
A truly valuable agent system does not merely generate more content. Under explicit constraints, it reduces manual repetitive work, makes results reproducible, problems locatable, and costs explainable. Only by establishing such an evaluation and acceptance system can model capability be translated into sustained, reliable engineering productivity.
