Show contents
Chapter 2 of 6 · 20 min
Made-up facts, biases and other limits
By the end of this chapter, you'll be able to
- Explain why an assistant can make up facts with confidence
- Understand the role of temperature in the variety of answers
- Recognise biases and the date limits of knowledge
- Know which information never to give an assistant
Made-up facts ("hallucinations")
A language model produces the most plausible continuation, not the truest. When it lacks information on a topic, it does not answer "I don't know" by default: it produces something that has the shape of a good answer. These inventions are called hallucinations. They are particularly frequent for:
- precise references: book titles, articles, law numbers, web links;
- figures: dates, statistics, prices;
- rare topics: little-known people, places, local events;
- long calculations, which the model "guesses" instead of performing.
Recent assistants can search the web or run code, which reduces these errors, but does not remove them.
Temperature: careful or creative?
To choose the next token, the model gives a score to each possibility, then turns these scores into probabilities. A setting, the temperature, changes this transformation:
- low temperature (close to 0): the most probable token is almost always chosen. Stable, predictable answers;
- high temperature: probabilities even out, rare choices become possible. Varied, more "creative" answers, but also more errors.
import math
scores = {"Bamako": 4.0, "Dakar": 2.5, "Paris": 1.0}
def probabilities(scores, temperature):
exps = {w: math.exp(s / temperature) for w, s in scores.items()}
total = sum(exps.values())
return {w: round(e / total, 2) for w, e in exps.items()}
for t in (0.5, 1.0, 2.0):
print(f"temperature {t}:", probabilities(scores, t))
temperature 0.5: {'Bamako': 0.95, 'Dakar': 0.05, 'Paris': 0.0}
temperature 1.0: {'Bamako': 0.79, 'Dakar': 0.18, 'Paris': 0.04}
temperature 2.0: {'Bamako': 0.59, 'Dakar': 0.28, 'Paris': 0.13}
Suppose the question is "What is the capital of Mali?". At low temperature, "Bamako" is chosen 95 times out of 100; at high temperature, a wrong answer comes out more than one time in three. This is also why the same question asked twice can give two different answers.
The style is the same as for a correct answer: nothing signals the invention. Hence the need to check.
Text description of the animation
- The model has read very little about this poet: it has almost nothing reliable to “remember”.
- It completes with what looks like a poet's biography: plausible dates and places.
- The random draw adds details that exist in no source.
- The style is the same as for a correct answer: nothing signals the invention. Hence the need to check.
Biases and dated knowledge
A model learns from texts written by humans, with their biases: it may reproduce stereotypes, know some regions of the world better than others (often less about Africa than Europe or North America), or answer better in some languages. It reflects what it has read, not reality.
Its knowledge also stops at a training cut-off date. Without web search, it ignores more recent events: a new school curriculum, a change in the law, a new version of a piece of software.
Your personal data
What you write in an assistant is sent to the servers of the company that provides it. Depending on the service and your settings, these conversations may be kept, read by people for checks, or used to improve the models. The simple rule: never write in an assistant what you would not put on a poster.
Never paste into an assistant:
✗ passwords, secret codes, codes received by SMS
✗ card, account or ID numbers
✗ medical or personal information about other people
✗ confidential documents from your school or employer
✓ instead: replace real names and figures with examples
Mini-lab: play with temperaturePython 3.13
Output
Click “Run”: Python will load in your browser (about 10 MB the first time).Your code runs in your browser, isolated from the page. · Ctrl/⌘ + Enter to run · Esc then Tab to leave the editor
Your turn
Worked exercise
Worked exercise: check it or not?
For each request made to an assistant, say whether the answer must be checked before use, and why:
1. "Rephrase this paragraph I wrote so it is clearer."
2. "Give me three books on the history of the Mali Empire, with their authors."
3. "How many people live in Sikasso?"
4. "Explain what this Python for loop does."
5. "What is the registration deadline for this year's baccalaureate?"
Hint 1
Hint 2
Show the solution and common mistakes
- Low risk: you know the original content and can judge whether the meaning is kept. Reread anyway.
- Check it: titles and authors are precise references, often made up. Look up each book in a library or an online catalogue.
- Check it: a precise figure, which also changes over time. Use the official source (the national statistics institute).
- Easy to check: run the code and compare with the explanation. AI often explains common code well, but can be wrong on an edge case.
- Must be checked: recent, official information that the model may ignore or confuse with another year. Only the ministry's or your school's website counts.
Common mistakes:
- Trusting an answer because it is well written: the style is just as polished when the answer is wrong.
- Asking the assistant "Are you sure?" to check: it may confirm an error, or change its answer for no reason. Checking is done in another source.
Summary
- 1An assistant produces the most plausible answer, not necessarily the true one: it can make things up with confidence.
- 2References, figures, rare topics and current events are the areas to check first.
- 3Temperature sets the share of randomness: low for stable answers, high for more variety.
- 4Models reproduce the biases of their data and ignore what came after their training.
- 5Never give an assistant passwords, codes, numbers or personal information.
Your progress is saved on this device. Create a free account to keep your progress on all your devices.