Sub topic 4
Gaps in what the model has learned
This chapter assumes you have used a chat assistant and know that models learn from large text collections. You should also know that a model writes by predicting the next token. Reading short Python helps with one optional example.
Why gaps produce fabrication
A model does not look facts up. It stores statistical patterns from its training text, and a fact is only useful to it if those patterns were strong enough to survive training. When the pattern is weak or missing, the model still has to emit a next token. It picks one that fits the shape of the answer, so the output looks like a fact but has nothing behind it.
The same mechanism covers questions the model has never seen answered. The result is a plausible name, date, or number that has the right form and the wrong content.
Common kinds of gaps
- Rare facts. A fact that appears once or twice in training, such as a minor official's birth year, leaves a faint trace. The model may blend it with similar facts about other people.
- Obscure entities. Small companies, local events, niche libraries, and little-known researchers have thin coverage. The model fills in details from better-known neighbors.
- Recent events. Training stops at a cutoff date. Anything after it is absent, and the model may answer from older information as if it were current.
- Private or specialized material. Your internal documents, unpublished data, and paywalled sources were probably never in the training set.
- Long-tail details of common topics. The model may describe a famous library well but invent a function parameter that sounds right.
A worked example
Ask a model about a well-known topic and an obscure one in the same style:
- "Who wrote Pride and Prejudice?" The answer appears in countless texts, so the pattern is strong and the answer is reliable.
- "Who wrote the 1974 annual report of a small regional water authority?" The model has little or no signal. It may still reply with a confident name, because a name is the expected shape of the answer.
Both replies read equally smoothly. Fluency tells you nothing about which one rests on real training signal.
Probing for a gap
You can test whether a model has a fact by asking about it from several angles. If it knows the fact, the answers agree. If it is guessing, details shift. This optional snippet compares answers to the same question, using the idea that low agreement suggests a gap:
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). Three of five samples agree, which is weak support. A later chapter covers this technique and its limits in detail. For now, note that disagreement is a sign of a gap, but agreement does not prove the answer is true, because a model can be consistently wrong about a common misconception.
Practical habits
- Treat questions about obscure people, places, products, and recent events as higher risk than questions about widely documented topics.
- Ask yourself whether the fact is likely to appear in many public texts before the cutoff date.
- When the answer matters, check it against a primary source instead of trusting the phrasing.
Exercise
You ask a model for the founding year of a well-known university and for the founding year of a three-person local startup. Which answer is more likely to be invented, and why does the smooth writing not help you decide?
Show answer
The startup's founding year is more likely to be invented. It probably appeared in very little training text, so the model has a weak or missing pattern and fills the slot with a plausible year. Both answers are equally fluent because the model produces well-formed text whether or not a strong pattern supports it, so fluency does not reveal coverage.