ELIZA is an early natural language processing computer program developed from 1964 to 1967 at MIT by Joseph Weizenbaum. Created to explore communication between humans and machines, ELIZA simulated conversation by using a pattern matching and substitution methodology that gave users an illusion of understanding on the part of the program, but gave no response that could be considered really understanding what was being said by either party. in MAD-SLIP, the pattern matching directives that contained most of its language capability were provided in separate "scripts", represented in a Lisp-like expression. The most famous script, DOCTOR, simulated a psychotherapist of the Rogerian school (in which the therapist often reflects back the patient's words to the patient), and used rules, dictated in the script, to respond with non-directional questions to user inputs. As such, ELIZA was one of the first chatbots (originally "chatterbots") and one of the first programs capable of attempting the Turing test.
Weizenbaum intended the program as a method to explore communication between humans and machines. He was surprised that some people, including his secretary, attributed human-like feelings to the computer program, a phenomenon that came to be called the ELIZA effect. Many academics believed that the program would be able to positively influence the lives of many people, particularly those with psychological issues, and that it could aid doctors working on such patients' treatment. While ELIZA was capable of engaging in discourse, it could not converse with true understanding. However, many early users were convinced of ELIZA's intelligence and understanding, despite Weizenbaum's insistence to the contrary.
The original ELIZA source code had been missing since its creation in the 1960s, as it was not common to publish articles that included source code at that time. However, more recently the MAD-SLIP source code was discovered in the MIT archives and published on various platforms, such as the Internet Archive. The source code is of high historical interest since it demonstrates not only the specificity of programming languages and techniques at that time, but also the beginning of software layering and abstraction as a means of achieving sophisticated software programming.
Overview
thumb|A conversation between a human and ELIZA's DOCTOR script
Joseph Weizenbaum's ELIZA, running the DOCTOR script, created a conversational interaction somewhat similar to what might take place in the office of "a [non-directive] psychotherapist in an initial psychiatric interview" and to "demonstrate that the communication between man and machine was superficial". While ELIZA is best known for acting in the manner of a psychotherapist, the speech patterns are due to the data and instructions supplied by the DOCTOR script. ELIZA itself examined the text for keywords, applied values to said keywords, and transformed the input into an output; the script that ELIZA ran determined the keywords, set the values of keywords, and set the rules of transformation for the output. Weizenbaum chose to make the DOCTOR script in the context of psychotherapy to "sidestep the problem of giving the program a data base of real-world knowledge", allowing it to reflect back the patient's statements to carry the conversation forward. The result was a somewhat intelligent-seeming response that reportedly deceived some early users of the program.
Weizenbaum named his program ELIZA after Eliza Doolittle, a working-class character in George Bernard Shaw's Pygmalion (also appearing in the musical My Fair Lady, which was based on the play and was hugely popular at the time). According to Weizenbaum, ELIZA's ability to be "incrementally improved" by various users made it similar to Eliza Doolittle, However, unlike the human character in Shaw's play, ELIZA is incapable of learning new patterns of speech or new words through interaction alone. Edits must be made directly to ELIZA's active script in order to change the manner by which the program operates.
Weizenbaum first implemented ELIZA in his own SLIP list-processing language, where, depending upon the initial entries by the user, the illusion of human intelligence could appear, or be dispelled through several interchanges. Although those programs included years of research and work, ELIZA remains a milestone because it was the first time a programmer had attempted such a human-machine interaction with the goal of creating the illusion (however brief) of human–human interaction.
At the ICCC 1972, ELIZA was brought together with another early artificial-intelligence program named PARRY for a computer-only conversation. While ELIZA was built to speak as a doctor, PARRY was intended to simulate a patient with schizophrenia.
Design and implementation
Weizenbaum originally wrote ELIZA in MAD-SLIP for CTSS on an IBM 7094 as a program to make natural-language conversation possible with a computer. To accomplish this, Weizenbaum identified five "fundamental technical problems" for ELIZA to overcome: the identification of key words, the discovery of a minimal context, the choice of appropriate transformations, the generation of responses in the absence of key words, and the provision of an editing capability for ELIZA scripts. This was possible due to Slip's ability to tag words for other usage, which simultaneously allowed ELIZA to examine, store, and repurpose words for usage in outputs. A BASIC version appeared in Creative Computing in 1977 (although it was written in 1973 by Jeff Shrager). This version, which was ported to many of the earliest personal computers, appears to have been subsequently translated into many other versions in many other languages. Shrager claims not to have seen either Weizenbaum's or Cosell's versions.
In 2021, Jeff Shrager searched MIT's Weizenbaum archives, along with MIT archivist Myles Crowley, and found files labeled Computer Conversations. These included the complete source code listing of ELIZA in MAD-SLIP, with the DOCTOR script attached. The Weizenbaum estate gave permission to open-source this code under a Creative Commons CC0 public domain license. The code and other information can be found on the ELIZAGEN site.
In December 2024, Rupert Lane, with the assistance of several other engineers who had been studying the original MAD-SLIP ELIZA, brought up the original ELIZA and demonstrated that the implementation of ELIZA based on the discovered code can reproduce almost exactly the published conversations with ELIZA from Weizenbaum's 1966 paper. This original ELIZA was reconstructed using the vast majority of the 1965 version of the source code: approximately 96% of the functions. This was run on a version of the original MIT CTSS running on a 7094 emulator, both of the latter due to David Pitts.
Another version of Eliza popular among software engineers is the version that comes with the default release of GNU Emacs, and which can be accessed by typing <code>M-x doctor</code> from most modern Emacs implementations.
Pseudocode
From Figure 15.5, Chapter 15 of Speech and Language Processing (third edition).
function ELIZA GENERATOR(user sentence) returns response
Let w be the word in sentence that has the highest keyword rank
if w exists
Let r be the highest ranked rule for w that matches sentence
response ← Apply the transform in r to sentence
if w = 'my'
future ← Apply a transformation from the ‘memory’ rule list to sentence
Push future onto the memory queue
else (no keyword applies)
Either
response ← Apply the transform for the NONE keyword to sentence
Or
response ← Pop the oldest response from the memory queue
Return response
Response and legacy
Lay responses to ELIZA were disturbing to Weizenbaum and motivated him to write his book Computer Power and Human Reason: From Judgment to Calculation, in which he explains the limits of computers, as he wants to make clear his opinion that the anthropomorphic views of computers are just a reduction of human beings or any life form for that matter. In the independent documentary film Plug & Pray (2010) Weizenbaum said that only people who misunderstood ELIZA called it a sensation.
David Avidan, who was fascinated with future technologies and their relation to art, desired to explore the use of computers for writing literature. He conducted several conversations with an APL implementation of ELIZA and published them – in English, and in his own translation to Hebrew – under the title My Electronic Psychiatrist – Eight Authentic Talks with a Computer. In the foreword, he presented it as a form of constrained writing.
There are many programs based on ELIZA in different programming languages. For MS-DOS computers, some Sound Blaster cards came bundled with Dr. Sbaitso, which functions like the DOCTOR script. Other versions adapted ELIZA around a religious theme, such as ones featuring Jesus (both serious and comedic), and another Apple II variant called I Am Buddha. The 1980 game The Prisoner incorporated ELIZA-style interaction within its gameplay. In 1988, the British artist and friend of Weizenbaum Brian Reffin Smith created two art-oriented ELIZA-style programs written in BASIC, one called "Critic" and the other "Artist", running on two separate Amiga 1000 computers and showed them at the exhibition "Salamandre" in the Musée du Berry, Bourges, France. The visitor was supposed to help them converse by typing in to "Artist" what "Critic" said, and vice versa. The secret was that the two programs were identical. GNU Emacs formerly had a <code>psychoanalyze-pinhead</code> command that simulates a session between ELIZA and Zippy the Pinhead. The Zippyisms were removed due to copyright issues, but the DOCTOR program remains.
ELIZA has been referenced in popular culture and continues to be a source of inspiration for programmers and developers focused on artificial intelligence. It was also featured in a 2012 exhibit at Harvard University titled "Go Ask A.L.I.C.E.", as part of a celebration of mathematician Alan Turing's 100th birthday. The exhibit explores Turing's lifelong fascination with the interaction between humans and computers, pointing to ELIZA as one of the earliest realizations of Turing's ideas.
Historical purpose and interpretation
Although ELIZA is often described as an early chatbot, Joseph Weizenbaum presented it as a program for investigating natural language communication between machines and humans. In Weizenbaum’s 1966 article, he described ELIZA as a system that applied a pattern-matching mechanism along with interchanging scripts, where the most famous one was DOCTOR. It produced responses that resembled those of psychotherapists. Instead of understanding language semantically, ELIZA identified keywords and transformed the input of users into brand new prompts. As a result, scholars later have noted that this particular structure made ELIZA important in the history of conversational programs and discussions on the limitations of machine understanding.
Recent historical discourse echoes this idea that Weizenbaum did not primarily intend to create ELIZA as a chatbot, but as a unique platform for investigating how humans converse with machines and the important cognitive processes of interpretation and misinterpretation.ELIZA’s later reputation as the first chatbot was shaped by the timing of its creation and circulation beyond its original research context. Another reason was the subsequent loss of access to the original source code for more than fifty years, which led to more room for interpretation. As a result, ELIZA appeared in several developments in the history of artificial intelligence, including natural language processing and other systems and programming languages.
In 2021, the original source code for Weizenbaum’s ELIZA was publicized through the Internet Archive. Researchers were able to study the recovered materials containing the ELIZA program and the DOCTOR script more directly as a primary historical artifact. Consequently, scholars attempted to recreate how the program would operate in its original computational environment and MIT implementation. The recovered source code created a distinction between ELIZA’s real technical architecture and its later reputation in chatbot development. Recent reconstruction work from the recovered source code has allowed modern-day researchers to understand ELIZA’s precise technical operation and compare it with its later reputation and reassess its historical role in artificial intelligence and chatbot development.
DOCTOR and computational therapy
The DOCTOR script is the best-known example of ELIZA as it simulates the mode of Rogerian psychotherapy. It functions by reinterpreting the user’s own input of words in the form of questions or prompts, which allows it to proceed with a conversation while making relatively few claims about the person’s situation.
The receptions of ELIZA impacted Weizenbaum’s later critique of artificial intelligence and the authority of computation. In Computer Power and Human Reason, he openly opposed the view that human thoughts can be completely reduced to computation power, and also questioned the emerging tendency to view computers as suitable replacements for human cognitive judgment in both social and ethical domains. Scholar Caroline Bassett argued that ELIZA’s importance lied in its role as an early prototype of computational therapy. The DOCTOR script with a relatively simple conversational program was able to create a setting with users that imitated human care, understanding, and expertise. Other scholars like Noah Wardrip-Fruin have also treated ELIZA as a significant example in software studies where the user’s experience relied on the interaction between the underlying code, the script, and the interpretive expectations in the process. As a result, ELIZA became important not only as an early conversational program, but also as an example where later scholars have examined human-machine interaction, physiological and behavioral influence, and how they perceived the intelligence of computer systems.
Eliza Effect
The Eliza effect borrowed its name from ELIZA the chatbot. This effect is first defined in Fluid Concepts and Creative Analogies: Computer Models and the Fundamental Mechanisms of Thought as humans' interpretations that some computer programs understand the user inputs and make analogies.
These interpretations can potentially manipulate and misinform users. When interacting and communicating with chatbots, users can be overly confident in the reliability of the chatbots' answers. Other than misinforming, the chatbot's human-mimicking nature can also cause severe consequences, especially for younger users who lack a sufficient understanding of the chatbot's mechanism.
References
Bibliography
- .
- .
- .
- .
Further reading
External links
- ELIZAGEN—Weizenbaum's original code for ELIZA
- Collection of several source code versions at GitHub
- , a collection of dialogues between ELIZA and various conversants, such as a company vice president and PARRY (a simulation of a paranoid schizophrenic)
- Weizenbaum. Rebel at work; – Peter Haas, Silvia Holzinger, Documentary film with Joseph Weizenbaum and ELIZA.
- CORECURSIVE #078; The History and Mystery Of Eliza; With Jeff Shrager – Adam Gordon Bell interviews Jeff Shrager, author of the 1973/77 BASIC ELIZA, and discoverer of the original ELIZA code.
- "ELIZA Reanimated"—ELIZAGen.org blog post describing Rupert Lane's restoration of the original MAD-SLIP ELIZA running on CTSS on a 7094 emulator
