Sub topic 12
Prompts that make uncertainty visible
This chapter assumes you have used a chat-based assistant and can read short Python. It also assumes you know the earlier points of this tutorial: a model predicts likely next tokens, and it is often rewarded for giving an answer instead of admitting a gap.
The goal: make gaps easy to see
A model will not reliably tell you when it is guessing. Your prompt can change how likely it is to say so. A good prompt does three things:
- It gives the model permission to say "I don't know."
- It asks for output in a form where weak spots stand out.
- It separates what the model was given from what it supplies from memory.
None of this makes the model more truthful. It makes errors easier for you to spot.
Give explicit permission to abstain
Models tend to guess when a question seems to expect an answer. Compare these prompts.
| Weak prompt | Better prompt |
|---|---|
| "Who wrote the 1974 paper on X?" | "Who wrote the 1974 paper on X? If you are not sure the paper exists or who wrote it, say 'I am not sure' instead of guessing." |
| "Summarize this contract." | "Summarize this contract. If a term is not stated in the text, write 'not stated' for it." |
The second wording offers a legitimate exit. That lowers the pull toward inventing a plausible answer.
Ask for structure that exposes weak claims
Free-flowing prose hides uncertainty. A structured answer exposes it. Ask the model to break its answer into separate claims and label each one.
Answer the question below. Then list each factual claim on its own line,
in this form:
claim | confidence (high, medium, low) | basis (given text, memory, inference)
Mark any claim you cannot support as "unverified".Now you can scan the "basis" column. A claim marked "memory" with "low" confidence is where you spend your checking effort first.
Treat self-reported confidence with care
Stated confidence is generated text, like everything else. A model can write "high" next to a false claim. Use these labels to decide where to look first, not as proof. Phrases like "I'm 90% sure" are especially weak, because the number was not computed from anything.
Separate the given from the remembered
If you supply a document, ask the model to quote the passage that supports each answer. You can then test the quotes mechanically. This function checks whether a quotation appears in the source, ignoring case and spacing.
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. An invented quote fails the test. A quote that passes can still be used to support a wrong conclusion, so you must still read it.
A reusable template
You will answer using only the document between the <doc> tags.
Rules:
1. For each answer, give a short quote from the document that supports it.
2. If the document does not contain the answer, reply "Not in the document."
3. Do not use outside knowledge. If you think outside knowledge would help,
say so separately under "Outside the document".
<doc>
...paste text here...
</doc>
Question: ...Rule 3 matters. It gives the model a place to put memory-based material, so that material does not blend into the document-based answer.
Common mistakes
- Asking "Are you sure?" after an answer. Models often reverse a correct answer under this pressure, or defend a wrong one. It is not a reliable check.
- Demanding an answer while also allowing refusal. Mixed instructions produce unpredictable results. Say clearly which takes priority.
- Over-correcting. Heavy "say you don't know" wording can make a model refuse questions it could answer. Test your prompt on questions with known answers.
Exercise
You paste a report into an assistant and ask for its main findings. Write two prompt rules that make fabricated findings easier to catch, and say how you would test the result.
Show answer
Two possible rules: "Quote the sentence that supports each finding" and "If the report does not say something, write 'not stated' instead of inferring." To test, run each quote through an exact-match check like quote_supported against the report text. Any quote that fails is likely invented. Then read the passing quotes to confirm they actually support the finding, since a real quote can still be misused.