How to Evaluate and Choose LLMs for Knowledge-Intensive Q&A
This article breaks down a practical framework for evaluating large language models on knowledge-intensive question answering. Using a sample question about historical rulers whose core posthumous title was "Wu," it shows why a single prompt can test concept accuracy, long-tail recall, structured output, and self-correction at once. It then defines a five-dimension scoring rubric, compares retrieval-augmented generation with long-context and parametric knowledge, and provides reproducible evaluation-set construction and scoring code. Common failure modes, mitigation strategies, a three-step selection process, and cost-control guidance are also covered.
1. Why the Same Question Produces Very Different Answers
In knowledge-intensive Q&A, a seemingly simple question can trigger several underlying capabilities at once: whether concept definitions are accurate, whether entity recall is complete, whether the output is well structured, and whether the model can correct itself after detecting an error.
The original example used a question like “Which feudal rulers had ‘Wu’ as their core posthumous title?” Its value lies in testing four things simultaneously:
- Concept distinction: Posthumous titles and temple names are two different naming systems. A posthumous title is an evaluative designation, while a temple name is used in ancestral shrine worship. Mixing them up directly produces a wrong answer.
- Long-tail recall: The answer spans multiple dynasties and regimes, including many non-mainstream ones, which tests the breadth of the model’s knowledge coverage.
- Structured synthesis: The answer needs to be organized along a timeline or by regime, with a conceptual summary at the end.
- Self-correction: The model must recognize during reasoning that “a certain designation is a temple name rather than a posthumous title” and express that correction in a way users can understand.
For this reason, such questions have far more evaluation value than ordinary factual Q&A. They measure not whether a model can talk, but whether it is correct, complete, and clear.
2. Evaluation Dimensions: Turning Subjective Experience into Scored Items
To avoid “picking a model by feel,” the first step is to decompose the experience into quantifiable metrics. A five-dimension scoring sheet is recommended, with each item scored from 0 to 5:
| Dimension | Focus | Criterion |
|---|---|---|
| Concept accuracy | Whether adjacent concepts are confused | Whether definitional errors appear |
| Recall completeness | Long-tail entity coverage | Match rate against a human-annotated answer set |
| Structural clarity | Layering and summary | Whether an overview table or layered conclusions are present |
| Correction effectiveness | Whether corrections are user-facing | Whether the correction is actionable |
| Naturalness of expression | Whether it reads like stitched search snippets | Whether explanation and transitions are present |
“Correction effectiveness” is the most easily overlooked. A common anti-pattern is that the model detects its own problem but dumps the raw reasoning as output, resulting in “talking to itself.” When users already know the boundaries of the answer, lengthy self-argumentation is just noise. An acceptable approach is a one-sentence conclusion-style correction, for example: “Note that this designation belongs to the temple-name system and is not counted here.”
3. Capability Breakdown: Retrieval Augmentation vs. Long Context
The accuracy of knowledge Q&A is usually determined by two paths.
The first is retrieval augmentation. The model issues a search first, then synthesizes an answer from the retrieved snippets. Its strengths are good freshness and the ability to cite sources; its risk is uneven snippet quality. Without reranking and conflict resolution, it can easily end up “found it but used it wrong.”
The second is long context plus parametric knowledge. Its strengths are coherent expression and strong summarization; its risks are missing long-tail entities and difficulty proving sources.
In engineering practice, the safer approach is to combine both and add a verification step. A schematic flow:
def knowledge_qa(query, retriever, llm, top_k=8):docs = retriever.search(query, top_k=top_k)docs = rerank(query, docs) # Relevance rerankingevidence = deduplicate(docs) # Deduplication and conflict resolutionprompt = build_prompt(query, evidence) # Constrain: answer based on evidence onlydraft = llm.generate(prompt)return verify(draft, evidence) # Entity-level verification, flag uncertain items
Three constraints are key: require the model to cite the evidence source for each conclusion; explicitly declare “unconfirmed” for entities with no matching evidence; and put concept definitions at the beginning of the answer so later reasoning is not polluted by a wrong premise.
4. Building a Reproducible Evaluation Set
The evaluation set determines how trustworthy the conclusions are. Build it in three difficulty tiers, with no fewer than 30 items per tier:
- Basic tier: single-concept definition questions, testing terminology accuracy.
- Intermediate tier: multi-entity enumeration questions, testing recall and deduplication.
- Challenge tier: questions with confusable concepts or false premises, testing correction and hallucination resistance.
The annotation spec should state three things clearly: the gold entity set for the standard answer, allowed phrasing variants, and “required qualifying statements.” The scoring script can use entity-level matching plus human review:
score = {"recall": len(pred_set & gold_set) / len(gold_set),"precision": len(pred_set & gold_set) / max(len(pred_set), 1),"concept_ok": 0 if has_definition_error(ans) else 1,"structure_ok": 1 if has_summary_section(ans) else 0,}
Fixing the temperature, fixing the prompt version, and fixing the retrieval window are prerequisites for reproducible side-by-side comparison. If any one of them drifts, the conclusions lose comparability.
5. Common Failure Modes and How to Avoid Them
In practice, failure modes cluster into four types:
- Concept confusion: treating temple names as posthumous titles, or counting posthumously honored designations in the official sequence. Mitigation: put concept definitions up front in the prompt and require the model to state its criteria first.
- Sparse recall: giving only a few mainstream answers. Mitigation: increase the recall count and add multi-route retrieval, then fill gaps by regime and timeline.
- Search-engine style: only a list of entries, with no explanation or summary. Mitigation: enforce a three-part “definition-list-summary” template in the output.
- Ineffective self-narration: outputting internal reasoning as the answer. Mitigation: require “conclusion first, one-sentence correction” and prohibit dumping the thinking draft.
In addition, permission differences affect retrieval depth, so the same model can behave differently under different account tiers. Record a configuration snapshot during evaluation to avoid mistaking configuration differences for capability differences.
6. Putting Selection into Practice: Layered Validation and Cost Balance
A three-step approach is recommended for enterprise selection. First, a small-sample blind test: use a 100-item evaluation set for coarse screening and keep two or three candidates. Second, scenario-based stress testing: inject real business questions and focus on long-tail recall and correction behavior. Third, a canary rollout, with logging services and monitoring alerts continuously collecting bad cases to form an iteration loop.
When deploying on Baidu AI Cloud, you can directly use combinations of general-purpose capability categories: object storage to hold evaluation sets and result snapshots, a message queue to buffer and smooth batch evaluation tasks, a container platform to host inference and verification services, and logging plus monitoring alerts for the quality dashboard. On the model-service side, enable content safety filtering and add a manual review switch for high-risk Q&A.
For cost control, a layered strategy of “small model for coarse screening + large model for precise answers” works well: first use a low-latency model to judge question difficulty, and call a stronger model only for challenge-tier requests, balancing accuracy against unit cost.
7. Conclusion
The quality of knowledge Q&A does not depend on a single rhetorical trick, but on the product of concept accuracy, recall completeness, structural clarity, and correction effectiveness. Turning experience into metrics, metrics into an evaluation set, and the evaluation set into continuous monitoring is what makes selection reproducible. For most teams, building a high-quality 100-item evaluation set first delivers more stable returns than repeatedly swapping models.
