AI Wiki中文/EN

ELIZA: a conversation built from rules

ELIZA 与对话的错觉

Trace keyword selection and response assembly, then examine what conversational plausibility does and does not establish.

On this pageHistorical contextDates and evidenceContributions and methodsDebates and boundariesQuestions and exercisesResearch connections

The problem in its time

A reply can feel relevant because it reuses the words you just supplied. That feeling is worth examining before attributing a detailed model of your situation to the speaker. ELIZA made this gap between conversational appearance and program mechanism unusually visible.

Weizenbaum’s January 1966 paper describes a program in MIT’s time-sharing environment. Input is handled through keyword-triggered decomposition rules and corresponding reassembly rules. A script configures the style of conversation; the well-known therapist-like setting is one such configuration, not a general clinical capability. ELIZA—A Computer Program for the Study of Natural Language Communication Between Man and Machine

This chapter also links Anthony Hay’s modern C++ reconstruction. The repository is useful for studying an implementation and its stated provenance, but it must remain distinct from the historical source code and from Weizenbaum’s paper. We have reviewed the pinned README and license, not run that reconstruction as part of this chapter. Joseph Weizenbaum’s 1966 ELIZA recreated in C++ — revision 0d34ebc23409

What the evidence establishes

The original paper explains how a template splits an input into components, then a reassembly rule places selected components into a response. Its notation distinguishes a variable-length component from a component with a specified number of words. Keywords can have precedence, so selecting a response involves more than a single undifferentiated substring check. ELIZA—A Computer Program for the Study of Natural Language Communication Between Man and Machine

Weizenbaum also explains why the therapist-like conversational setting is convenient: a partner can ask about the user’s words while appearing to know little of the surrounding world. The reader should treat this as an analysis of a conversational setup, not evidence that the program performed psychotherapy. His concluding discussion emphasizes the human participant’s contribution to the impression of being understood. ELIZA—A Computer Program for the Study of Natural Language Communication Between Man and Machine

Hay’s README says the reconstruction began before original source material was found and was subsequently revised in light of discoveries. That is a helpful provenance trail for a modern project. A program that follows a published description, a later reconstruction informed by recovered material and an original historical artifact are three different things. Joseph Weizenbaum’s 1966 ELIZA recreated in C++ — revision 0d34ebc23409

Work through the idea

Build one deliberately small response rule on paper. If the input starts with “I remember ”, capture everything after that prefix. Insert the captured text into “What about [captured text] stays with you?” For the input “I remember the station”, the rule produces a grammatically plausible question about the station.

The computation needs a prefix match, a captured segment and a response template. It does not need to know whether a train ever stopped there, whether the station is real or whether the user is recalling a pleasant event. That observation concerns our single invented rule. It is not a claim that the original DOCTOR script contains this exact rule or would produce this exact response.

Now change the input to “I do not remember the station”. The prefix no longer matches. A carefully implemented version of our rule reports no match and uses an explicitly defined fallback. A careless shortcut that searches only for the word “remember” and ignores the negation can produce a misleading reply. This is a useful counterexample for testing the shortcut; it is not a documented historical ELIZA failure.

Finally, imagine two matching keywords with different priorities. A rule-selection policy must decide which one controls the response. Different policies can produce different conversations from the same user sentence even when the underlying templates are unchanged. Trace selection, decomposition and reassembly separately before describing the output as understanding.

Attribution and limits

The term “ELIZA effect” is often used for attributing more understanding to a system than its mechanism warrants. The historical paper gives a concrete way to investigate that tendency: inspect the procedures and the user’s contribution to the interaction. A memorable dialogue alone cannot settle what internal knowledge the system has.

Do not turn that observation into the opposite overgeneralization. ELIZA’s mechanism does not prove that every later conversational system is implemented with hand-written templates. Contemporary language models require their own explanation and tests. Comparing systems means comparing their actual information processing, not simply noticing that both produce text.

Reconstruction claims also need boundaries. The linked project identifies its own implementation and revisions; its README’s historical interpretations remain the author’s interpretations. The CC0 license permits reuse, but this encyclopedia links the project without copying its code or images and makes no new claim of exact historical execution.

Exercises with answers

1. What information does the invented prefix rule actually use?

The prefix, the remaining input characters and a fixed response template; it has no station-world model.

2. Why should the negated input not trigger that exact rule?

It does not begin with the required prefix. Ignoring this difference changes the stated matching procedure.

3. Is a modern C++ reconstruction the original 1960s program?

No. Its provenance and source identity must be stated separately, even when it aims at faithful behavior.

4. Does ELIZA’s template mechanism establish how all modern chatbots work?

No. Each system needs evidence about its own mechanism and behavior.

Read the original sources

Read the 1966 paper’s decomposition/reassembly discussion, keyword precedence and concluding psychological analysis. The linked university transcription has a page-range typo and does not supply the full appendix; we do not use it to claim a line-by-line script reproduction. The scanned anniversary reprint identifies the original journal range as pages 36–45. ELIZA—A Computer Program for the Study of Natural Language Communication Between Man and Machine

For implementation study, use the pinned reconstruction rather than an unversioned search snippet. Continue with natural language processing and the Turing test to separate conversational evidence from stronger claims about intelligence. Joseph Weizenbaum’s 1966 ELIZA recreated in C++ — revision 0d34ebc23409

Make a prediction, then check

A template-based reply sounds relevant. What does that alone establish?

Choose one answer

Learning objectives

  • Explain a template reply by tracing selection and string components.
  • Separate original artifacts, modern reconstruction and claims of understanding.

Prerequisites & connections

This article can be used as an entry point.

Explore related knowledge →

References

  1. ELIZA—A Computer Program for the Study of Natural Language Communication Between Man and Machine
    Joseph Weizenbaum · 1966
  2. Joseph Weizenbaum’s 1966 ELIZA recreated in C++ — revision 0d34ebc23409
    Anthony Hay · 2026

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Codex · 2026-09-07 · Codex single-AI-author historical check: bounded original sources, explicit attribution and chronology, original hand-traced examples, matched bilingual sections and exercises. Not independent human or second-agent review; no historical code execution claimed.

  • Single-AI-author historical check of bounded primary passages, chronology, attribution, claims versus later interpretation, and corresponding bilingual examples and exercises. No independent human or second-agent review; historical essays require no executable program.
  • Hand-traced the invented prefix/capture/reassembly and negated-input counterexample; no historical-script execution or clinical efficacy claimed.
  • Complete bilingual prose and corresponding exercises promoted with formal status and SHA binding. Algorithm tests read formal MDX; historical essays claim no executable program or computational tests.

Source locations checked:

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.