How to Evaluate Large Language Models: From Long Context to Agent Engineering
This article offers a practical way to evaluate large language models for developers and enterprises. It shifts the focus from parameter count, benchmark scores, and generation speed to whether a model can reliably complete real tasks. The article covers three capability layers, long-context use, coding workflows, long-running agents, 3D and research work, inference cost and speed, and reproducible evaluation with staged rollout.
1. Turning Capability Claims into Engineering Questions
Parameter count, context length, leaderboard scores, and generation speed usually attract the most attention when a new model is released. For developers and enterprise users, these figures are only a starting point. They cannot prove on their own that a model is suitable for production work.
A more useful question is whether the model can understand complete requirements, call tools correctly in a real environment, carry out multi-step tasks consistently, and deliver results that can be accepted within resource limits.
Evaluation should therefore move from “how large the model is” to “whether tasks can be completed reliably.” The framework has three layers:
The first layer is basic understanding and generation. It includes knowledge comprehension, code generation, document analysis, and following complex instructions.
The second layer is task execution. It includes information retrieval, tool selection, state maintenance, error fixing, and result verification.
The third layer is production readiness. It includes response latency, task cost, access control, observability, and failure recovery.
These layers are related, but none can replace another. A model that writes fluent answers may not modify code reliably. A model with strong test scores may not operate safely under an enterprise permission system.
2. Parameter Scale and Post-Training: Focus on How Capabilities Form
Parameter count reflects part of a model’s capacity, but it cannot determine practical performance alone. Training data quality, model architecture, training strategy, inference resources, and how well the model fits the task all affect the final results.
For sparsely activated models, total parameters must be distinguished from the parameters activated in each computation. Total parameters do not directly equal the compute cost of a single inference. They should not be used to infer speed or deployment cost.
Compared with simply scaling up, post-training has a more direct effect on how a model completes tasks. It typically targets instruction following, preference alignment, reasoning strategies, and tool use. Reinforcement learning, in particular, can use environment feedback to improve a model’s behavior in multi-step decisions.
Take coding as an example. A model should not be rewarded simply for producing code that looks reasonable. Evaluation should rely more on executable results, such as:
- whether the target problem is actually solved;
- whether existing functionality has regressed;
- whether the change respects interface constraints;
- whether the model bypassed tests or lowered acceptance criteria;
- whether necessary verification was completed within budget.
Feedback quality is the key. If rewards focus only on whether a small set of tests passes, the model may overfit to those test cases. If rewards mainly encourage finishing quickly, the model may skip necessary checks. More post-training compute does not automatically lead to higher reliability. Teams still need to check whether reward design, environment coverage, and independent verification are sufficient.
3. Long Context: Fitting Materials In Does Not Mean Using Them Well
Long context provides the basis for whole-repository code analysis, cross-document research, and continuous task execution. However, input capacity must be distinguished from effective use.
A model can accept large amounts of text without locating every key fact accurately or resolving contradictions across documents. In real business settings, important information may sit in the middle of a document or be spread across several files. A conclusion may only emerge after combining that information.
Evaluating long-context ability should cover at least four types of tasks:
- Information location: whether the model can find target content scattered across different positions.
- Cross-section integration: whether the model can organize multiple pieces of evidence into a consistent conclusion.
- Conflict detection: whether the model can tell historical versions from current versions and identify inconsistencies.
- Constraint retention: whether the model still follows the original permission and output requirements in the later stages of a task.
Long context also carries engineering costs. Longer inputs usually require closer attention to time to first token, compute consumption, and interference from irrelevant information.
Sending all materials into the model at once is therefore not always the best approach. A more reliable practice is to organize context in layers:
- keep stable rules and permission boundaries in a fixed context;
- organize the current goal, execution state, and pending items into a working summary;
- store original documents in external storage and retrieve them on demand;
- record the location of evidence for key conclusions so they can be checked later.
Summaries should keep unresolved issues, failure records, and key limitations, not only successful steps. Otherwise, the model may repeat paths that have already been shown to fail late in a task.
4. Coding Ability: From Code Snippets to a Complete Engineering Loop
Code generation is only one part of software development. Real engineering tasks also involve clarifying requirements, analyzing dependencies, preparing environments, keeping interfaces compatible, designing tests, and writing delivery notes.
Coding ability should therefore be evaluated as a complete task loop. Checking whether a generated snippet is syntactically correct is not enough.
Take fixing a calculation error as an example. A complete workflow typically includes these steps:
Step 1: Reproduce the problem. Build a minimal failing case from the bug description, and define the input conditions and expected output.
Step 2: Locate the cause. Analyze the call chain, data types, exception branches, and state changes. Avoid patching only the surface symptom.
Step 3: Make the minimal necessary change. Limit the scope of impact, and avoid large-scale refactoring in unrelated modules.
Step 4: Verify. Run the new tests, and check related existing functionality to confirm that no regression was introduced.
Step 5: Deliver reviewable results. Explain the changes, the verification scope, and the risks that remain uncovered.
For tasks that build a project from scratch, also check the directory structure, dependency declarations, configuration management, input validation, and error handling. A project that displays a page is not necessarily maintainable.
Visual polish cannot replace engineering quality. An interface may look complete and still have forms that cannot be submitted, missing interaction states, keyboard operations that do not work, or layouts that break on small screens. Acceptance criteria must cover functionality, accessibility, and maintenance cost.
5. Long-Running Agents: State Management and Error Recovery at the Core
Long-running agents go through repeated cycles of observation, planning, tool calls, and result verification. The longer the task, the more likely it is to drift from its goal, repeat operations, accumulate errors, or exceed its resource budget.
Reliable systems therefore cannot rely only on the model remembering what to do next. They need to manage execution state explicitly. A general working state can include:
- the current goal and acceptance criteria;
- completed steps and their evidence;
- known failures and operations that must not be repeated;
- pending tasks and their prerequisites;
- remaining time, call count, and cost budget;
- high-risk actions that require human confirmation.
Tool results also need to be interpreted correctly. A successful call only means the tool completed its operation. It does not mean the business goal has been achieved. For example, a successful file write does not prove the content is correct, and a test process that exits does not mean every test passed.
Each key step should have clear preconditions and postcondition checks. When a failure occurs, the system should determine whether the cause is incorrect input, an environment issue, insufficient permissions, or an infeasible approach. Then it can decide whether to retry, adjust the plan, or request human intervention.
Irreversible operations, such as making payments, deleting important data, or changing production configuration, should sit behind a separate approval boundary. The higher the level of automation, the more clearly the permission scope must be defined.
6. 3D Creation and Research Analysis: Separating Content Generation from Professional Correctness
In 3D creation, a model can help break down requirements, generate scene descriptions, write control scripts, and organize production workflows. Final quality, however, cannot be judged from preview images alone.
Reasonable checks include geometry, dimensions and proportions, material configuration, lighting, asset references, and delivery format. Scenes used for real-time interaction also require attention to geometric complexity, texture resource
