# How AI Actually Works: Inside One Guess

- URL: https://beyond-headlines.siner.io/videos/how-ai-works/
- Video: https://www.youtube.com/watch?v=VaG84RqU4kM
- Published: 2026-10-30
- Language: en
- Publisher: Beyond Headlines (https://www.youtube.com/channel/UCxIxV15nyRXOhdNtA5Q7vAQ)

> Every answer a chatbot gives you is built one small piece at a time. We followed one sentence, "The Eiffel Tower is in", through a real open-weight AI model (Qwen2.5-0.5B) on our own computer and measured every step: 7 tokens, lists of 896 numbers, attention, 24 layers, and 151,936 scores, until "Paris" won with 49%. Then we look at how those numbers are learned, how the same kind of guessing can lead to six fictitious case citations, how newer models stop and check their work, what happens when the context window runs out, and AI services that return a decision with odds instead of a sentence.

_This article is the full narration of the video._

## 01. One guess, six fake court cases ([0:00](https://www.youtube.com/watch?v=VaG84RqU4kM))

Every answer an AI chatbot has ever given you was built like this. One piece at a time, picked from a hundred thousand options or more. Here, Paris won with just forty-nine percent. The same guessing gave a lawyer six court cases that never existed. The judge fined the lawyers and their firm five thousand dollars. One database now lists more than two thousand legal decisions about suspected AI-made errors.

One newer model stopped mid-answer and wrote "Wait." Another learned to hold back instead of guessing. And some new AI tools don't write sentences at all. They only answer yes or no, with odds. We'll open a real AI model and follow one sentence, number by number. So how does a pile of numbers land on "Paris"?

## 02. Inside one guess ([0:50](https://www.youtube.com/watch?v=VaG84RqU4kM&t=50s))

Our model is Qwen two point five, a small open-weight model from Alibaba Cloud, running on our own computer. It doesn't read letter by letter. We give it "The Eiffel Tower is in". It splits that into seven pieces called tokens. "Eiffel" alone becomes three: "E", "iff", "el". Each piece is swapped for a list of nearly nine hundred numbers. Here are the first few for "Paris". Nobody wrote these lists by hand, but they ended up with a shape. The numbers for Paris

are more like the numbers for France than for London or Berlin, and nothing like banana. Now the last piece, "in", asks which earlier pieces matter. It turns its numbers into a question, checks it against every piece so far, and gets a score for each. The scores become percentages. In the strongest of these checks, the three pieces of "Eiffel" get ninety-seven percent of the focus.

But that's the most dramatic one. Averaged over all of them, most of the focus lands on the very first word, "The". Models do this a lot. Researchers call it an attention sink. So does "Eiffel" really matter? We took it out. With "The Tower is in", Paris falls from forty-nine percent to almost nothing. Then the model blends information from those pieces, using those percentages. That's attention.

Then a bigger block of calculation changes those numbers again. It is made of thousands of small units. Each one multiplies, adds, and then bends the result through a simple curve. Together, these make one layer. This model stacks twenty-four. Every layer has the same two main steps: attention, then a bigger calculation. But the numbers in each layer are different. Each layer adds a small change to the list of numbers for every piece.

Think of a draft passed through twenty-four editors. Each makes small changes. After the last one, a final reader scores the possible next pieces. We can peek inside by applying the final output step after each layer. For nineteen layers, it points to nonsense. At layer twenty, Paris ranks about eight thousandth among the possible next pieces. At layer twenty-two, France is in first place. Only the last layer gives the model's real answer, and there, Paris comes out on top.

At the end, the last list of numbers is checked against a stored row for every token the model knows. That gives more than a hundred fifty thousand scores. Each score is turned into a share, and all the shares add up to a hundred percent. Paris gets forty-nine. "which" gets sixteen. France gets eight. That one token took roughly half a billion calculations that multiply and add numbers. Then Paris

is added to the sentence, and the model works out the next piece, reusing its earlier work. Comma. France. Period. It. Is. Three hundred twenty-four. Every word you have ever read from a chatbot came out like this. Which leaves one question. Where did all those numbers come from?

## 03. How the numbers are learned ([4:00](https://www.youtube.com/watch?v=VaG84RqU4kM&t=240s))

Let's look at one unit in layer twenty-one. Part of it takes in nearly nine hundred numbers. It multiplies each by another number, called a weight, and adds the results. Switch off just this one unit, and Paris drops from forty-nine percent to twenty-one. Nobody designed it to do that. It got that way through practice. Training shows the model real text, hides the

next word, and asks for a guess. Then it measures how wrong the guess was. That measure is called loss. If the answer was Paris and the model gave Paris forty-nine percent, the loss is small. If it gave the right answer almost no chance, the loss is huge. Then many of the model's numbers are nudged a tiny bit, in the direction that lowers the

loss. Working out those directions runs backward, from the output to the first layer. That backward pass is called backpropagation. We tried it ourselves. Our model has never heard of my dog. Ask "My dog's name is", and Biscuit has almost no chance. We trained it on one sentence: "My dog's name is Biscuit." After one round, Biscuit

was at four percent. After two, eighty-six. After three, almost a hundred. Each round made tiny changes to almost all of its half a billion numbers. And there was a cost. After fifteen rounds, Paris, which had nothing to do with my dog, slid from forty-nine percent to forty-three. Teach a model one new fact, and the rest of what it knows shifts a little.

Here is the same idea from zero. A tiny network, with about twelve hundred numbers, learns which of two spirals each point belongs to. At first it guesses. After a thousand rounds, it gets every point right. A real model does this with far more text. The Qwen two point five family trained on up to eighteen trillion tokens. That alone makes a model that continues text.

A chatbot is that same kind of model, trained further on conversations, to answer instead of just continue. It still writes one piece at a time. So it learned to pick likely words. But likely and true aren't the same thing. What happens when they come apart?

## 04. Where guessing fails ([6:17](https://www.youtube.com/watch?v=VaG84RqU4kM&t=377s))

In 2024, people asked ChatGPT how many R's are in "strawberry". Users reported it answering two. The word has three. Remember, the model works with pieces. Depending on the text around it, our model reads "strawberry" as one piece, or as "str", "aw", "berry". It has to work out the spelling from those pieces. There's a stranger case. Anthropic traced one Claude model adding thirty-six and fifty-nine.

Inside, two paths ran at once. One estimated roughly ninety-two. The other worked out that the answer ends in five. Together: ninety-five. But asked how it did it, the model described carrying the one, the way we learn in school. Its explanation was not what it actually did. Then there are the made-up facts. In 2025, OpenAI researchers asked DeepSeek-V3 for the birthday of one of the authors, Adam Kalai. Three tries, three different dates, all wrong.

They argue that rare, arbitrary facts, like one person's birthday, are hard to learn from patterns. And the model is still trained to produce a likely-looking answer. Tests don't help. In most of the ten major tests they examined, a correct guess earns points, and "I don't know" never does. That kind of failure has reached court. In 2023, a New York lawyer used ChatGPT to find cases. His firm filed

a court document citing six that did not exist, with names like "Varghese v. China Southern Airlines". When he asked if one was real, ChatGPT said it "does indeed exist", and could be found on legal databases. It could not. The judge fined the lawyers and their firm five thousand dollars. As of October twenty-seventh, a database listed two thousand two hundred twenty-five court and tribunal decisions about suspected AI-made errors.

So the guessing machine guesses even when it shouldn't. How do newer models improve their answers, and handle not knowing?

## 05. How newer models correct themselves ([8:22](https://www.youtube.com/watch?v=VaG84RqU4kM&t=502s))

The first trick was simple: make the model write its steps. In 2022, Google showed one big model going from eighteen percent to fifty-seven on grade-school math problems, just by showing it a few worked examples. Then models were trained to think before answering. In 2024, OpenAI's o1 solved seventy-four percent of a hard math contest on its first try. GPT-4o solved twelve.

In 2025, DeepSeek trained a model with rewards for correct answers and the right format, and no worked solution examples. On the same contest, it went from sixteen percent to seventy-one. Along the way, its answers got longer. And in the middle of one problem, it wrote: "Wait, wait. Wait. That's an aha moment I can flag here." Then it went back and checked its work.

The researchers did not explicitly teach it to go back over its steps. That behavior appeared during training. Another fix is to hand the hard part to a tool. In one test, asking ChatGPT to run a short program gave the correct count of R's: three. Researchers at Meta trained a model to call a calculator on its own. On one set of word problems, the original model scored about eight percent. The tool-trained version scored forty.

And then there is knowing when to stop. In one Claude model, Anthropic found a default answer: "I can't answer that". Familiar subjects can switch it off. If that happens when the answer isn't actually known, the model may make something up. Training can push the other way. In one OpenAI test of fact questions, a newer model held back on about

half of them, and was wrong about one time in four. An older model was wrong three times in four. All of these tricks need room to think, and room to read. How much room does a model have, and what happens when it runs out?

## 06. Context: small and large windows ([10:20](https://www.youtube.com/watch?v=VaG84RqU4kM&t=620s))

Everything the model can look at in one go is called its context window. Our model can take about thirty-two thousand tokens. For this test, we used a fresh copy of the model. We told it "My dog's name is Biscuit," then added about three thousand tokens of everyday sentences. Then we asked, "What is my dog's name? My dog's name is..." With the whole text in view, it gave Biscuit an eighty-two percent chance.

Then we let it see only the last two thousand tokens. The first sentence slid out of view, and Biscuit's chance fell almost to zero. With shorter windows, its top guesses were names like Max and Jack. Windows have grown fast. GPT-1, in 2018, saw five hundred twelve tokens. GPT-3 saw about two thousand. Some leading models today handle about a million.

But a bigger window costs more. With five hundred tokens, our computer took less than half a second. With thirty-two thousand, it took about a minute and a half. The model also keeps a running note on every token, so it doesn't redo that work. In our model, that note grows to about three quarters of a gigabyte at thirty-two thousand tokens.

Even inside the window, the model doesn't read evenly. In a 2023 study, a model answered better when the key document came near the beginning or the end than when it was in the middle. In the middle, it did worse than when it was given no documents at all. A 2025 test of eighteen models found that simple tasks got harder as the input got longer, even when the answer was right there.

So systems work around the window. One can search for the few pages that matter and put them in view. Another can summarize the earlier part of a long chat, so it takes less room. But some jobs don't need a long answer at all. They only need a decision. What if the model returned a decision instead of a sentence?

## 07. Models that decide instead of write ([12:18](https://www.youtube.com/watch?v=VaG84RqU4kM&t=738s))

Look again at those percentages: Paris forty-nine, France eight. A chatbot picks one and moves on. But the odds themselves are useful. That's the idea behind a new kind of AI service in 2026. TypeSafe's Jev and OpenAI's Decisions API don't write sentences. You give them text and a question, and they return an answer in a fixed form: the chance that something is true, or one choice from a list, with odds. Ask "Is this message a scam?" and you might get back a ninety-three percent chance that it is.

A program might block anything above ninety percent, and send the rest to a person for review. Both companies say their services are fast. TypeSafe says Jev is trained so that its odds match how often it is right. That matching is called calibration, and it can't be taken on trust. On one set of multiple-choice questions, GPT-4's base model was well calibrated. After the training that made it a good assistant, its odds matched the results less well.

So a ninety-three percent is only worth something if someone has checked it: out of every hundred such answers, about ninety-three should be right. So what do all of these have in common?

## 08. Every answer is a contest ([13:33](https://www.youtube.com/watch?v=VaG84RqU4kM&t=813s))

Paris at forty-nine percent. Six court cases that never existed. A model that stops and writes "wait". They all start from the same kind of guess. Text becomes numbers. Attention mixes them, layer after layer. Then every possible next piece gets a score. Some newer approaches add thinking first, or tools, or permission to say "I don't know". Others skip the sentence and return a decision with odds. And inside our model, France led at layer twenty-two. Paris won only at the last layer.

Every answer is built from small contests between possible next pieces. Now you've seen one from the inside.

## Sources

- Our measurements: Qwen/Qwen2.5-0.5B, revision 060db649 (open weights), CPU.
- Vaswani et al. (2017), Attention Is All You Need, arXiv:1706.03762. Qwen Team (2024), Qwen2.5 Technical Report, arXiv:2412.15115.
- Anthropic (2025-03-27), Tracing the thoughts of a large language model; On the Biology of a Large Language Model.
- Kalai, Nachum, Vempala, Zhang (2025), Why Language Models Hallucinate, arXiv:2509.04664; OpenAI (2025-09-05), Why language models hallucinate.
- Mata v. Avianca, Inc., No. 22-cv-1461 (PKC) (S.D.N.Y. June 22, 2023), Opinion and Order on Sanctions. Damien Charlotin, AI Hallucination Cases database (2,225 decisions, checked 2026-10-27).
- Wei et al. (2022), Chain-of-thought prompting, arXiv:2201.11903. OpenAI (2024-09-12), Learning to reason with LLMs. DeepSeek-AI (2025), DeepSeek-R1, arXiv:2501.12948 v1. Schick et al. (2023), Toolformer, arXiv:2302.04761.
- Liu et al. (2024), Lost in the Middle, TACL. Chroma (2025-07-14), Context Rot. Context-window sizes from the model papers and official model pages (checked 2026-10-26).
- TypeSafe (2026-09-15), Introducing System One models and Jev. OpenAI Decisions API (beta 2026-10-06). OpenAI (2023), GPT-4 Technical Report.
- Strawberry answers: user reports from 2024 (OpenAI Developer Community; Lego Mirror blog).
- Footage: illustrative stock footage from Pexels (Anh Nguyen, Dima Krivoy, cottonbro studio, Doğan Alpaslan Demir, Konsta Nurkkala, RDNE Stock project, Jakub Zerdzicki, Yan Krukau, Yaroslav Shuraev, Katrin Bolovtsova, pickarick, Ludovic Delot, Ron Lach, Tima Miroshnichenko, MrColo, Andy Barbour, Artem Podrez, Alex Moliski, Steve B); it shows general scenes, not the events or people described. Screen recordings show real outputs of Qwen2.5-0.5B on our computer (October 30, 2026). The decision-card example uses made-up numbers for illustration. Product logos only identify the products named and belong to their owners.
- Narration is a synthetic (AI) voice.
