Evaluating Large Language Model Accuracy in Knowledge Q&A: Methods and Practices

    This article presents a practical framework for evaluating the accuracy of large language models on knowledge-intensive question answering. Using a Chinese history question as a case study, it explains how to define answer boundaries, score results across four dimensions (factual coverage, conceptual accuracy, structure, and interaction noise), and run a repeatable evaluation workflow with sampling, double annotation, and reporting. It also covers common failure modes, improvement suggestions, and how enterprises can build their own evaluation sets for model selection.

    1. Background: Why the Same Question Produces Very Different Answers

    In real-world use, giving the same knowledge-intensive question to different intelligent Q&A systems often produces noticeably different results. The differences are not limited to “right or wrong.” They also show up in knowledge coverage, how well conceptual boundaries are handled, answer structure, and whether the response contains redundant self-explanation.

    Take a humanities and history question such as “Which ancient rulers had ‘Wu’ as their core posthumous title?” as an example. It has three characteristics at once: an open-ended answer set, easily confused concepts, and a need for some summarization. That makes it a good probe for testing model capability.

    This article does not recommend or benchmark any specific product. Instead, it abstracts the observed phenomena into a general evaluation question: how to scientifically measure the overall experience of a Q&A system on Chinese knowledge tasks.

    2. First, Break Down the Question Itself

    The first step in evaluation is not to look at the answer, but to define the boundaries of the “correct answer.”

    1. Concept definition: Posthumous titles and temple names are different. A posthumous title is an evaluative name given after death, while a temple name is a title used for ancestral shrine worship. The two cannot be used interchangeably. “Core posthumous title is Wu” means only rulers whose posthumous title contains “Wu” should be included.
    2. Scope definition: Whether to include posthumously honored rulers, regional regimes, and ethnic minority regimes will significantly affect the answer set.
    3. Granularity definition: Should the answer list only names, or should it also provide dynasty, personal name, reign period, and explanation?

    If the evaluators do not clarify these boundaries themselves, they cannot tell whether the model “missed an answer” or “answered under another reasonable interpretation.”

    3. Evaluation Dimensions: Scoring Across Four Layers

    It is recommended to break the overall experience into four quantifiable dimensions to avoid “it feels good” judgments.

    Dimension Focus Typical Deduction Scenario
    Factual coverage Whether the core set is complete Missing important entries
    Conceptual accuracy Whether posthumous titles and temple names are confused Including figures with temple names
    Structure and expression Whether there is explanation and summary Dry listing with no synthesis
    Interaction noise Whether the system outputs content the user does not need Unprompted self-correction

    “Interaction noise” is the most easily overlooked. Some systems perform internal self-correction but expose the correction process to the user, producing lengthy and irrelevant analysis that actually degrades the experience.

    4. A Practical Evaluation Workflow

    1. Build the question bank: For each question, define “must-include items,” “optional items,” and “must-not-include items.”
    2. Unify parameters: Test under the same time and the same online or offline settings as much as possible to reduce randomness.
    3. Sample multiple times: Repeat the same question several times to observe stability.
    4. Use double annotation: One person scores and another reviews to reduce subjective bias.
    5. Produce a report: Output a radar chart and an issue list rather than a single overall score.

    Illustrative scoring code:

    1. def score(answer, must_include, must_not_include):
    2. coverage = sum(1 for x in must_include if x in answer) / len(must_include)
    3. violation = sum(1 for x in must_not_include if x in answer)
    4. structure = 1 if ("summary" in answer or "in summary" in answer) else 0
    5. noise = answer.count("I might be wrong") + answer.count("Additional note")
    6. total = 0.5 * coverage + 0.2 * structure - 0.2 * violation - 0.1 * noise
    7. return max(0, min(1, total))

    5. Common Failure Modes and Improvement Suggestions

    1. Insufficient coverage: Can be improved through retrieval augmentation and multi-round recall.
    2. Conceptual confusion: Requires clear term definitions and exclusion rules in the system prompt.
    3. Missing structure: Require a three-part output of “definition, list, summary.”
    4. Excessive noise: Separate internal reflection from the final response and return only the conclusion.

    6. Recommendations for Enterprise Selection

    When choosing Q&A capabilities, enterprises should not look only at single-question performance. They should build their own evaluation sets covering four task types: factual, terminology, long-text summarization, and refusal safety. They can also combine general cloud capabilities, such as using log services to record the call chain and monitoring alerts to track quality fluctuations, forming a continuous iteration loop. In related scenarios, Baidu AI Cloud typically emphasizes evaluation-driven selection, making decisions with data rather than impressions.

    7. Conclusion

    Differences among multiple models’ answers are not accidental. They result from the combined effect of knowledge coverage, conceptual boundaries, and interaction design. With the evaluation methods above, you can turn “which one is better” into a reproducible, comparable, and optimizable engineering problem.