Sub topic 3
Asking Again: Checking Consistency Across Samples
Assume you know how to use a chat-based LLM, read short Python code, and understand that models learn from large text collections. This chapter uses those ideas to check answers without assuming that fluent wording proves truth.
Compare several samples
A model can produce different answers when sampling allows variation. Ask the same question several times, then compare the results. If independent samples give the same answer, confidence increases. This is called a self-consistency check.
Agreement does not prove correctness. A model can repeat the same learned mistake, especially when the prompt strongly suggests one answer.
from collections import Counter
def agreement(answers):
normalized = [a.strip().lower().rstrip(".") for a in answers]
value, count = Counter(normalized).most_common(1)[0]
return value, count / len(normalized)
samples = ["1889", "1889.", "1887", "1889", "1901"]
print(agreement(samples))This prints ('1889', 0.6). Only 60 percent of the samples agree, so the answer needs checking.
Check claims against real sources
For important claims, use a primary source: the original paper, law, database, official record, or document. Check names, dates, numbers, quotations, and links directly. A source that merely sounds plausible is not evidence.
| Claim type | Useful check |
|---|---|
| Quotation | Search for the exact wording in the original document |
| Number | Recalculate it or compare it with the authoritative dataset |
Make uncertainty visible
Prompt the model to separate known information from assumptions. Ask it to list missing facts, give a confidence level with reasons, and say when it cannot verify a claim. Do not ask only, “Are you sure?” That often produces another confident sentence.
Ground answers in supplied documents
Give the model the relevant documents and ask it to answer only from those documents. Require page numbers or quoted support. This grounding reduces unsupported invention, but it cannot repair an incomplete, biased, or incorrectly supplied document.
> callout note > Match checking effort to risk. A casual summary may need a quick source check. Medical, legal, financial, or safety-related claims need primary-source verification and qualified review.
Limits of these checks
Consistency detects variation, not truth. Source matching misses paraphrases and can accept a source that does not actually support the conclusion. Grounding fails when the needed fact is absent. Prompted uncertainty can also be performed rather than genuine. Treat every method as evidence about reliability, not as a guarantee.
Exercise
Five samples give the same obscure historical date. Is the date verified?
Show answer
No. Agreement shows consistency, but the date still needs checking against a reliable primary source.