Evaluating LLM Knowledge Reliability and Managing Hallucinations in Practice

    This article explains how to evaluate the knowledge reliability of large language models beyond simple accuracy, covering the design of cross-domain benchmarks, joint metrics for correct, wrong, and abstained answers, hallucination rate calculation, knowledge calibration engineering, reproducible evaluation pipelines, and shifting from generic scores to business-specific acceptance testing. Readers will learn practical methods for building a verifiable reliability framework that balances factual accuracy, answer coverage, and reasonable abstention.

    1. Why Knowledge Reliability Evaluation Cannot Rely on Accuracy Alone

    In knowledge Q&A, enterprise retrieval, and decision-support scenarios, the key challenge for large language models (LLMs) is not only “whether the model can answer a question,” but also “whether the model knows when it cannot answer.”

    For the same question, a model may produce a correct fact, generate a confidently worded but incorrect answer, or explicitly state that the available information is insufficient. These three outcomes carry different business value, and the latter two should not simply be lumped together as a single type of failure.

    For example, in low-risk knowledge exploration, users may accept speculation with clear caveats; but in scenarios involving finance, compliance, or equipment operation, an unverified specific answer can be more dangerous than “unable to confirm.” Therefore, knowledge reliability evaluation needs to observe two capabilities simultaneously:

    • Factual recall: whether the model can accurately recover knowledge relevant to the question.
    • Knowledge calibration: whether the confidence expressed by the model matches the actual likelihood that the answer is correct.

    Note that knowledge calibration does not mean frequently using hedging words like “possibly” or “probably.” True calibration requires the model to distinguish known facts, insufficient evidence, and reasonable inference, and to choose accordingly between answering, clarifying, retrieving, or abstaining.

    2. Designing a Cross-Domain Evaluation Set

    The cross-domain knowledge evaluation described in the reference material uses roughly 6,000 questions covering six domains and 42 topics. The value of this scale is that it avoids judging a model’s overall knowledge capability based on a small set of familiar domains.

    However, question count alone does not guarantee evaluation quality. Building a reliable benchmark also requires controlling the following factors.

    2.1 Domain coverage and sample distribution

    The evaluation set should cover the knowledge scope that the target business actually involves, such as economic activity, science and technology, public affairs, and specialized industry knowledge. The number of questions per domain should be determined by the evaluation purpose rather than a mechanical equal split.

    If one domain has too many questions, the overall accuracy may mainly reflect performance in that domain and mask weaknesses elsewhere. Therefore, results should be reported at the overall level, the domain level, and the topic level simultaneously.

    For enterprise applications, business weighting should also be added. For example, in a system for equipment maintenance, errors in equipment safety knowledge usually cost more than errors in general background knowledge. Generic evaluation and business evaluation should complement each other, not replace each other.

    2.2 Question verifiability

    Each question should have a traceable reference basis, with explicit answer time frames and conditions. Questions suitable for factual evaluation typically need to satisfy the following:

    • The question is clearly stated and does not rely on unstated context.
    • The reference answer can be verified through credible sources.
    • Scoring rules are defined for synonymous expressions, unit conversions, and reasonable precision.
    • For questions that may have multiple correct answers, the accepted range is specified.
    • Time-sensitive facts are annotated with a knowledge cutoff date.

    If a question itself is ambiguous, the model’s request for clarification should not be treated as a knowledge deficiency. Otherwise, the evaluation would inadvertently encourage the model to answer rashly when conditions are insufficient.

    2.3 Difficulty and freshness control

    The evaluation set should include common knowledge as well as specialized details and harder facts. Testing only common knowledge tends to produce clustered scores with poor discrimination; testing only obscure facts may drift away from real usage needs.

    Meanwhile, test set leakage and sample contamination must be guarded against. Independent held-out sets, periodic addition of new questions, and semantic deduplication can reduce the risk, but they cannot justify claiming contamination has been fully eliminated. For public question sets in long-term use, results should be cross-validated with updated question sets.

    3. Building Joint Metrics for Correct, Wrong, and Abstained Answers

    The composite metric in the reference material ranges from −100 to +100, and its design intent is to jointly account for correct answers, wrong answers, and abstention under uncertainty. An important distinction here: the value range and evaluation goal of the metric do not equal a complete scoring formula. Without an official scoring rule, one should not reverse-engineer its weights or calculation method.

    In general engineering evaluation, outputs can first be divided into three basic categories:

    • Correct answer: the core facts meet the reference answer requirements.
    • Wrong answer: an answer was given, but the core facts are incorrect.
    • Abstention: no substantive answer was provided, and the model explicitly stated it could not confirm.

    Let the counts of the three categories be C, W, and A, with total questions N, where N = C + W + A. The following basic metrics can be computed:

    Overall accuracy = C / N

    This reflects the proportion of all test questions for which the model can provide a correct answer.

    Answer coverage = (C + W) / N

    This reflects the proportion of questions for which the model is willing to give a substantive answer.

    Accuracy on answered questions = C / (C + W)

    This reflects how many of the answers users actually receive are correct. If the model answers no questions at all, this metric should be marked as not computable rather than set to zero.

    Understanding hallucination rate

    The reference material defines the hallucination rate as the proportion of questions the model failed to answer correctly where it produced a wrong answer instead of admitting it did not know. If wrong answers and abstentions are treated as mutually exclusive and exhaustive outcomes, this can be expressed as:

    Hallucination rate = W / (W + A)

    This metric measures the model’s behavior when it encounters its knowledge boundary, not the proportion of errors among all answers.

    For example, suppose a test set contains 100 questions, and the model answers 60 correctly, answers 10 incorrectly, and abstains on 30. The overall accuracy is 60%, the answer coverage is 70%, and the hallucination rate under the above definition is 25%. The proportion of wrong answers among all questions is 10%. These numbers describe different aspects and should not be conflated.

    In addition, “confidently answering incorrectly” requires operational annotation rules. If the scoring system does not independently identify confidence levels and simply counts all wrong answers in the numerator, the report should state this explicitly, so that linguistic style is not confused with factual error.

    4. Why a Lower Hallucination Rate Does Not Necessarily Mean a Stronger Model

    A model can reduce wrong outputs by abstaining heavily, but this does not necessarily increase business value. In the extreme case, a model that claims not to know the answer to every question produces no wrong answers, yet cannot perform any knowledge service task.

    Therefore, a low hallucination rate must be interpreted together with accuracy and coverage.

    A more desirable improvement direction is: more correct answers, fewer wrong answers, and abstentions concentrated on questions where knowledge or evidence is genuinely lacking. This reflects a joint improvement in knowledge capability and boundary awareness.

    If the hallucination rate drops but accuracy also drops significantly, check whether the model has simply become overly conservative. Conversely, if accuracy improves but is accompanied by more high-risk errors, a higher total score alone does not prove the system is more reliable.

    For systems with trustworthy confidence scores, coverage and error risk can be observed at different answering thresholds to form a risk–coverage curve. Compared with a score at a single threshold, this analysis better helps enterprises choose an appropriate operating strategy.

    5. Engineering Methods for Knowledge Calibration

    5.1 Write response policies into the task specification

    System instructions should explicitly state: the model may abstain when information is insufficient, should ask for clarification when question conditions are missing, and must not fabricate unverifiable details as established facts.

    However, simply adding “do not hallucinate” is usually not enough. A more effective approach is to define concrete behavioral boundaries, for example:

    • Do not fill in precise numbers when dates or values are uncertain.
    • When sources conflict, present the conflict rather than forcing a merge.
    • When the necessary basis cannot be obtained, state what information is currently missing.
    • Distinguish conclusions directly supported by evidence from inferences based on evidence.

    These specifications must be verified through testing; risk cannot be considered controlled merely because the instruction has been configured.

    5.2 Distinguish closed-book evaluation from retrieval-augmented evaluation

    Closed-book evaluation primarily observes the model’s own factual recall and abstention behavior; retrieval-augmented evaluation observes the whole system’s ability to acquire, understand, and use external evidence.

    The two cannot be directly mixed and compared. Once retrieval is enabled, errors may come from failing to retrieve relevant materials, outdated retrieved content, document parsing failures, or the model misreading evidence. Evaluation reports should clearly specify tool permissions, data source scope, and retrieval configuration.

    In retrieval-augmented scenarios, focus on checking:

    • Whether the evidence actually supports the key claims in the answer.
    • Whether the cited content is relevant to the user’s question.
    • Whether the evidence meets timeliness requirements.
    • Whether there are explicit handling rules when multiple sources conflict.
    • Whether the system still forces an answer when there is no valid evidence.

    The presence of a citation does not guarantee a correct answer; the support relationship between evidence and conclusion is what matters.

    5.3 Do not treat self-reported confidence as a reliable probability

    A model claiming “I am 90% sure” does not mean similar answers are actually correct 90% of the time. Certainty expressed in natural language may be influenced by prompting style and expression habits.

    If a system needs to use confidence scores for automated decisions, their calibration should be verified on an independent validation set, and thresholds should be set according to business risk. For systems that only output text answers, it is better to first adopt discrete strategies such as answering, clarifying, or abstaining, rather than forcing a precise probability onto every answer.

    6. Building a Reproducible Evaluation Pipeline

    A reliable evaluation pipeline should include four stages: question management, execution control, result scoring, and error analysis.

    First, store a unique identifier, domain label, reference answer, evidence source, time conditions, and scoring instructions for every question. Reference answers should be maintained independently to prevent model outputs from contaminating the standard answers.

    Second, fix the model version, prompt template, generation settings, tool permissions, and execution time. For systems with random variation, run repeated tests and report the range of fluctuation rather than cherry-picking the best result.

    Third, adopt a tiered scoring strategy. Exact numbers and short facts can be judged with rules first; semantically complex answers can use assisted scoring, but manual spot checks are required. Scoring systems can also make mistakes, especially with partially correct answers, reasonable approximations, or ambiguous answers.

    Finally, attribute errors rather than merely recording a “wrong” label. Common causes include missing knowledge, entity confusion, overlooked time conditions, unit errors, retrieval failures, and evidence interpretation errors. Different error types require different remedies; uniformly increasing refusals does not solve everything.

    7. Moving from Generic Scores to Business Acceptance

    Generic knowledge benchmarks help identify a model’s capability boundaries, but they cannot directly prove that a system meets enterprise application requirements.

    Business acceptance testing should add domain-specific tests, including high-risk facts, internal terminology, permission boundaries, outdated materials, conflicting documents, and unanswerable questions. For high-risk tasks, prioritize the losses caused by wrong answers, and preserve processes for manual review, evidence supplementation, and safe exits.

    Continuous monitoring is also required after launch. Changes in model version, knowledge base content, retrieval strategy, or prompt template can all alter accuracy and abstention behavior. After every key change, run regression tests and re-examine typical failure samples.

    Ultimately, knowledge reliability is not an isolated score but a verifiable set of system capabilities: the model can answer questions that have a sound basis, recognize when information is insufficient, proactively clarify or abstain when necessary, and help users understand the evidence and boundaries of each answer. Only by jointly evaluating knowledge coverage, factual accuracy, reasonable abstention, and business risk can an organization build a reliability framework that truly supports engineering decisions.