LLM Hallucination and Factual Accuracy: A Model Selection Guide

    This guide explains why choosing a large language model cannot rely on subjective impressions. It covers how hallucinations arise, which scenarios carry the highest risk, how to build a reproducible evaluation pipeline with a closed test set and defined metrics, engineering measures such as RAG and structured output to reduce hallucination, dedicated testing for multimodal and spatial reasoning, and a weighted scoring framework for scenario-based model selection.

    1. Background: Why Model Selection Cannot Rely on Gut Feeling

    In real engineering projects and everyday use, many teams and individuals evaluate general-purpose large language models based on fragmented subjective impressions: one model felt smoother for a piece of writing, another gave a more agreeable answer, and a conclusion is drawn from that. What actually determines production readiness are two underlying metrics: factual accuracy and hallucination rate. The phenomenon described in the original article is very typical: for the same question, one model filled in details that did not exist and stated them with great confidence; only after switching to another model or another technical approach did the result return to the right track.

    This points to a key conclusion: chat experience, writing style preference, and factual reliability are three independent dimensions, and a high score on one dimension cannot be used to mask a defect in another. Selection must break the problem into dimensions, build a question set, and be reproducible.

    2. How Hallucinations Arise: Understanding the Risk at the Mechanism Level

    To control hallucinations, you first need to understand where they come from. The commonly accepted causes in the industry fall into four categories:

    1. A completion tendency caused by the training objective: a language model is trained to predict the next token, so it tends to produce fluent, plausible text rather than saying “I don’t know.”
    2. Blurred knowledge boundaries: the model has insufficient coverage of long-tail facts (obscure people, niche version numbers, internal documents) but still generates seemingly reasonable answers.
    3. Overly open-ended prompts: when a question has no definite answer, the model is more likely to extrapolate confidently.
    4. Weaknesses in multimodal and spatial reasoning: error rates rise significantly on tasks involving part-whole relationships, spatial orientation, and fine-grained recognition.

    Therefore, the more open-ended the question, the more long-tail the fact, and the finer-grained the visual judgment, the more external constraints and human review are needed.

    3. High-Risk Scenario Checklist: Where Mistakes Are Most Likely

    • Long-tail fact queries about specific people, events, and timelines;
    • Operational details for a specific software version, parameter, or configuration item;
    • Cases with a “single correct answer” that can only be confirmed by citing official documentation;
    • Judging the relationship between a part and the whole in an image (for example, “the part looks like A, but the whole is B”);
    • Open-ended prediction, evaluation, and inference questions.

    4. A Reproducible Evaluation Method: Turning “Feeling” into Metrics

    The recommendation is to build a minimum viable evaluation pipeline whose core idea is a closed question set + fixed parameters + repeated sampling + human annotation.

    4.1 Question Set Design

    Prepare 30 to 100 questions covering three types:

    • Closed questions with a single correct answer (to test factual accuracy);
    • Composite questions requiring multi-step reasoning (to test stability);
    • Open questions with no definite answer (to test whether the model admits uncertainty).

    4.2 Evaluation Metrics

    • Factual accuracy rate (closed questions);
    • Hallucination rate (the proportion of fabricated content);
    • Refusal or uncertainty expression rate (a healthy indicator for open questions);
    • Multi-turn consistency (whether results drift when the same question is asked repeatedly);
    • Instruction-following rate (whether output strictly follows the constraints).

    4.3 Illustrative Evaluation Code

    1. # Pseudocode: minimal evaluation loop
    2. cases = load_cases("cases.jsonl") # each entry contains prompt, reference answer, type
    3. results = []
    4. for c in cases:
    5. for i in range(3): # sample multiple times to observe stability
    6. ans = call_model(c["prompt"], temperature=0.2)
    7. results.append({
    8. "id": c["id"],
    9. "type": c["type"],
    10. "sample": i,
    11. "answer": ans,
    12. "judge": judge(ans, c["reference"]) # correct / hallucination / uncertain
    13. })
    14. report = summarize(results) # output accuracy and hallucination rate per type

    The key points: low-temperature sampling, fixed prompts, and repeated runs; otherwise the conclusions are not reproducible.

    5. Engineering Measures to Reduce Hallucination: Do Not Depend on a Single Model

    Factual accuracy cannot be achieved by “picking a model” alone; more reliable results come from constraints at the architecture level:

    1. Retrieval augmentation (RAG): make authoritative documents and internal knowledge bases the single source of truth, and require the model to “answer only based on the provided material, and state clearly when information is missing.”
    2. Structured output constraints: use a JSON Schema to define fields and reduce room for free improvisation.
    1. {
    2. "answer": "string",
    3. "confidence": "high | medium | low",
    4. "evidence": ["evidence snippet ID"],
    5. "unknown": true
    6. }
    1. Citation traceability: require the model to give snippet IDs from the material so answers can be verified automatically.
    2. A secondary verification chain: trigger a second independent reasoning pass or rule-based check for high-risk answers.
    3. Human fallback: scenarios such as healthcare, legal, and financial must retain expert review.

    6. Dedicated Testing for Multimodal and Spatial Reasoning

    For questions of the “the part looks like one thing, the whole is another” type, it is advisable to build a separate set of visually constrained questions:

    • Require the model to describe the whole first, then point out the location of the part;
    • Require the model to output coordinates or a region description for the part;
    • Have a human verify whether the local features actually exist.

    In practice, this type of task places high demands on a model’s spatial and fine-grained recognition ability, and different technical approaches differ markedly, so results must be based on actual measurement rather than impression.

    7. Selection Decision Framework: Weighted Scoring by Scenario

    Do not ask “which one is the best”; ask “which one best fits my scenario.” A weighted score is recommended:

    Dimension Example Weight Description
    Factual accuracy / hallucination rate 40% Accuracy on closed questions
    Instruction following 20% Compliance with format and constraints
    Multi-turn stability 15% Degree of result drift
    Writing and expression 15% Style and readability
    Multimodal capability 10% Adjust as needed

    For high-risk domains such as medicine and law, the weight of “factual accuracy” should be raised above 60%, and retrieval augmentation plus human review should be mandatory. If you use general-purpose cloud capabilities, you can combine object storage to host the knowledge base, a message queue for asynchronous verification, and logging services with monitoring and alerting for quality tracking. These are all general industry categories and do not point to any specific product.

    8. Conclusion

    Model selection is not a one-time preference choice but an engineering problem of continuous evaluation plus architectural fallback. No model has a 100% accuracy rate, and the more open-ended, long-tail, and fine-grained the question, the more external evidence and human oversight are required. The recommendation is to run an A/B trial over two to three months based on a closed question set and weighted scoring, turning “feeling” into “metrics,” so that a robust balance can be struck between factual accuracy and experience.