Sub topic 12
Prompts that make uncertainty visible
This chapter assumes you have used a chat-based LLM assistant, can read short Python, and know the earlier chapters' main points. A model predicts likely next tokens, it is rewarded for answering rather than abstaining, and fluent text is not evidence of truth. Here you will learn how to write prompts that make a model's uncertainty easier to see. You will also learn why those prompts only partly work.
Why the default prompt hides uncertainty
A plain question such as "When was the Eiffel Tower completed?" invites a plain answer. The model has seen many confident, direct answers in its training text. It also tends to be tuned toward responses people rate as helpful. A short, definite reply fits both pressures, so you get one even when the model has weak evidence.
A prompt cannot give the model knowledge it lacks. What a prompt can do is change the shape of the answer, so that:
- the claim is separated from the support for it,
- missing information has an allowed place to go,
- guesses are labeled as guesses,
- the answer is easy for you to check afterward.
Each technique below is one of these moves.
Give the model a permitted way to say "I don't know"
If every answer format requires a value, the model will supply one. Make abstention a valid output.
A weak prompt:
What was the population of Tórshavn in 1850?A stronger prompt:
What was the population of Tórshavn in 1850?
If you do not know the figure, or only remember an approximate value,
say so explicitly. "I'm not sure" is an acceptable answer. Do not guess
to fill the gap.Be specific about what counts as abstaining. "Be honest" is vague. "If you cannot name the source of a figure, say that you cannot" is a rule the model can follow and you can check.
A side effect to expect: after you add this instruction, the model may abstain on things it knows well. You trade some coverage for fewer fabrications. Whether that trade is good depends on the task, which the last section of this chapter covers.
Ask for claims and support separately
A single flowing paragraph hides which sentences are firm and which are padding. Ask for structure instead:
Answer in this format:
Claim: one sentence.
Basis: what you are relying on (a document I supplied, general
knowledge, or inference).
Confidence: high, medium, or low, with one reason.
What would change this answer: one sentence.The "Basis" field is the most useful. Three common values are:
| Basis the model reports | What it tells you | What you do next |
|---|---|---|
| Supplied document | The claim should be locatable in text you gave it | Search that text for the supporting passage |
| General knowledge | The claim comes from training, which you cannot inspect | Verify against a primary source if it matters |
| Inference | The model combined facts or extrapolated | Check each premise and the reasoning step |
Treat the label as a lead for your own checking, not as proof. A model can report "supplied document" for a claim that is not in the document. The next chapter on grounding and the earlier chapter on source verification cover how to test that.
Ask for confidence, but do not trust the number
You can ask the model to rate its confidence. The problem is that stated confidence is itself generated text. It is produced by the same next-token process as everything else, so it can be wrong in the same way.
Two practical points:
- Verbal labels ("high", "medium", "low") are easier to interpret than percentages. A claim of "87% sure" implies a precision the model does not have, which is the false precision warning sign from the red-flags chapter.
- Confidence is more informative when you compare across items than when you read one in isolation. If a model labels three of ten claims "low", those three are a sensible place to start checking. Reading "high" on a single claim tells you much less.
Separate recall from guessing
Many questions mix two tasks: remembering a fact and producing a plausible estimate. Ask for them separately.
Question: How many employees did the company have in 2015?
First, list only figures you can recall with a specific source or
context. If there are none, write "No recalled figure."
Then, if useful, give a clearly labeled estimate and the reasoning
behind it.This keeps an estimate from posing as a fact. You can read the first section as "claimed recall" and the second as "guess," and treat them differently.
Require verifiable references, and allow "none"
Citations are a high-risk content type, so how you ask for them matters. Compare:
- "Give me three sources for this." This pushes the model to produce three items, real or not.
- "List sources only if you are confident they exist. Give the full title, author, and year. If you cannot name a real source, write 'No source I can verify.'"
The second prompt does not stop invented references, but it removes the pressure to hit a count, and it asks for details you can look up. A reference with a title, author, and year can be searched for. A vague "a 2019 study showed" cannot.
Always check the result yourself. A model can invent a title that looks entirely normal.
Ask what the question assumes
Context failures include false premises. A question like "Why did the 2019 Treaty of Alder Bay fail?" assumes the treaty exists. Many models will explain its failure anyway.
Give the model a chance to challenge the premise before answering:
Before answering, list any assumptions in my question. For each one,
say whether you can confirm it, cannot confirm it, or believe it is
false. Then answer only the parts that rest on confirmed assumptions.This works best when you also keep your own questions neutral. "Did the Treaty of Alder Bay fail?" is easier to answer honestly than "Why did it fail?" because the first does not presuppose the answer.
Ask for the answer to be checkable
Some answers are easy to verify and some are not. You can steer the model toward the first kind.
- Ask for exact quotes with locations when working from a supplied document: "Quote the sentence that supports each claim."
- Ask for steps rather than only a result when the task is computation.
- Ask for the smallest claim that answers the question, because each extra detail is another place to be wrong.
Quotes are especially useful because you can test them mechanically. The following function checks whether a quoted passage really appears in a source text, ignoring case and whitespace differences.
def quote_supported(quote, source_text):
def norm(s):
return " ".join(s.lower().split())
return norm(quote) in norm(source_text)
source = "The report was published in March and covers 2021 data."
print(quote_supported("covers 2021 data", source))
print(quote_supported("covers 2023 data", source))The first call prints True and the second prints False. The check is deliberately strict. A quote that is paraphrased, even faithfully, will return False, which is the safe direction for this test. The reverse problem is covered below: a quote can be present in the document and still be used to support a claim it does not support.
A combined prompt template
You can assemble these moves into one reusable prompt. Keep it short enough that you will actually use it.
Answer the question below.
Rules:
1. If you do not know or are unsure, say so. Do not guess to be helpful.
2. List the assumptions in the question and mark any you cannot confirm.
3. For each claim give: Basis (supplied text, general knowledge, or
inference) and Confidence (high, medium, low).
4. Give sources only if you are confident they exist, with title,
author, and year. Otherwise write "No source I can verify."
5. Keep claims as small and specific as possible.
Question: ...The workflow this produces is shown below.
Combine with consistency checks
Prompts that expose uncertainty pair well with the self-consistency check from the sampling chapter. Ask the same structured prompt several times at a moderate temperature, then compare the claims and confidence labels. Disagreement in the claim, or a label that flips between "high" and "low", is a signal worth following.
This function reports the most common answer and how much the samples agree:
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))It prints ('1889', 0.6). Three of five samples agree. Low agreement suggests guessing. High agreement does not prove truth, because a model can repeat the same wrong answer every time.
What these prompts cannot do
Uncertainty-aware prompting has real limits, and knowing them keeps you from over-trusting it.
- The model may not know what it does not know. If a false fact is strongly present in training data, the model can report it with honest-looking confidence, and consistent samples will agree on it.
- Abstention instructions shift error types. You will get fewer fabrications and more refusals, including wrong refusals. Over-long "be careful" instructions can also make answers evasive without making them more accurate.
- Format can be followed without substance. A model can fill in "Basis: general knowledge, Confidence: high" in the right place, and the field is still just text.
- Models vary. A prompt that works well on one model or version may do little on another. Test on your own task with questions where you already know the answers.
- Longer prompts cost attention. A rule buried in a long template may be partly ignored.
Match the effort to the risk. For a casual question, a single "say so if you're unsure" line is enough. For anything with consequences, such as legal, medical, financial, or published claims, treat the prompt as a way to find what needs checking, then check it against primary sources.
Exercise
A model answers "Claim: The study found a 34.7% reduction. Basis: supplied document. Confidence: high." You supplied the document. List two checks you would run before relying on the claim.
Show answer
First, search the supplied document for the figure 34.7% and for the sentence that states the result, for example by asking the model for an exact quote and testing it with a function like quote_supported. A "supplied document" label can be wrong. Second, read the surrounding text to confirm the number means what the claim says: the same percentage might describe a different group, time period, or measure. Also note that the "high" label is not evidence and does not replace these checks.
Exercise
You ask a model for "five sources" on a niche topic and get five properly formatted references. Rewrite the request so it is less likely to produce invented references, and explain why your version helps and what it cannot guarantee.
Show answer
For example: "List sources only if you are confident they exist, with full title, author, and year. If you cannot name a real source, write 'No source I can verify.'" This removes the pressure to reach a fixed count and asks for details you can search for. It cannot guarantee the sources are real, because a model can still generate a convincing but nonexistent reference, so you must look each one up in a library catalog or publisher site.