How to Evaluate Large Language Models: From Hallucination to Engineering Reliability
A fluent answer is not a reliable one. This article examines three common failure patterns in LLM applications—rewritten citation links, cross-session memory misuse, and reasoning that ignores unstated assumptions—and shows how developers should evaluate models through scenario-based testing, evidence management, and system-level safeguards rather than abstract rankings.
How to Evaluate Large Language Models: From Hallucination to Engineering Reliability
1. Why “The Strongest Model” Is Not a Rigorous Technical Conclusion
When a model can explain complex topics at length, respond naturally to user emotions, and complete seemingly difficult analytical tasks, people are quick to judge it as “the most capable.” But expressiveness, knowledge coverage, reasoning ability, and engineering reliability are not the same thing.
Three widely discussed incidents illustrate this gap: a user-provided link was silently replaced with a different URL; step-count information from a travel conversation repeatedly surfaced in unrelated discussions; and a classic problem—a pole passing through a city gate—was reduced to an unexplained two-dimensional calculation. These incidents deserve investigation, but scattered anecdotes alone cannot prove that one model is broadly ahead or behind.
For developers, more valuable questions are: On which tasks is the model reliable? Where does it tend to fail? Can failures be detected? And can the surrounding system prevent errors from entering business processes?
Evaluating LLMs should therefore shift from vague rankings to scenario-based judgment. A model suited to creative writing is not necessarily suited to strict citation of sources; a model strong at knowledge Q&A may not reliably handle spatial constraints or cross-session memory. “Strong” must always correspond to specific tasks, constraints, and acceptance criteria.
2. Rewritten Links: More Than Just Text Hallucination
2.1 A Link Is an Evidence Identifier, Not a Sentence You Can Freely Polish
When a user submits a URL, they typically expect the system to read, analyze, or cite that specific source. If the model returns a different address yet still explains things as if working from the original source, the problem goes beyond ordinary wording errors—it touches the integrity of the evidence chain.
Such anomalies can occur at multiple stages: the model never actually fetched the content and guessed based on the URL text; the retrieval component returned a similar but different page; the page redirected; the application layer modified parameters when handling the address; or the generation stage blended the real address with one from memory.
You cannot conclude, based on the final answer alone, that the model itself caused all problems. A complete diagnosis must distinguish the user’s original input, the actual requested URL, the post-redirect URL, the content successfully fetched, and the final cited address.
2.2 “Failed to Access” and “Successfully Read” Must Be Clearly Distinguished
A reliable system should distinguish at least the following states:
- The source has not been accessed yet;
- Access was attempted but the request failed;
- The page was fetched but content extraction failed;
- Content was obtained but is insufficient to support a conclusion;
- Sufficient evidence was obtained and analysis can proceed.
If the system never obtained the content, it should not behave as if it had read the source. Reasonable degradation options are to explain the limitation, ask the user to paste relevant content, or analyze only the information clearly visible in the URL string—while labeling that boundary of evidence.
This is not about weakening the model. It is about preventing fluent expression from masking actual information gaps.
2.3 Keep Critical Identifiers Out of Generated Content
Fields such as source URLs, order numbers, file paths, and business record identifiers should not rely entirely on the model regenerating them. A safer approach is for the application layer to persist the original values, with the model selecting only verified reference identifiers and the program rendering the corresponding sources.
A common pipeline looks like this:
User submits source → Input safety check → Fetch and parse → Persist source record → Model generates based on evidence → Program validates citations → Output result
URL checking should also respect permission and security boundaries: restrict allowed protocols, block unauthorized access to internal networks, and review redirect targets. Source accuracy and access security must be ensured together.
For output citations, verify that they belong to the set of sources allowed for that session. If the model introduces a source that was never fetched, not authorized, or unverifiable, stop the output or explicitly flag the missing evidence—rather than presenting it as a reliable conclusion.
3. Cross-Session Information Misuse: When Personalization Becomes Interference
3.1 “Remembering” Is Not the Same as “Using Correctly”
A user once mentioned walking about 35,000 steps in a day during a travel consultation. If the system subsequently references that experience repeatedly in unrelated tasks—such as financial analysis or public affairs discussions—it has failed to judge the applicable scope of that information.
Three layers need to be distinguished here:
- Current conversation context: used to understand the current exchange;
- Cross-session memory: user information the application persists and retrieves later;
- Expression strategy: the system’s decision on whether and how to weave that information into the answer.
A repeated form of address does not by itself prove the base model has permanent memory. The application may re-inject conversation summaries, account preferences may be stored, or there may be context splicing or session isolation issues. When troubleshooting, inspect the final context passed to the model—not just the conversation list shown in the UI.
3.2 Memory Should Have Types, Sources, and Scopes of Use
A one-off travel experience and a long-standing language preference obviously should not follow the same storage and retrieval strategy.
User information can be categorized as:
- Stable preferences, such as wanting concise answers or a particular depth of explanation;
- Phase-based state, such as an ongoing learning project;
- One-time events, such as a long walk on a specific day;
- Sensitive information, such as health, financial, or identity-related data.
Each memory record should also carry its source, creation time, applicable scenarios, and whether cross-session use is permitted. One-time events generally should not be automatically promoted into long-term profiles; sensitive information requires stricter authorization, access control, and deletion mechanisms.
Retention periods should not be one-size-fits-all. Phase-based state should have expiry conditions, one-time events should not be retained long-term, and users should be able to view, correct, and delete their information.
3.3 Relevance Must Come Before Personalization
Before invoking historical information, the system should ask: Would this information substantively change the current answer?
If the user asks how to relieve discomfort after a long walk, the walking history is relevant. If the user asks for an explanation of a financial statement, that experience has no place in the answer.
A useful principle: if deleting the memory would not noticeably degrade the answer, there is no reason to force it in.
Also, a repeatedly used endearment may be an out-of-control expression strategy rather than a factual memory error. In engineering terms, test “whether irrelevant information is being invoked” and “whether fixed phrasing is being repeated” as separate problems—do not conflate the two.
4. The Pole Through the Gate: Reasoning Ability Starts with Modeling Ability
4.1 A Correct Calculation Does Not Mean a Correct Model
A classic problem: can a 5.5-meter pole pass through a rectangular gate that is 4 meters high and 3 meters wide?
If the pole is treated as a line segment that must lie entirely within the plane of the opening, the rectangle’s diagonal is:
√(4² + 3²) = 5 meters
Under that specific constraint, a 5.5-meter segment cannot fit entirely within the rectangle. The calculation itself is correct.
But “passing through the gate” does not necessarily mean “the entire pole lies within the plane of the opening simultaneously.” Real passage is a three-dimensional motion: the pole can change orientation and move through the space in front of and behind the opening.
If the pole is thin enough, the space on both sides is sufficient, and there are no other obstructions, it can pass approximately perpendicular to the plane of the opening. In that case, the rectangle’s diagonal in the opening plane is not the binding limit on the pole’s length.
4.2 The Real Answer Depends on the Constraints
A complete answer requires knowing at least:
- Whether the pole is treated as an ideal line segment with zero thickness;
- Whether the opening has significant thickness;
- Whether walls, corners, or narrow passages exist in front of or behind the gate;
- Whether the pole may be tilted and rotated;
- Whether the carrying process is constrained by the positions of people or available floor space.
If there are narrow corridors, corners, or limited maneuvering space, the problem becomes one of rigid-body motion and collision constraints, and the opening’s dimensions alone are insufficient.
A more rigorous answer should therefore state upfront: if constrained to lie within the plane of the opening, no; if allowed to pass through three-dimensional space with ample maneuvering room and a sufficiently thin pole, yes; if other obstructions exist, more conditions are needed.
4.3 Recognizing Ambiguity Matters More Than Applying Formulas
Reasoning benchmarks should check not only whether the model computed “5 meters,” but whether it recognized that the problem admits multiple reasonable interpretations.
Similar issues arise in business tasks. “Sufficient inventory” may mean book inventory or sellable inventory; “order completed” may mean paid, shipped, or signed for. If the model does not clarify definitions, even perfectly correct downstream calculations can produce business-wrong conclusions.
The first step of high-quality reasoning is confirming variables, constraints, and objectives—not immediately reaching for a familiar formula.
5. Building a Business-Oriented Evaluation Framework
5.1 Replace Single-Question Impressions with Real Tasks
Enterprises should draw test samples from actual workflows and group them by risk and task type:
- Source Q&A: can conclusions be supported by the input material?
- Citation tasks: are source identifiers accurate? Any unverified citations?
- Reasoning tasks: are assumptions complete? Is ambiguity recognized?
- Multi-turn dialogue: is state updated correctly?
- Cross-session tasks: is unrelated history misused?
- Structured output: do fields, types, and required items meet constraints?
- Safety tasks: does the system degrade correctly when permissions or evidence are insufficient?
Evaluation sets should include normal cases, boundary cases, and deliberately planted distractors, with a held-out test set retained to prevent over-tuning the system to pass a small number of known questions.
5.2 Track “Correct” and “Trustworthy” Separately
At minimum, monitor separately:
- Task completion rate;
- Share of conclusions supported by evidence;
- Frequency of unsupported statements;
- Consistency between citations and source records;
- Incidents of irrelevant memory invocation;
- Ambiguity recognition and clarification behavior;
- Response time and resource consumption;
- Human correction effort required.
Evaluation should also distinguish “correct refusal” from “failed task.” When evidence is insufficient, proactively stating the limitation is often more aligned with reliability requirements than fabricating a complete answer.
For generative tasks with inherent randomness, run multiple trials to see whether errors reproduce stably. Fix the sources, context, tool permissions, and application version during testing to avoid mistaking environmental changes for model differences.
5.3 Set Acceptance Thresholds by Error Cost
Slight wording deviations in marketing copy and incorrect citations in contract review do not carry the same risk. Enterprises should set different validation and human review requirements based on business consequences.
High-risk scenarios should prioritize whether severe errors are caught—not overall average performance. A system with a high average accuracy that occasionally produces untraceable conclusions is not necessarily fit for critical decision-making pipelines.
6. From Model Capability to System Reliability
LLMs can participate in understanding, summarizing, and generating, but they should not shoulder all factual verification and business execution alone.
A more reliable application typically requires four kinds of safeguards:
First, input governance. Define source boundaries, user permissions, and task constraints, and prevent context from leaking across users or business lines.
Second, evidence governance. Separate source records from generated text, retain traceable grounds for important conclusions, and explicitly mark anything that cannot be verified.
Third, output governance. Use programmatic checks for citations, structure, numeric ranges, and business rules. Problems solvable by deterministic validation do not need to be left entirely to the model.
Fourth, operational governance. Log the necessary error classifications and handling outcomes, configure monitoring alerts, human review, and rollback mechanisms, and follow data-minimization principles to avoid excessive retention of sensitive data in logs.
After launch, continuously monitor signals such as source mismatches, irrelevant memory invocations, format errors, and user corrections. Any prompt change or model version switch should go through regression testing to confirm that old problems have not resurfaced.
7. Conclusion: What Is Truly Worth Pursuing Is Verifiable Reliability
Judging the strength of a large language model means never equating fluent expression with factual accuracy, and never treating a single success or failure as a verdict.
Rewritten links remind us to focus on the evidence chain; cross-session information misuse reminds us to focus on memory boundaries; the pole-through-the-gate problem reminds us to focus on modeling and assumptions. Together, these three failure modes make one point clear: a reliable intelligent system must not only generate answers—it must know what its answers are based on, under what conditions they apply, and when it should withhold a definitive conclusion.
For developers and enterprises, the sensible goal is not hunting for an abstractly “strongest model,” but building a system that works stably in specific business contexts—where errors are detectable, processes are traceable, and risks are controllable. Only through scenario-based evaluation, engineering constraints, and continuous verification can model capability be converted into genuinely usable productivity.
