ELIZA chatbot: how a 1960s program fooled people

The ELIZA chatbot was a program written at MIT in the mid-1960s that answered people's typed sentences by matching keywords and rebuilding their own words into replies. It understood nothing, yet some people talked to it as if it did. This post explains how ELIZA worked, why it fooled people, and what its creator made of that. The facts come from Wikipedia's ELIZA and ELIZA effect articles.

Contain ASI is a story strategy game for 1 to 4 players that runs in your browser: as a researcher, research manager, CEO or government, you try to keep four AI labs from crossing into recursive self-improvement before 2027. Its labs, people and events are all fictional.

What was the ELIZA chatbot?

ELIZA is an early natural language processing program that Joseph Weizenbaum developed from 1964 to 1967 at MIT. The article says it simulated conversation through pattern matching and substitution, which gave users an illusion of understanding even though the program had none.

The program was first written in a language called MAD-SLIP. What it said came from separate "scripts", written in a Lisp-like form. The best-known script, DOCTOR, played a Rogerian psychotherapist, a style in which the therapist often reflects the patient's words back. The article calls ELIZA one of the first chatbots and one of the first programs to attempt the Turing test, which we cover in Turing test: what it is and why people argue about it.

The name comes from Eliza Doolittle, the character in George Bernard Shaw's play Pygmalion who is taught to speak differently. The article notes one difference: ELIZA could not learn new patterns of speech by talking. To change how it behaved, someone had to edit its script.

How the ELIZA chatbot worked

Weizenbaum named five technical problems to solve: spotting key words, finding a minimal context, choosing a fitting transformation, answering when there is no key word, and letting people edit scripts. The program's loop is short.

  1. Find a keyword. The script marks some words as important and gives each a rank. Words found in your sentence go onto a stack, with the highest rank on top.
  2. Split the sentence. A decomposition rule for that keyword breaks your sentence into labeled parts.
  3. Rebuild a reply. A reassembly rule slots those parts into a template and adds programmed words.
  4. Handle a miss. With no keyword, ELIZA could say something empty such as "I see" or "Please go on", or use a memory of your earlier input.

Some words were treated the same way whatever the context. The article gives "alike" and "same", which brought the reply "In what way?", and the switching of first-person and second-person pronouns. This is rule-following of the kind we describe in symbolic AI: what good old-fashioned AI was and why it faded, and the ELIZA effect article calls ELIZA a symbolic AI chatbot.

Why the DOCTOR script

Weizenbaum picked psychotherapy to "sidestep the problem of giving the program a data base of real-world knowledge". A therapist who turns your statement into a question needs to know nothing about the world, so the script could carry the conversation forward by reflecting your words back.

A worked example: one sentence through ELIZA

The article gives Weizenbaum's own example. You type "You are very helpful". The pronouns are switched, so the program sees "I are very helpful". The decomposition rule splits that into four parts: nothing, "I", "are" and "very helpful". The reassembly rule "What makes you think I am (4)" then puts part four into the gap, and the reply is "What makes you think I am very helpful?"

Diagram of one sentence passing through ELIZA's four steps: input, decomposition, reassembly and reply

Try the same steps by hand on "You are very kind". You get "What makes you think I am very kind?" and you have never needed to know what "kind" means. That is the whole trick, and it is why the reply says nothing about the world.

Why people believed ELIZA understood

The article says Weizenbaum was surprised that some people, including his secretary, gave the program human-like feelings. She reportedly asked him to leave the room so she and ELIZA could have a real conversation. He later wrote that he "had not realized ... that extremely short exposures to a relatively simple computer program could induce powerful delusional thinking in quite normal people".

The habit got a name. The ELIZA effect is a tendency to project human traits, such as understanding or empathy, onto simple computer programs. Douglas Hofstadter's example is a cash machine that prints "THANK YOU": a casual observer might think it is grateful, but it only prints a stored string. The article says the effect occurs even when users know the output is fixed. It also notes that Charles Babbage remarked in the 19th century on how easily we describe machines in psychological terms.

Not everyone reads the effect as being fooled. Noah Wardrip-Fruin argues that the illusion is paper-thin and that longer chats turn into play: some users try to make the program say silly things, and others help it stay coherent. Sherry Turkle, who popularized the term, noticed the same pattern, and she tied it to a wish to keep up the illusion. The two readings differ, and the article gives both.

Weizenbaum's response

The article says the public reaction disturbed Weizenbaum and led him to write Computer Power and Human Reason: From Judgment to Calculation, a book on the limits of computers. In the 2010 documentary Plug & Pray he said that only people who misunderstood ELIZA called it a sensation.

Other people were more hopeful. The article says many academics believed ELIZA could help people with psychological problems and aid doctors treating them. The scholar Caroline Bassett later called it an early prototype of computational therapy. The article gives no ruling between these views, and neither does this post.

ELIZA's legacy and its rediscovered code

In 1972, ELIZA took part in a computer-only conversation with PARRY, a program built to simulate a patient with schizophrenia. Versions of ELIZA were later written in many languages, and one still ships with GNU Emacs: type M-x doctor. It won a 2021 Legacy Peabody Award.

For decades the original source code was thought lost, since few papers then printed code. In 2021 Jeff Shrager and the MIT archivist Myles Crowley found the MAD-SLIP listing, with the DOCTOR script, in the MIT archives, and it was released as public domain. In December 2024, Rupert Lane and other engineers ran the original program and reproduced almost exactly the conversations in Weizenbaum's 1966 paper, using about 96% of the original functions.

The article adds that scholars now stress that Weizenbaum presented ELIZA as a way to study how people and machines talk, not mainly as a chatbot. For more on the long run of such ideas, see our history of AI: a short timeline.

What ELIZA shows about judging AI, and Contain ASI

ELIZA is a small case of a question that still matters: does fluent output show understanding? Philosophers argue about that in the Chinese room argument. The ELIZA effect article says its discovery showed that social engineering, not explicit programming, could be used to pass a Turing test. This post does not say whether any modern system understands, because neither source does.

Contain ASI asks a different question as a story. Its home page reads: "January 2024. Four AI labs. One race. For three years, keep every lab from crossing into recursive self-improvement before 2027." You play as a researcher, research manager, CEO or government, in a game that is fiction, not a forecast: the footer says all its labs, people and events are made up.

Frequently asked questions

Who created the ELIZA chatbot?

Joseph Weizenbaum developed it from 1964 to 1967 at MIT.

What was the DOCTOR script?

It was the best-known script ELIZA ran. It played a Rogerian psychotherapist, turning your statements into questions.

Did ELIZA understand what people typed?

No. It looked for keywords, split your sentence and rebuilt it from a template. The article says it gave no response that showed it understood either side of the conversation.

What is the ELIZA effect?

It is the tendency to project human traits such as understanding or empathy onto simple computer programs, even when you know how they work.

Was ELIZA the first chatbot?

The article calls it one of the first chatbots, and adds that Weizenbaum presented it as a program for studying how people and machines communicate.

Get started

Want to try a story about steering AI instead of just reading about it? Play Contain ASI: a story strategy game for 1 to 4 players that runs in your browser. Its labs, people and events are all fictional. You will need a recent Chrome, Edge, Firefox or Safari, because it runs on WebGL 2.

January 2024. Four AI labs. One race.

Visit containasi.vlvd.net
Contain ASI on desktop
Contain ASI on tablet
Contain ASI on phone
0 likes

Comments

No comments yet.

Sign in or make an account to comment.