Evaluating LLMs in Practice: From Long Context and Coding Agents to Factual Reliability and Multimodal Deployment
This article presents a practical framework for evaluating large language models beyond leaderboard scores. It turns “capability” into verifiable questions across foundational skills, task execution, and business delivery; examines long-context use, coding-agent outcomes and costs, factual reliability, multimodal reasoning, Chinese-language quality, and enterprise deployment constraints; and recommends continuous regression testing with clear evidence, permissions, and auditability.
1. Evaluating LLMs Starts by Turning “Capability” into Verifiable Questions
When developers assess a new generation of large language models, the first concern is usually not parameter scale but a set of practical questions: Can it understand a large codebase? Can it make cross-file changes? Does it fabricate facts? Can it understand images and audio? How much time and cost does it take to complete the same task?
These questions are related, but they cannot be replaced by a single composite score. Strong long-context capability does not guarantee that a model can correctly locate a fault. A cautious answer does not mean that knowledge coverage is sufficient. Fluent language does not mean that generated code will pass tests.
Evaluation should therefore shift from “ranking comparison” to “task acceptance.” A complete evaluation system should distinguish at least three layers:
- Foundational capability layer: information retrieval, logical reasoning, code generation, visual understanding, audio understanding, and language expression.
- Task execution layer: whether the model can call tools, use feedback, handle exceptions, and complete multi-step goals.
- Business delivery layer: whether results meet requirements for quality, safety, latency, cost, and maintainability.
The specific scores, costs, and case studies in the source material lack verifiable test conditions and should not be treated directly as technical conclusions. A more valuable approach is to abstract these observations into evaluation dimensions and validate them through a unified process.
2. Long Context: Fitting Information In Is Not the Same as Using It
Context Capacity and Effective Utilization Are Two Different Things
A context window represents the range of information a model can receive in a single processing pass, but it does not directly equal effective memory.
When faced with a large number of documents or code files, a model may correctly find a keyword but fail to establish dependencies between multiple locations. It may remember the beginning and end while missing important constraints in the middle. Long-context tests should therefore check not only whether the model “found the answer,” but also whether the answer is supported by the correct evidence.
At least three types of tests should be set up:
The first is single-point localization, such as finding the default behavior of a configuration item in a large set of documentation. This mainly tests information localization.
The second is multi-point association, such as reading an interface definition, calling code, and change record at the same time to determine whether a change affects compatibility. This tests cross-location integration.
The third is dependency-chain reasoning, such as tracing function calls, permission checks, and data transformation paths to locate the source of an anomaly. This is closer to real development work and more likely to expose a model that only captures local information.
Tests Need to Control Interference and Evidence Position
If the correct answer is always at the beginning of the material, the test can easily overestimate model performance. A more reasonable approach is to distribute evidence across different positions and add similar-sounding but inapplicable distractors.
Each test sample should include:
- The input material and its version;
- A clear question and output requirements;
- The correct answer or allowed answer range;
- The evidence locations supporting the conclusion;
- Easily confused counterexamples;
- Rules for judging pass or failure.
Scoring should check not only the final conclusion but also whether the cited evidence actually exists and is relevant to the current question. Especially in technical documentation, old-version notes and new-version constraints may conflict. The model must explain the scope of applicability rather than simply concatenate content.
Long Context and Retrieval Should Be Used Together
Putting all materials directly into the context reduces retrieval steps, but it may also increase input cost, response time, and noise. A retrieval approach can compress input, but it carries the risk of missed recall.
In practice, systems are often better served by a layered process:
“Task parsing → retrieve candidate materials → expand related dependencies → construct context → generate answer → verify evidence.”
For code tasks, the system can first locate the relevant module, then add interface definitions, callers, test cases, and configuration files. For document question answering, it can first retrieve relevant paragraphs, then retain section headings, versions, and contextual notes to prevent the model from misinterpreting isolated fragments.
3. Coding Agents: Focus on Delivery Outcomes, Not Generation Speed
Coding Capability Must Be Evaluated in a Closed Loop
There is a clear gap between generating plausible-looking code and completing a real development task.
A real coding agent needs to understand requirements, inspect project structure, propose changes, edit files, run tests, analyze failures, and continue fixing when necessary. A failure at any step can prevent delivery.
Evaluation tasks can cover four typical scenarios:
- Implementing a new feature from requirements;
- Fixing an existing defect;
- Refactoring code without changing behavior;
- Adding tests for boundary conditions and exception paths.
Task acceptance should not rely only on “tests passed.” A model may modify test conditions, skip failing cases, or hardcode values to satisfy local samples. Acceptance tests therefore need to be protected, and key changes should be manually reviewed against the requirements.
Cost Should Be Calculated per Successful Task
A low cost per call does not mean the overall solution is cheaper. Frequent retries, repeated context transmission, tool execution, and human rework can all become major costs.
The following calculation can be used:
Total cost per task = model call cost + tool execution cost + compute and storage cost + human review cost + rework cost
Then calculate:
Cost per successful task = total cost of all evaluation tasks ÷ number of tasks passing acceptance
Failed tasks should be included in the numerator to avoid underestimating real spending by counting only successful cases. If no task passes acceptance, do not output a seemingly normal unit cost; instead, state directly that the current approach is not yet usable.
Time Metrics Should Separate Waiting from Delivery
A fast first response does not mean fast task completion. For multi-step agents, what users really care about is the time from submitting a requirement to receiving an acceptable result.
It is advisable to record first response time, tool waiting time, total execution time, and human review time separately, while also monitoring the median and higher percentiles. Averages can hide long waits caused by repeated retries on a small number of tasks, and those tasks often determine the actual user experience.
4. Factual Reliability: More Than a Hallucination Rate
Wrong Answers, Refusals, and Evidence-Backed Answers Need to Be Separated
If a model chooses not to answer a large number of questions, its apparent error rate may be low, but business usability may not be better.
Reliability evaluation should therefore record:
- Correct answers with supporting evidence;
- Correct answers with insufficient evidence;
- Incorrect answers;
- Reasonable refusals;
- Unnecessary refusals.
Answer coverage and the error ratio among answered samples should also be observed separately. Only by considering both metrics can we determine whether the model is reliably solving problems or reducing error statistics by avoiding them.
A Citation Existing Does Not Mean It Supports the Conclusion
Common risks include fabricated document fragments, irrelevant citations, presenting speculation as established fact, and confusing information from different times or versions.
Enterprise knowledge question answering should require the model to express facts and recommendations separately. For example:
“The document explicitly states…” is a factual statement and needs corresponding evidence. “We recommend adopting…” is a recommendation and needs to explain the reasoning basis and applicable premises.
If the material does not cover a question, the system should allow the model to clearly state that evidence is insufficient rather than forcing a complete answer. For conclusions involving permissions, funds, contracts, or critical production configurations, human review should also be added.
Reliability Requires Process Controls
Reducing errors cannot rely on prompts alone. More effective measures include limiting knowledge sources, retaining retrieval evidence, validating structured outputs, running deterministic rule checks, and separating high-risk operations from ordinary question answering.
For example, a model can generate configuration change suggestions, but before formal application they should still pass format checks, constraint validation, and approval workflows. The model proposes candidate solutions; the system enforces execution boundaries.
5. Multimodal Understanding: From Content Recognition to Cross-Modal Reasoning
Supporting Multiple Inputs Does Not Mean Equal Understanding Capability
Being able to accept images, audio, or video only means that the interface accepts these inputs. It does not prove that the model performs consistently across task types.
Audio transcription, environmental sound recognition, speaker diarization, and music structure analysis are different tasks. Image text recognition, object recognition, spatial relationship judgment, and multi-view reconstruction also need to be evaluated separately.
So-called native multimodality usually emphasizes that a model can jointly process information from multiple modalities. However, when the specific implementation is not transparent, technical approach should not be judged solely from marketing language, and it should not be inferred that all tasks are more accurate.
Audio Tests Should Avoid Text Leakage
When testing sound understanding, if the input also provides descriptive filenames, subtitles, or background hints, the model may rely on textual clues to arrive at the answer.
More reliable tests should remove extra hints as much as possible and require the model to output time positions and judgment bases. Test content can cover speech, non-speech sounds, background noise, overlapping speakers, and local events in long audio.
Evaluation should also align with business goals: meeting notes focus on content completeness and speaker attribution; equipment inspection focuses on abnormal sound localization; content moderation focuses on whether specific events are accurately identified. A successful case on one task cannot represent all audio capabilities.
Spatial Reasoning Needs to Verify Consistency and Executability
Inferring object states from multiple unordered photos is more complex than single-image recognition. The model needs to establish correspondences between different viewpoints and handle occlusion, repeated appearances, and missing information.
Testing should check three things: whether the reconstructed state is consistent with all photos, whether multiple reasonable explanations exist, and whether the output steps can actually be executed.
When information is insufficient to determine a unique state, reasonable behavior is to request additional viewpoints or state assumptions, rather than provide an overconfident operational path. For scenarios such as equipment operation and mechanical assembly, generated results also need confirmation by professionals or independent validation programs.
6. Chinese-Language Expression: Naturalness Is the Starting Point, Accuracy Is the Baseline
Chinese-language experience does affect model usability, but evaluation should not stop at “does it sound human?”
High-quality expression in technical scenarios should have consistent terminology, clear hierarchy, explicit conclusions, and visible uncertainty. What needs to be avoided is not certain fixed words themselves, but filler without information gain, repeated summaries, and exaggerated promises.
Tasks can be designed in different genres, such as incident reports, code review comments, API descriptions, and risk explanations for non-technical audiences, and then scored anonymously by reviewers. Scoring dimensions include accuracy, completeness, conciseness, actionability, and tone fit.
Technical articles or incident analyses should also distinguish “confirmed facts,” “current hypotheses,” “verification steps,” and “final conclusions,” so that fluent expression does not hide insufficient evidence.
7. Enterprise Deployment: Evaluation Must Match Deployment Boundaries
Define Tasks First, Then Decide Resource Allocation
Simple classification and field extraction differ from complex code analysis in model capability and resource requirements. Processing can be tiered by task risk, input size, and complexity.
Low-risk tasks should prioritize lower-cost processing paths. Tasks involving complex dependencies, cross-modal reasoning, or critical decisions should enter stricter reasoning and review processes. Tiering rules need to be validated through testing, not decided by intuition alone.
Tool Permissions Must Follow Least Privilege
Coding agents and business agents may access files, databases, or external services. Model output should not directly receive unrestricted execution rights.
It is advisable to isolate the execution environment, limit accessible directories and network scope, separate read and write permissions, and require human confirmation for high-risk actions such as deletion, publishing, and transfers. Instruction-like content in external documents should be treated as data to be analyzed and must not automatically override system tasks and security rules.
Logs Should Support Auditing and Protect Data
Evaluation and production environments should retain necessary execution traces, including input versions, retrieval results, tool calls, test results, latency, and failure reasons.
However, logs may contain source code, personal information, and business secrets. Redaction, access control, and retention-period management should be implemented. For cloud deployment, general identity authentication, transport encryption, storage encryption, and auditing mechanisms should also be checked. Model capability and data governance should not be conflated.
8. Build Continuous Regression, Not One-Time Selection
An executable deployment process can be divided into five steps:
First, collect representative tasks from real business scenarios and complete necessary redaction, avoiding a test set that contains only easy-to-demonstrate success cases.
Second, define the input, expected output, evidence requirements, failure conditions, and risk level for each task.
Third, unify tool permissions, compute resources, time limits, and human intervention rules so that different solutions are comparable.
Fourth, observe result stability through repeated runs while recording success rate, cost per successful task, delivery time, and human correction ratio.
Fifth, add real failure cases to the regression set. When the model version, prompts, retrieval process, or tool configuration changes, rerun key tests.
Ultimately, evaluating large language models should not stop at “which capability leads.” It should answer a more specific question: under given permission, data, and cost constraints, can the model reliably complete the target task and provide sufficiently clear evidence for human verification?
Long context, multimodality, and natural language expression broaden the boundaries of model capability, but reliable delivery still depends on retrieval, testing, review, and governance mechanisms. Valuable technical selection organizes these capabilities into a reproducible, auditable, and continuously improvable workflow.
