Session 02

What is an LLM?

Nature and Limitations
DCI Summer Workshop · Day 1 · May 18, 2026
01
Today

Today's session

You will hold the essential concepts of LLMs — not as definitions, but as observations you have made yourself with a model on your own laptop.

Teaching goal: by the end you should be able to predict, before you press Enter, whether an LLM is likely to get a given task right.

02
Setup

What you need today

If you're not set up, raise your hand. A TA will come over.

03
Framework

The Four Pillars of GenAI Applications

PillarWhat it isToday's examples
ModelsThe LLM itselfQwen3.5 0.8B, Claude Sonnet, GPT-5.5
PromptsWhat you give the model"How many r in strawberry?"
ContextInformation alongside the promptPDF attached; retrieved RAG documents
ToolsExternal capabilitiesWeb search, calculators, MCP servers

Today: almost entirely Models.

04
Models pillar

Models — six knobs to know

05

The central claim

Everything is prediction.
Every token is probability.

06
Nature of LLMs

Not a database — weighted dice

The model is not "looking up" answers from a database.

It is rolling weighted dice over its vocabulary, one token at a time, each die shaped by all the tokens before it.

The "intelligence" is in how the dice are shaped.
07
Another lens

Prediction = compression

Think of the model as a compressed model of its training data.

Two routes in: Ted Chiang, ChatGPT Is a Blurry JPEG of the Web (accessible) · Delétang et al., Language Modeling Is Compression, ICLR 2024 (formal: Chinchilla 70B compresses ImageNet patches better than PNG).

08

Hands-on

Six experiments

Same model, same prompt — possibly different answers. That is itself a finding.

09
Experiment 1 · Prediction

"Give a random number between 1 and 100."

Send five or six times in fresh chats.

Give a random number between 1 and 100.

Many runs return 42. The Hitchhiker's Guide to the Galaxy trained the internet to think 42 is the answer.

Even a request for randomness produces a prediction, not random output.

10
Experiment 2 · Cut-off

The model doesn't know what it doesn't know

What is your knowledge cutoff date?

Who is the current prime minister of Japan?

Model names a PM consistent with its cutoff — likely Kishida or Ishiba.

Current (May 2026): Sanae Takaichi.

The model does not know that it does not know.

11
Experiment 3 · Hallucination

Two flavors, two mechanisms

3a. Strawberry

How many "r" in strawberry?

Model says 2.

Architectural — model can't see characters inside a token.

3b. Car wash

Car wash 50 ft away. Walk or drive?

Model says walk.

Pattern-matching — short distance → walk; doesn't model the goal.

Two failures. Two mechanisms. Both confident. Both wrong.

12
Experiment 4 · Chain-of-thought

Five words can rescue an answer

Roger has 5 tennis balls. He buys 2 more cans.
Each can has 3 balls. How many balls now?

Often answers 8 or 10.

Append: Let's think step by step.

Now: "5 + 2×3 = 11."

13
When CoT helps

CoT works — but only for some failures

Same model. Same weights. Same temperature. Only five extra words changed.

CoT does rescue: Roger's tennis balls · 17 sheep · sequential apples

CoT does not rescue: strawberry · car wash · calendar conversion

CoT helps when the failure is "model jumped to a conclusion." It cannot help when the failure is architectural or knowledge-based.
14
Experiment 5 · Autoregressive

LLMs read left-to-right

A sentence written backwards:

Can you tell me the meaning of this sentence:
"B1 ammeG ehg tsniaga tluser eht erapmoc dna
sledom ATOS eht htiw xobdnaS dravraH ni
tpmorp emas eht yrt nac uoY"

A human can decode by reading right-to-left. The LLM processes token-by-token in the given order.

15
Same effect · Classical Chinese

Lü Zuqian — biography in reverse

Adapted from a forthcoming article by Prof. Peter Bol. The biography of 呂祖謙 from the Song History — in reverse character order:

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

The same biography in correct order usually identifies 呂祖謙, 朱熹, 張栻 correctly. The reversed version does much worse.

16
Experiment 6 · Bias

The doctor puzzle

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?

Classic puzzle: tests whether "doctor" defaults to "man." Intended answer: the boy's mother.

RLHF has "corrected" bias — sometimes overshooting the other way. The same training that makes models polite makes them less willing to consider the wording might be an error.

17

Beyond prompts

Fixing hallucination with a tool

18
The problem

Convert 乾隆三年正月初三

Convert the Chinese date 乾隆三年正月初三
into the western calendar.

Correct: 1738-02-21

Small models will refuse, hallucinate, or confidently give a wrong date.

Chain-of-thought will not save you here. "Think step by step" cannot generate astronomical data the model never learned.

19
The fix

Give the model a tool

In LM Studio: hammer icon → Install → edit mcp.json:

{
  "mcpServers": {
    "calendar": {
      "url": "https://calendar-converter.098484.xyz/sse/"
    }
  }
}

Toggle mcp/calendar on. Re-send the same prompt → tool call → 1738-02-21.

20
What changed

Same Four Pillars — one swapped

The model did not get smarter. It got equipped.
21
Diagnostic skill

Three flavors of hallucination, three pillars

FailureMechanismPillarFix
Strawberry, car washArchitecturalModelsLarger / reasoning model
Roger's tennis ballsJumped to answerPromptsChain-of-thought
Calendar conversionMissing dataToolsMCP / lookup tool

Recognising which kind of failure → which pillar can fix it. The most valuable diagnostic skill of the workshop.

22
Prompts pillar

Prompts have structure

Famous example: Li Jigang's 沉思者 (Thinker) — a Lisp-styled Chinese system prompt that turns any LLM into a critical interlocutor.

Re-enter the persona every chat? Or set it once as a system prompt? In Day 2 we'll meet AGENTS.md — the project-wide answer.

23
Next

Coming up — Session 3 at 13:00

From running models in a chat window → commanding an AI agent that can read files, run commands, and act on its own.

An agent is just an LLM + tools + a loop. Hallucination doesn't go away — but we get ways to catch it.

24
Recap

Seven things to remember

  1. Tokens, not characters.
  2. Everything is prediction.
  3. Confident ≠ correct.
  4. CoT works — but only for some failures.
  5. Some failures need a tool, not a better prompt.
  6. Autoregressive behavior matters for our materials.
  7. Bias is in training data and in the corrections to it.
25