ELIZA: A Computer Program for the Study of Natural Language Communication Between Man and Machine

Weizenbaum, 1966, ELIZA (Communications of the ACM)

Subscriber deck — free during early access

32 cards

Introduction

  1. What is ELIZA?
    A program (in MAD-SLIP on MIT’s MAC time-sharing system) that makes certain kinds of natural-language conversation between a person and a computer possible: the user types statements, ELIZA analyses them and types a response.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  2. Why did Weizenbaum name the program ELIZA?
    After Eliza Doolittle of Pygmalion: its language abilities can be continually improved by a “teacher”, and it can be made to appear ever more civilized, “the relation of appearance to reality, however, remaining in the domain of the playwright.”
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  3. What maxim opens the ELIZA paper, and what was the paper’s purpose?
    “To explain is to explain away”: once a seemingly intelligent program’s inner workings are explained plainly, its magic crumbles and it moves from the shelf marked “intelligent” to the one for curios. The paper aims to cause just such a re-evaluation of ELIZA.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  4. What is ELIZA’s gross procedure?
    Read the input and look for a keyword. If one is found, transform the sentence by a rule associated with the keyword; if not, print a content-free remark or, under certain conditions, an earlier transformation. Print the result.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  5. How does ELIZA limit the input it transforms to a single phrase or sentence?
    Commas and periods are delimiters: if a keyword has already been found, everything after the delimiter is deleted; if not, the text up to and including the delimiter is deleted. So only one phrase or sentence is ever transformed.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  6. What is an ELIZA script, and why does it matter that a script is data?
    The keywords and their transformation rules for a class of conversation. Because the script is data, not part of the program, ELIZA isn’t tied to particular patterns or responses, or even one language: scripts existed in Welsh and German as well as English.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction
  7. What five technical problems did ELIZA have to solve?
    (1) Identifying the most important keyword in the input; (2) identifying some minimal context around it (e.g. “you” followed by “are” signals an assertion); (3) choosing and applying a transformation rule; (4) responding sensibly when there are no keywords; (5) making scripts easy to edit and extend.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Introduction

The ELIZA program

  1. Explain ELIZA’s transformations with Weizenbaum’s analogy of the foreigner.
    A foreigner who catches only “I am” in “I am very unhappy these days” might reply “How long have you been very unhappy these days?”: they applied a template matching “I am” and isolating the rest, plus a reassembly kit turning “I am BLAH” into “How long have you been BLAH”, regardless of what BLAH means.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  2. How do decomposition and reassembly rules work? Show “It seems that you hate me”.
    Decomposition (0 YOU 0 ME), where 0 means any number of words, splits the input; the reassembly rule (WHAT MAKES YOU THINK I 3 YOU) inserts component 3.
    component1234
    textIt seems thatyouhateme
    Output: “What makes you think I hate you”.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  3. What does a nonzero integer \(n\) mean in a decomposition rule?
    That the component must consist of exactly \(n\) words. (0 YOU 1 ME) matches “It seems you hate me” but not “It seems you hate and love me”.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  4. Why does ELIZA need keywords at all?
    To sharply limit which decomposition rules are tried: only rules containing the keyword found are candidates, and they can be ordered, with a rule like (0 YOU 0) that is bound to succeed tried last.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  5. How is an ELIZA key list structured?
    A keyword followed by a list of decomposition rules, each followed by its reassembly rules: (K ((D1) (R1,1) (R1,2) …) ((D2) (R2,1) …) …).
    keyword KD1D2R1,1R1,2…R2,1R2,2…
    Decomposition rules (D) with their reassembly rules (R)
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  6. How did ELIZA find keywords efficiently?
    Each keyword was hashed into one of 128 slots of a vector KEY; each input word is hashed the same way, giving the only list that could contain it, so usually only the top of a key list needs checking. Often it takes less time to find a word is not a keyword than to locate one that is.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  7. What are simple substitutions in an ELIZA script?
    Unconditional word-for-word replacements made during the scan itself, written with “=”, e.g. (MYSELF = YOURSELF), (ME = YOU). The word needn’t be a keyword; this is how first- and second-person pronouns are swapped.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  8. Why do keywords have ranks? Give Weizenbaum’s example.
    In “I know everybody laughed at me”, without ranks “I” (found first) would give “You say you know everybody laughed at you”. But the important part starts at “everybody”: people speaking of universals usually mean something specific, so ranking “everybody” higher yields “Who in particular are you thinking of”.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  9. What is the keystack?
    As the input is scanned, each keyword’s rule pointer goes on top of the stack if its rank beats all earlier keywords, otherwise at the bottom. At the end the top holds the highest-ranked keyword, and the rest are in a roughly useful order.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  10. How does ELIZA avoid repeating the same response for a decomposition rule?
    Each matched decomposition rule remembers which reassembly rule it last used and cycles through all its reassembly rules before any repeats.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  11. What does a rule like (=WHAT) do in a script?
    It redirects to another keyword’s transformation rules, so keywords that should behave alike (how, what, when) form an equivalence class without copying rules. It can appear in place of a decomposition or a reassembly rule.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  12. What does the NEWKEY reassembly rule do?
    It abandons the current keyword, pops the next keyword from the keystack and restarts decomposition and reassembly as if the scan had just ended, which in effect lets scripts test for key phrases rather than single words.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  13. What does ELIZA do when no keyword applies?
    It uses the reserved keyword NONE, whose rule (0) matches anything and is followed by content-free remarks (“Please go on”, “That’s very interesting”, “I see”), or, under some conditions, the MEMORY mechanism.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  14. How does ELIZA’s MEMORY mechanism work?
    When the designated keyword (MY) is the highest-ranked one, a randomly chosen MEMORY transformation (e.g. “Earlier you said your 3”, “Does that have anything to do with the fact that your 3”) is applied to a copy of the input and queued. Later, when an input has no keywords, a queued text can be printed as the reply.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  15. How can script words be tagged, and how are tags used?
    With DLIST, e.g. (MOTHER DLIST(/NOUN FAMILY)). A decomposition rule can contain (/FAMILY) to match any word with that tag, as in (0 YOUR 0 (/FAMILY) 0); alternatives can also be listed, e.g. (* FATHER MOTHER).
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program
  16. Why should an ELIZA script start small?
    With the built-in editor, a script can begin as a modest set of keywords and rules and grow with experience, which Weizenbaum saw as the best use of an interactive system: an aid for exploring strategies rather than for debugging a fully thought-out solution.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), The ELIZA program

Discussion

  1. Why did ELIZA’s main script imitate a Rogerian psychotherapist?
    A psychiatric interview is one of the few kinds of dyadic conversation where one participant may pose as knowing almost nothing about the real world: if a psychiatrist answers “Tell me about boats”, we assume a purpose, not ignorance. So the script needn’t store knowledge about the world.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  2. Why do people find ELIZA’s responses plausible?
    The speaker supplies the understanding: they assume their partner has background knowledge, insight and reasoning, and interpret responses consistently with that image, adding rationalizations when needed, until the rationalizations become too massive and the image crumbles.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  3. How does ELIZA relate to Turing’s test, according to Weizenbaum?
    Some subjects were very hard to convince that ELIZA (with its present script) is not human, “a striking form of Turing’s test”. He proposed experiments on what keeps such credibility up or degrades it, and asked what design would make the test more rigorous.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  4. What danger did Weizenbaum see in ELIZA’s success?
    It shows how easy it is to create and maintain the illusion of understanding, and hence perhaps of judgment deserving of credibility, while important decisions increasingly depend on how people interpret computer output.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  5. Is it true that ELIZA’s script contains no information about the world?
    Not entirely: rules like “Everybody hates me” → “Can you think of anyone in particular” rest on specific hypotheses about the world; the script is loosely a model of certain aspects of it, and writing it shows where the programmer’s understanding ends.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  6. What, for Weizenbaum, is the crucial test of understanding that ELIZA fails?
    Not continuing a conversation but drawing valid conclusions from what one is told. That requires storing selected parts of the input, while ELIZA throws away each input except the few kept by MEMORY.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  7. What change of objective did Weizenbaum see as a precondition for a useful ELIZA-like system?
    Switching from concealing its lack of understanding to revealing its misunderstanding, so the user offers information it can learn from; ideally it would have a store of knowledge, act as an information retrieval system and show where its knowledge ends.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  8. What intermediate goal did Weizenbaum propose: building a model of the user?
    ELIZA should slowly build a belief structure (Abelson’s term) of the person, e.g. inferring that someone not married who mentions his wife is widowed or divorced (or confused), and detect rationalizations and contradictions.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion
  9. In “the coldest possible light”, what is ELIZA?
    A translating processor in Gorn’s sense, specially built to work well with natural-language text: it maps expressions of one language (English input) syntactically to another (English output), to which we attribute meanings.
    • Weizenbaum, 1966, ELIZA (Communications of the ACM), Discussion

Source

  • Joseph Weizenbaum. 1966. ELIZA — A Computer Program for the Study of Natural Language Communication Between Man and Machine. In Communications of the ACM, pp. 36–45. doi:10.1145/365153.365168