Sub topic 7
When the Prompt Itself Leads the Model Astray
This chapter assumes you have used a chat-based LLM assistant and can read short Python. It also assumes you know that models predict the next token (the small unit of text a model reads and writes) and that fluent text is not necessarily true. Earlier chapters covered errors that come from the model's training. This chapter covers errors that come from the input.
Two context failures
A model can fabricate even when it knows the facts, because the prompt pushed it somewhere else. Two patterns are common.
- False premises. The question assumes something untrue. The model continues the text as if the assumption were correct.
- Ignored or misread sources. You supply a document, but the answer contradicts it, adds details that are not in it, or mixes it with the model's own memory.
Both follow from next-token prediction. The prompt is the context that makes the next tokens likely. If the context says "Since the 1889 treaty was signed in Lisbon...", text that agrees with that sentence is the most likely continuation. Nothing in the process stops to ask whether the treaty exists.
False premises
Compare two questions.
- "When did Marie Curie win her third Nobel Prize?"
- "Did Marie Curie win a third Nobel Prize?"
The first assumes a third prize. A model may invent a year and a field. The second asks for a yes or no and is far more likely to get the correct answer: she won two. Models differ, and newer ones often catch obvious false premises. Subtle ones still slip through, especially when the premise is plausible or the false detail is buried in a long prompt.
Leading phrasing has the same effect. "Explain why this approach is the fastest" invites a justification, true or not. "Is this approach the fastest? Give evidence for and against" does not.
Ignored or misread sources
Giving the model a document does not guarantee the answer comes from it. Typical failures:
- The model answers from memory when the document is silent, instead of saying the document does not cover the point.
- The document is long, and relevant passages in the middle are overlooked.
- Two passages conflict, and the model blends them into one claim.
- The model paraphrases loosely and changes a number or a condition.
The last failure can be tested mechanically. If the model quotes the document, check that the quote exists in it.
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))This prints True and then False. A False result means the "quotation" was altered or invented. A True result only shows the words appear in the source. It does not show the model used them correctly.
How context drives the answer
Reducing context failures
- Ask open or yes/no questions rather than questions that presuppose a fact.
- Check your own premises before sending a prompt.
- Tell the model what to do when the source is silent, for example "If the document does not say, reply 'not stated'."
- Ask for short quotations from the document for each claim, then verify them.
- Keep supplied material short and relevant.
Exercise
You ask, "Why did the 2019 Helsinki Accord ban all diesel cars?" and the model gives a detailed explanation. You are not sure the accord exists. Name the context failure, and rewrite the question so it is less likely to cause it.
Show answer
This is a false premise: the question assumes the accord exists and banned diesel cars, so the model continues from that assumption. A better version is "Is there a 2019 Helsinki Accord that restricts diesel cars? If you are not sure it exists, say so." Then verify any answer against a primary source.
Exercise
A model summarizes a pasted contract and states "the notice period is 60 days." The contract says 30 days in one clause and 60 days in another. Which source failure is likely, and what prompt change helps?
Show answer
The model likely blended or chose between conflicting passages without flagging the conflict. Ask it to quote the exact clause for each claim and to list any passages that disagree. Then check the quotes against the contract.