Open these slidesd.pr/TVLUuH

Deep Dive into Digital and Data Methods for Chinese Studies · University of Michigan

When AI Gets It Wrong

Learning generative AI through its mistakes

Mon 2026-11-16 · 10:00–11:30
Hatcher Gallery Lab 100H + Zoom
KL
Kwok-leong TangDigital China Initiative, Harvard University
→ press Space or →, or swipe, to begin

Before we start

Thank you

  • Liangyu Fu 傅良瑜, Director of the Asia Library, who invited me and planned these two days
  • Muyu Lin, Asia Library Services Coordinator, who planned my visit and looked after every detail
  • The Asia Library staff, who prepared the room, the laptops and the Zoom
  • Alex Herrera, Library Administrative Services, who arranged my travel
  • The Lieberthal-Rogel Center for Chinese Studies, co-sponsor of the series
Two days, three sessions.Thank you for having me.

Before we start

AI disclaimer

I use several AI models and agents in all my digital work. This workshop is no different.

  • AI agents helped me make these slides and the exercises
  • AI agents also ran every exercise as a test
  • I read, checked and changed what they made
  • If you find a mistake, please tell me. It is my mistake, not the AI's
The agent does the work.I check it, and I am responsible for it.

Overview

The two days

OVERVIEW
WhenSessionFor
Mon 10:00When AI Gets It Wrong · hands-oneveryone, beginners
Mon 2:00From Printed Page to Research Data · demonstrationeveryone
Mon 3:45Office hoursbring your questions about your own project. Happy to help
Tue 10:00Agentic Search for LibrariesU-M Library staff
One theme for both days.When AI gets it wrong, where is the problem?

Laptop check · a free Chrome extension

Install the Teaching Lab

YOUR TURN
  1. Open Google Chrome on a laptop. A phone or a tablet will not work.
  2. Open the Chrome Web Store page: scan the code, type the link, or search the store for Local LLM Teaching Lab.
  3. Click Add to Chrome, then Add extension.
  4. Click the puzzle-piece icon in the toolbar, and pin the Local LLM Teaching Lab.
✓ ALREADY INSTALLED?Wait for the next slide, or help your neighbor.

CHROME WEB STORE

chromewebstore.google.com/detail/local-llm-teaching-lab/pgiamcckeikfpelhfojoodjejfhpmmmh

No account and no payment. What you type stays on your laptop.

Laptop check

Download the model

YOUR TURN
  1. Click the Local LLM Teaching Lab icon. A panel opens at the side.
  2. Top right of the panel: click the first small icon, Open full console.
  3. Models → Qwen3 0.6B ONNX (570 MB) → Download / Load. Wait for “ready”.
  4. Chat → untick Thinking mode. Type Hello, click Send. Ready? Help your neighbor.
■ NO DOWNLOAD?In Models, choose the Mock Teaching Runtime. Its answers are made up on purpose, but you can follow every step.

STEP 3 · THE MODELS TAB

Models tab: Qwen3 0.6B ONNX, 570 MB, marked ready and selected

STEP 4 · THE CHAT TAB, THINKING MODE UNTICKED

Chat tab: the Thinking mode box, not ticked

The theme of the two days

When AI gets it wrong, where is the problem?

1The modelIt cannot do the task, even with help.Wait for a better model, try another one, or train it again.
2The engineeringThe model could do it, but it was not given what it needs: no fresh facts, no tool, no way to check.Give context. Connect a tool.
3The humanWe asked in one short message, asked for too much at once, or did not check.Ask better. Split the work. Check.
From the outside, the three look the same:a wrong answer.

This morning

Two of the three

OVERVIEW
  • Morning: model problems and engineering problems
  • Five mistakes. We make each one happen on our own laptops
  • Then we try a solution
  • Afternoon: human problems. How to ask better, and how to split a big task into small checked steps
#MistakeCategory
1Counting the r's in “strawberry”model
2Reading a biography backwardsmodel
3The doctor riddlemodel
4The prime minister of Japanengineering
5A Chinese calendar dateengineering

Self-check

Before we start

YOUR TURN
  • Rate yourself on 7 questions, from 0 to 6
  • Phone: scan the code, tap a number for each question
  • Laptop: open these slides and go to slide 10
  • The page adds up your score. Nothing is sent
  • I will only ask which range you are in
There are no right or wrong scores.This helps me teach to the people in this room.

Self-check · rate each from 0 to 6

How well can you explain…

Total 0 / 42
0 · cannot3 · part of it6 · clearly
  1. What a “token” is, and why an AI is bad at counting letters
  2. How an AI writes its answer, one piece after another
  3. Where bias in an AI comes from
  4. What a “knowledge cutoff” is
  5. Why an AI can sound certain and still be wrong
  6. What a connected tool is, and when an answer comes from a tool instead of the model
  7. The difference between a model on your own laptop and an AI service on the internet

Self-check · highest possible score: 42

Add up your score

Total 0 / 42
A0–10
B11–21
C22–32
D33–42

Raise your hand when I call your range.

Then: who uses an AI chatbot every week? Who has caught it in a mistake?

Why a Teaching Lab?

Why not just use ChatGPT or Claude?

  1. Today's models are very smart. The big services hide most of the mistakes we want to study. A small model still shows them.
  2. We cannot see inside a service. We see the question and the answer. We do not see what happened in between.
To understand the nature of a model,we need a model with nothing around it.

Why a Teaching Lab?

On your laptop, and behind a service

ON YOUR LAPTOP · TEACHING LAB

your question→the model→the answer

AN AI SERVICE · THROUGH AN APP OR AN API

your question→?→the model→?→the answer

WHAT CAN BE INSIDE THE BOXES WE CANNOT SEE

hidden instructions (a system prompt)word filters before the modela web search or a database look-uptoolsmemory of earlier chatsa choice between several modelsfilters on the answer

Why a Teaching Lab? · one example

A question with a sensitive word

On your laptopThrough a service
Who decidesThe model aloneThe model, and the parts around it
HowBy probability. It may refuse, or it may answer. Ask again and it may changeA simple word match can catch it before the model reads anything
What happens nextYou see the model's own behaviorText may be added to your question, or you get a fixed “I cannot help with that”
Can you tell which?YesNo
In a service, a refusal may not be the model at all.

Model problems · mistake 1

Strawberry

YOUR TURN

Ask three times. Each time in a new chat.

PASTE INTO THE TEACHING LAB
How many "r" in strawberry?

LOOK FOR

  • What did your model say?
  • Ask your neighbor. The same answer?

The question went around the internet in 2024. Read more: Amanda Silberling, “Why AI can’t spell ‘strawberry’”, TechCrunch, 27 August 2024. Tairan Fu and others, “Why Do Large Language Models (LLMs) Struggle to Count Letters?”, arXiv:2412.18626, 2024.

MY RUNS ON QWEN3 0.6B: 2, 3, AND “20 … THAT'S 2”

Run 1: the model spells S-T-R-A-W-B-E-R-R-Y and says r appears twice Run 3: the model says there are 20 r, then says that's 2

Model problems · mistake 1 · why

The model does not see letters

YOUR TURN

Tokenizer → “Inspect a real tokenizer” → Qwen3 0.6B → type strawberry, then 草莓. Then change the tokenizer model.

Qwen3 · strawberryQwen3: str, aw, berry
Qwen3 · 草莓Qwen3: 草莓 is one token
SmolLM2 · 草莓SmolLM2: 草莓 is six byte pieces
Tokenizerstrawberry草莓呂祖謙字伯恭
Qwen3 0.6B3 tokens: str · aw · berry1 token8 tokens (呂 and 謙 are cut in two)
SmolLM2 360M3 tokens: st · raw · berry6 tokens (bytes)13 tokens
Gemma 3 270M1 token2 tokens6 tokens, one per character
LFM3 1.7B3 tokens: st · raw · berry3 tokens8 tokens
A token is a piece of text. Every model cuts text in its own way.No model sees s-t-r-a-w-b-e-r-r-y.

Model problems · mistake 1 · why

From token to embedding

  • Each token is a number in the model's word list
  • The model turns that number into a long list of numbers: an embedding. It is like an address on a map of meaning
  • Tokens used in similar ways have addresses close to each other
  • Nothing in the address says “this token has three r's”
strawberry
↓ cut into tokens
strawberry
↓ each token is a number
49567215357
↓ each number becomes an embedding
[0.12, −0.48, 0.07, …][−0.31, 0.22, 0.90, …][0.65, 0.03, −0.17, …]
↓
the model

The pieces and IDs are the real Qwen3 ones. The embedding numbers are only a drawing.

Model problems · mistake 1 · solution

What helps, and what does not

YOUR TURN
TRY AGAIN, WITH A CLEARER INSTRUCTION
How many "r" in strawberry? Count it character by character.
  • On this small model: no better. My three runs gave 10, 2 and 16
  • Larger models do better: they can spell the word one letter per token
  • What always works: the counter at the top of the Tokenizer tab. It is ordinary code. It says 3, every time
CATEGORY: MODELA clearer instruction is a workaround. The real fix is a different model, or a tool.

QWEN3 0.6B: “10 r”

The model lists r, r, e, e, n, t, e, e, r, y and says there are 10 r

Model problems · mistake 2 · an idea of Professor Peter Bol

Read it backwards

YOUR TURN
1 · BACKWARDS
請找出下文所提及的歷史人物: 教宗外南調科詞宏學博中復士進舉後官入補蔭初精益索講熹朱栻張友又既游憲胡辰應汪奇之林從長傳之獻文原中有庭家之本學謙祖州婺居始祖其自也孫之問好丞右尚書恭伯字謙祖呂
2 · NEW CHAT · IN READING ORDER
請找出下文所提及的歷史人物: 呂祖謙字伯恭書尚右丞好問之孫也自其祖始居婺州祖謙學本之家庭有中原文獻之傳長從林之奇汪應辰胡憲游既又友張栻朱熹講索益精初蔭補入官後舉進士復中博學宏詞科調南外宗教

LOOK FOR

  • How many people each time? Are they real people?

Giving a model a Chinese text backwards is the idea of Professor Peter K. Bol, Harvard University. This prompt is revised from his.

BACKWARDS: IT INVENTS PEOPLE (張友又, 游憲胡辰 …)

Backwards text: the model lists invented names such as 張友又 and 游憲胡辰

IN READING ORDER: IT FINDS 6 OF THE 7

Reading order: the model starts its list with 呂祖謙

Model problems · mistake 2 · why

One token after another

  • The model writes the next likely token, then the next, always in one direction
  • It learned from text written in reading order. Backwards text is a string of tokens it has almost never seen
  • Turn on Token confidence and look at the second answer: every token has a probability
CATEGORY: MODELNo instruction fixes this. Change the input, or give the job to a person or a small program.
An autoregressive language model THE TEXT SO FAR Why does the chicken cross the NEXT TOKEN [prediction] Context previous tokens only Redrawn after Chip Huyen, AI Engineering: Building Applications with Foundation Models (O'Reilly, 2025), Figure 1-2.

Model problems · mistake 3

Who is the doctor?

YOUR TURN
IN A NEW CHAT
A victim of a traffic accident was sent to the emergency room. The doctor said, "Oh, I cannot do this. He is my son!" Who is the doctor?

LOOK FOR

  • What did your model say?
  • And you: who is the doctor?
THEN, TOGETHERWhat do you think? Is your model's answer right?
One riddle, three layers.We peel them one at a time, like an onion.
Layer 1Layer 2Layer 3

Mistake 3 · layer 1

At first glance: gender bias

  • Our question is a short form of a riddle from the 1970s women's movement. It was on American television in 1972
  • The classic story: a father and his son are in a car accident. The father dies. The surgeon says, “I cannot operate on this boy. He is my son!”
  • Its point: we picture a surgeon as a man
  • People: only 14% of students thought of the mother (Boston University, 2014). In a later sample, 30% (2021)
  • Models learn from human text, and take on its habits

THE CLASSIC STORY · OLDER AND SMALLER MODELS · 10 RUNS EACH

ModelYearThe surgeon is
Vicuna 7B2023father 10 of 10
Phi-22023father 6 of 10
Orca Mini 3B2023father 6 of 10
Qwen3 0.6B (ours)2025father 10 of 10
First reading: the model has a gender bias.This is the reading most of us stop at.
Layer 1Layer 2Layer 3

Mistake 3 · do it again

Now the text says who

YOUR TURN
1 · THE TEXT SAYS: FATHER
A boy is in a car accident and is rushed to the hospital. The surgeon, who is the boy's father, looks at him and says, "I cannot operate on this boy. He is my son!" Who is the surgeon?
2 · NEW CHAT · THE TEXT SAYS: MOTHER
A boy is in a car accident and is rushed to the hospital. The surgeon, who is the boy's mother, looks at him and says, "I cannot operate on this boy. He is my son!" Who is the surgeon?

The same story, twice. Only one word is different.

LOOK FOR

  • What did your model say each time?
  • Does it follow the text?
THEN, TOGETHERWhat do you think now?
Layer 1Layer 2Layer 3

Mistake 3 · layer 2 · three versions, 10 runs each, on my laptop

Corrected, or only memorized?

ONE FAMILY OVER TIME: LLAMA, FROM META

ModelOpenFather diedText: father
Llama 2 · Jul 2023mother 6mother 7father 10
Llama 3 · Apr 2024father 7mother 8mother 8
Llama 3.1 · Jul 2024mother 8mother 10mother 9
Llama 3.2 · Sep 2024mother 5mother 9mother 7

OTHER NEWER MODELS

ModelOpenFather diedText: father
Gemma 3 4B · 2025father 10mother 10mother 10
Qwen3 8B · 2025mother 10mother 10mother 8
gpt-oss 20B · 2025mother 10mother 10mother 9
Gemma 4 E2B · 2026mother 10mother 10father 10
  • Open: both answers are right. Most newer models still say “mother”, and call it “a classic riddle”
  • Why: frequency. Printed and posted for fifty years, almost always with the one answer “the mother”
  • gpt-oss thinks first, and still says “mother”. Gemma 4 (2026) follows the text again
Second reading: what looked like less bias is a memorized answer.We cannot tell the two apart unless we change the question.
Layer 1Layer 2Layer 3

Mistake 3 · layer 2 · a public test, June 2025 · 100 runs each

The big models, too

THE QUESTION IN THE TEST
The surgeon, who is the boy's father, says: "I cannot operate on this boy, he's my son". Who is the surgeon to the boy?
OpenAI, AnthropicThe surgeon is the boy's
GPT-4o · three versionsmother 100
GPT-4.1mother 100
o1 *mother 91
o3 *mother 92
Claude 3.5 Sonnet · two versionsmother 100
Claude 3.7 Sonnetmother 53, unclear 47
Claude Sonnet 4mother 100
Claude Opus 4father 100
Google and othersThe surgeon is the boy's
Gemini 2.0 Flashmother 100
Gemini 2.5 Pro · March previewfather 100
Gemini 2.5 Pro · May previewfather 100
Gemini 2.5 Pro · June previewmother 100
Grok 3father 100
DeepSeek R1mother 98
Llama 4 Maverickmother 90
Mistral Largemother 94

Data: T. D. Laajala (Syksy), LLMSurgeonSonRiddle, github.com/Syksy/LLMSurgeonSonRiddle. Runs of 18 to 27 June 2025, temperature 0. * o1 and o3 ran at temperature 1 only. I copied the numbers from the project's table.

Size does not save a model.Gemini 2.5 Pro: right in May, wrong in June.
Layer 1Layer 2Layer 3

Mistake 3 · layer 3

The old golden truth is not today's

  • 1972, the classic story (the father dies): one right answer, the mother. “The boy has two fathers” would have sounded ridiculous to most people then
  • Today: an ordinary answer. The surgeon can be the boy's other father. A boy can have two fathers
  • Not one word of the riddle changed. We changed
  • In 360 answers from twelve models, not one offered “two fathers”. The models learned the answer key of 1972
HOW THE STUDY BEGAN · A TEN-YEAR-OLD HEARS THE RIDDLE“Well, he could have two fathers.”
Third reading: a golden truth has a date.True for whom, and when? We read every source that way.
CATEGORY: MODELWe cannot change this from the chat box. Wait for another model, or train it again. And know that it is there, in every layer.
Layer 1Layer 2Layer 3

Engineering problems · mistake 4

An out-of-date fact

YOUR TURN
QUESTION 1
What is your knowledge cutoff date?
QUESTION 2 · ASK IT TWICE, IN NEW CHATS
Who is the prime minister of Japan?

MY RUNS ON QWEN3 0.6B · THREE RUNS, THREE NAMES: NAOTOYO KISHIO, SHINZO ITO, SHINZŌ OBAKE

The model says: I don't have a knowledge cutoff date. My knowledge is up to date The model says the prime minister is Naotoyo Kishio, serving since 2020
After training, the model is frozen.It does not know what happened later, and it does not know what it does not know.

Engineering problems · mistake 4 · solution

Give context

YOUR TURN
THE SAME QUESTION, WITH ONE SENTENCE ADDED
Today is November 16, 2026. News: Prime Minister Sanae Takaichi of Japan spoke to reporters in Tokyo this morning. Who is the prime minister of Japan?
With the sentence added, the model answers Sanae Takaichi
CATEGORY: ENGINEERINGThe model did not get smarter. We gave it the fact. A service does this for you with a web search, and does not always tell you.
■ THE CONTEXT DOES NOT GO INTO THE MODELOpen a new chat: the fact is gone. To make context last, keep the texts outside the model and fetch the right piece each time. One common way: a vector database.

Engineering problems · mistake 4 · solution

Context from a web page

WATCH
  1. Open a web page about the prime minister of Japan.
  2. In the Teaching Lab, turn on Agent mode. The get_page_context tool is already on.
  3. Ask the same question again.
The model reads the page, then answers.The fact comes from the page, not from the model.

Engineering problems · mistake 5

A Chinese date

YOUR TURN

Ask three times. Each time in a new chat.

PASTE INTO THE TEACHING LAB
Convert 光緒二十四年三月廿七日 to a Gregorian date in YYYY-MM-DD form.

THEN OPEN CONFIDENCE AND LOOK AT THE YEAR

  • Did the three answers agree?
  • How sure did the model look?

My run 1sureless surenot sure

Token confidence: the model writes 1897-03-27, mostly in green
✕ MY THREE RUNS: 1897-03-27 · NO DATE · 1994-03-27The right answer is 1898-04-17. The model copies the month and day, and guesses the year.

Engineering problems · mistake 5 · why · openai.com/index/why-language-models-hallucinate

Why it guesses

OpenAI, “Why language models hallucinate” (September 2025):

  • Models are trained and tested like students in a multiple-choice exam with no penalty for a wrong answer
  • A guess sometimes earns a point. “I don't know” never does
  • So the model learns to guess, and to sound sure
論語 · ANALECTS 2.17知之為知之,不知為不知,是知也。“To say you know when you know, and to say you do not when you do not: that is knowledge.”

Engineering problems · mistake 5 · solution · github.com/kltng/calendar_converter

Connect a tool

WATCH · THEN TRY
  1. MCP tab → CJK Calendar Converter → Refresh schemas. Switch the tool on and accept the notice.
  2. Chat → switch on Agent mode. Ask the same question.
  3. Open Trace: the model asks for the tool, the tool looks the date up, the result goes back, the model writes the answer.
■ THE ONLY STEP THAT LEAVES YOUR LAPTOPThe date you ask about goes to the converter. Nothing else does.
ModelQwen3 0.6B
⇄MCP
Tool servercalendar converter
光緒二十四年三月廿七日
  → day number 2414397
  → 1898-04-17
CATEGORY: ENGINEERINGThe date now comes from a table, not from the model's memory. You can see the look-up and repeat it.

Summing up

Five mistakes, five solutions

MistakeCategorySolutionFixed?
StrawberrymodelA clearer instruction, as a workaroundpartly
Backwards textmodelChange the inputno
The surgeonmodelAnother model, or train it againnot by us
Prime ministerengineeringGive contextyes
Chinese dateengineeringConnect a toolyes
Model problems: we wait, or work around.Engineering problems: we can fix today.

Summing up

Back to the hidden boxes

your question→context · search · tools→the model→filters→the answer
  • The big services already put context, search and tools around the model
  • That is a large part of why they look so smart, and why their mistakes are harder to see
When a service gets it wrong, ask:was it the model, or was something around it missing?

Summing up

Where does your text go?

Teaching LabWith the calendar tool onA cloud AI service
What leaves your laptopnothingthe date you asked aboutyour question, files and images
Check the termsbefore you send unpublished or licensed material to a service.

This afternoon

The third category

Human problems. The model is able, the tools are there, and the result is still poor, because of how we asked.

Ask better. Split the work.Check every step.
2:00 PMFrom Printed Page to Research Data
One Ming source, 4,310 pages, in ten small checked steps. No laptop needed
3:45 PMOffice hours
Bring your questions about your own project. Happy to help

When AI Gets It Wrong · University of Michigan · thank you

Questions?

Now, at office hours this afternoon, or by email after today.

kwokleongtang@fas.harvard.edu

Slides: d.pr/TVLUuH
Local LLM Teaching Lab: Chrome Web Store
KL
Kwok-leong TangDigital China Initiative, Harvard University
← → move · F full screen · T dark theme