1966 · Symbolic AI

ELIZA

Reflect the words back and call it understanding.

No corpus needed. Every other page in this journey loads Shakespeare's sonnets. This one doesn't — and that is exactly the problem with rule-based systems. Rules need no data to run; they also learn nothing from it.

How it works

Every other technique here counts something. ELIZA counts nothing. It is a rule-based system: a fixed, hand-written list of patterns, each paired with response templates, checked against your input from top to bottom. The first pattern that matches wins. Joseph Weizenbaum built it in 1966 to play a Rogerian psychotherapist — a role chosen deliberately, because a Rogerian therapist mostly reflects the patient's own words back as questions, which needs no world knowledge at all.

Say "I need help" and ELIZA doesn't need to know what help means. It just needs to notice the pattern I need (...), swap the pronouns ("I"→"you", "my"→"your"), and slot the reflected text into a template:

pattern: /\bi need (.*)/i responses: "Why do you need {1}?" "Would it really help you to get {1}?" "Are you sure you need {1}?" you > I need some help with my life. eliza > Why do you need some help with your life?

"I" became "you", "my" became "your" — the sentence was never understood, only grammatically mirrored. When nothing matches, ELIZA falls back to a cycling list of empty prompts ("Please go on.", "Tell me more.") that keep the conversation moving without engaging with a single word you said.

1. /i need (.*)/ → "Why do you need {1}?" (+2 more)
2. /i am (.*)/ → "How long have you been {1}?" (+2 more)
3. /i can't (.*)/ → "How do you know you can't {1}?" (+2 more)
4. /i feel (.*)/ → "Tell me more about that feeling." (+2 more)
13 more rules — every one of them in core.js, none hidden
fallback → "Please go on." (+4 more, cycled)

The entire model, in full. Nothing is trained; nothing is counted. Every reply traces back to one line of source you could read in under a minute.

Try it

Talk to ELIZA (a fresh conversation each time you reload)
Type a line above and press Send, or Enter.

Where it falls short

It understands nothing. Every reply is a syntactic reflection of your own words. ELIZA has no model of what "help", "sleep", or "family" mean — it cannot answer a factual question, hold a fact across turns, or notice a contradiction.

Coverage does not scale. This demo has 17 rules; Weizenbaum's original had a few hundred. Getting from a handful of patterns to "handles arbitrary English" is not a matter of writing more of them — language has combinatorially many ways to say the same thing, and hand-authored patterns cannot keep up.

It is brittle to phrasing. "I need help" triggers a rule; "help is something I need" does not, even though they mean the same thing. A rule-based system only recognises the exact surface forms someone thought to write down.

The illusion depends entirely on the topic. Rogerian therapy is a best case for pattern reflection — the therapist is supposed to say very little. Ask ELIZA to translate a sentence or answer a trivia question and it has nothing but the same handful of empty prompts.