0:00Intro: MOFUSA Tech Academy
Welcome to MOFUSA Tech Academy. Beyond learning, towards mastery.
0:09The AI that invented a return policy
A customer asked whether they could return a mug after forty-five days. Brightcart's assistant replied, warmly and confidently, that the shop has a sixty-day, no-questions-asked return window. Brightcart's real policy is thirty days. The assistant simply made it up. Ask again, and it says thirty. Ask a third time: forty-five. Confident every time, and inconsistent. This is called hallucination, and it's one of the most important limitations of language models. Today: why it happens, how to reduce it, and how a newer generation of "reasoning" models spends extra effort thinking before it answers.
0:53Where we are: hallucinations and reasoning
Season Three, Module Eleven, stop five: hallucinations, and reasoning models.
1:00Why models make things up
Why would a model invent a policy? Several reasons, working together. First, the objective. A language model is trained to produce likely text, not verified text. A sixty-day return window sounds exactly like something a shop might offer, so it's a highly plausible continuation, whether or not it's true. Second, gaps. Brightcart's actual policy probably appears nowhere in the model's training data. Rare facts, like a specific shop's rules, are learned poorly or not at all. Third, the training text itself contains mistakes.
Fourth, post-training often rewarded confident, helpful-sounding answers, which can push a model to answer rather than admit it doesn't know. And fifth, snowballing. Each new token is generated based on everything before it, including the model's own earlier words. Once it has written "Brightcart offers a sixty-day", the most natural continuation is to keep going in the same direction, even adding confident details.
2:07Three kinds of hallucination
Hallucinations come in a few flavours. Fabricated facts, like the return policy. Fabricated sources: citing a help-centre section, a study or a quotation that doesn't exist. And unfaithfulness: even when the model is given the correct document, its answer contradicts it or adds claims that aren't there. Researchers sometimes call these intrinsic, contradicting the source, and extrinsic, adding things the source doesn't support.
2:40Why answers are inconsistent
Inconsistency has two main sources. Sampling, from last episode: when a model is unsure, different dice rolls land on different answers. And sensitivity to wording: small changes in how a question is phrased can change the answer, because they change which patterns the model draws on. Notice that the confident tone tells you nothing. As we saw in episode four, a model's expressed confidence isn't automatically calibrated to how often it's right.
3:10How to reduce hallucinations
So what can Brightcart do? The most effective fix is grounding. Don't rely on what the model remembers. Put the actual policy document into the prompt, and instruct it to answer only from that text, and to say it doesn't know if the answer isn't there. That's the core of retrieval-augmented generation, which we'll build in Season Five. Give the model explicit permission to say "I'm not sure", and reward that behaviour. Use a low temperature for factual answers. Ask for citations from the provided documents, and check that they really exist and really support the claim.
For live facts, like an order's status, let the model look them up with a tool instead of recalling them. Compare several samples: if they disagree, treat the answer as uncertain. And measure hallucination rates carefully, which we'll learn in Season Four. None of these is perfect on its own. Together, they can make hallucinations much rarer.
4:12Chain-of-thought and test-time compute
Now a different kind of failure: multi-step problems. Ask: a customer buys three mugs at twelve dollars each, and a forty-five-dollar kettle with ten percent off the kettle. What's the total? A model answering in one shot might blurt out a wrong number. But ask it to work through the steps first. Three mugs at twelve is thirty-six. The kettle with ten percent off is forty point five. Thirty-six plus forty point five is seventy-six dollars fifty. Writing out the intermediate steps often makes the final answer much more accurate.
This is called chain-of-thought. Why does it help? Every token a model generates is another pass through the network, another chunk of computation. Writing out steps gives the model more computation, and somewhere to keep intermediate results, before it commits to an answer. This idea of spending more computation at the time of answering is called test-time compute.
5:13Self-consistency voting and verifiers
We can push test-time compute further. Generate several independent answers, each with its own reasoning, and take the most common final answer. It's called self-consistency, and it's the wisdom of crowds from episode fifteen. If each attempt is right sixty percent of the time and attempts were independent, a majority vote of five would be right about sixty-eight percent of the time, fifteen about seventy-nine percent, forty-one about ninety. Real attempts are correlated, so actual gains are smaller, but often still worthwhile.
Even better, when an answer can be checked, generate several candidates and let a verifier pick a correct one: unit tests for code, a calculator for arithmetic. With a perfect checker and a sixty percent chance per attempt, five attempts give a ninety-nine percent chance that at least one passes. The price is obvious: five samples cost about five times as much, and take longer.
6:17What reasoning models do differently
In recent years, a new kind of model has taken test-time compute much further: reasoning models. Before giving a final answer, they produce a long chain of reasoning: exploring approaches, checking their work, and backtracking when something doesn't add up. They're typically trained with reinforcement learning, the policy-gradient ideas from Season One, on problems where the answer can be checked automatically: maths problems with known answers, and code that must pass tests. Through that reward, the model learns that careful, extended reasoning pays off.
Many providers let you choose how much the model should think. More reasoning tends to help on hard problems, in maths, coding, planning and analysis, but adds time and cost, and it's wasted on simple questions like "what are your opening hours?" One important caveat: a model's written reasoning is not guaranteed to be a faithful account of how it actually reached its answer. Treat it as useful, but not as proof. A quick note: names, prices and rankings in AI change fast. Everything on screen was accurate when this video was made, but some of it may have changed by the time you're watching.
7:39Pause & Predict: when voting backfires
Voting helped when each answer was right sixty percent of the time. Now try a harder question, where each sample is right only forty percent of the time. What happens if we take a majority vote of five? Pause. Accuracy falls to about thirty-two percent, and with fifteen votes, to about twenty-one. Voting amplifies whatever the model usually says. If its most common answer is right, voting helps; if its most common answer is wrong, voting makes you more confidently wrong. That's why verification, actually checking answers, is often more valuable than simply counting them.
8:26The snowball effect
Hallucinations can snowball. A model writing a reply guesses a shipping date. It doesn't know it guessed: the date is now part of the text it's conditioning on, so the next sentence builds on it, calculating a delivery date and even inventing a tracking number. One small guess turns into a confident, detailed and completely false story. The fixes start before generation: fetch the real order data first, give the model permission to say "I can't see that", and verify facts before anything reaches a customer.
9:03Try it yourself: abstention trade-off
Brightcart's assistant answers a hundred questions: eighty right, twenty wrong. Now let it hand over its twenty-five least confident questions to a person. Suppose those twenty-five contain fifteen wrong answers and ten right ones. What's the accuracy on the questions it still answers? Pause.
It answers seventy-five, and seventy are right: over ninety-three percent, up from eighty. The price is coverage: a quarter of customers now wait for a person. Where to set that dial isn't a technical question. It's a business decision about the cost of a wrong answer versus the cost of a slower one.
9:46Grounding with a citation check
One powerful pattern combines grounding and verification. Give the model Brightcart's real policy text, and ask it to cite the section behind every claim. Then a simple program checks that the cited section exists and that the quoted words really appear there. A fabricated "section four point two" is caught before the customer sees it. The principle is worth remembering: make claims checkable, then check them. We'll build this properly in Season Five.
10:18Is written reasoning the real reasoning?
When a model writes out its reasoning, is that really how it reached the answer? Not necessarily. Researchers have found cases where a model's written explanation doesn't reflect what actually drove its answer, a plausible story told after the fact. Chain-of-thought still improves accuracy on many tasks, and the written steps can be very useful for spotting mistakes. But treat them as helpful evidence, not proof, and verify important answers independently.
10:48When a reasoning model is worth it
Reasoning models are impressive, but they're not always the right tool. They earn their cost on multi-step maths, like calculating an order total with discounts, on debugging code, on planning, and on tricky questions with several conditions. They're overkill for looking up an order status, rewriting a sentence, or sorting messages into categories. Remember that all those thinking tokens take time and usually cost money, even when you don't see them. Match the model to the job.
11:21How to measure hallucination
How would Brightcart measure hallucination? Build a test set: two hundred questions with known answers from Brightcart's own documents, plus fifty that can't be answered from them, like questions about next month's prices. Score every response: correct, wrong, fabricated, or appropriately declined. A trustworthy assistant gets the answerable ones right and declines the rest. You can't reduce what you don't measure, and in Season Four, we'll build exactly this kind of evaluation.
11:52Myth vs Fact
Myth: hallucinations are a bug that the next model release will fix. Fact: they come from how these models work: generating likely text, not verified text. Newer models and better training reduce them, and grounding, tools and checking reduce them a lot more, but well-designed systems always assume they can still happen.
12:15Recap
Let's recap. Hallucinations are fluent outputs that aren't supported by facts or sources. They come from a training objective that rewards plausible text, gaps and errors in the data, pressure to answer, and snowballing. Grounding answers in real documents, permitting "I don't know", low temperatures, citations, tools and consistency checks all reduce them. Spending more computation at answer time, with chain-of-thought, voting and verifiers, improves multi-step reasoning, and reasoning models are trained with reinforcement learning to do this deliberately, at extra cost.
One sentence to remember: fluent isn't factual. Ground it, check it, and let it think when it matters.
13:02Next: build a tiny GPT
Mission complete. Brightcart's assistant now answers policy questions from the real policy text, says "I don't know" when it should, and saves deep reasoning for the complicated cases. And now, the moment this whole module has been building towards. We stop talking about language models, and build one. A tiny GPT, trained from scratch on Brightcart's text, so you can watch it go from random letters to sentences. See you on the map.