Quirks and Quarks·Analysis: Bob's blog

Does ELIZA, the first chatbot created 60 years ago, hold lessons for modern AI?

Using code that was thought to be lost for nearly 60 years, scientists brought the world's first chatbot back to life for anyone to try.

The original programmer designed it to give the illusion of talking to a therapist through a computer

A man with dark hair, glasses and a moustache sits at a super old looking massive computer with paper feed coming out the top in this black and white image.
Joseph Weizenbaum from MIT invented ELIZA, what today might be called the first chatbot. Released in 1966, that ran a script meant to mimic a first visit to the therapist. (MIT)

Scientists recently resurrected the original computer code for ELIZA, considered the world's first chatbot, and thought by many to be the first use of artificial intelligence (AI). Its original creator, however, was adamant the program was not intelligent at all.

ELIZA was a simple program created in the 1960s by Joseph Weizenbaum, a professor at the Massachusetts Institute of Technology who was interested in human-computer interfaces.

He designed ELIZA to be a generalized conversation program to make a natural language conversation with a computer possible. The program could run scripts with different language rules to represent individual conversational personas.

Weizenbaum named this early natural language processing program ELIZA after Eliza Doolittle in the 1912 George Bernard Shaw play Pygmalion, where a commoner learns to speak with an upper-class English diction despite her working class roots.

"Like the Eliza of Pygmalion fame, it can be made to appear even more civilized," Weizenbaum wrote in his 1966 paper in the journal Communications of the ACM.

 A smartphone with the ChatGPT logo full screen is reflected on a mirrored surface with "OpenAI" emblazzoned on the monitor backdrop and another smartphone to the left and tablet to the right show the "Deepseek" logo.
Modern AI large language model systems like ChatGPT and Deepseek are programmed to fill in the blank or answer questions. ELIZA, with its DOCTOR script, was programmed to prompt the user to further the conversation. (Lionel Bonaventure/AFP/Getty Images)

He wrote the first and most well-known script to run on ELIZA, called "DOCTOR," to mimic a first interview between a patient and psychotherapist. It responded to inputs from the user by selecting key words and spinning them back in a friendly way. 

For example, here is part of the most famous transcript that Weizenbaum described in his 1966 paper. It's an exchange between the program and a young woman after initially prompting her with, "PLEASE TELL ME YOUR PROBLEM." 

User: "Men are all alike."
ELIZA: "IN WHAT WAY"
User: "They're always bugging us about something or other."
ELIZA: "CAN YOU THINK OF A SPECIFIC EXAMPLE"
User: "Well, my boyfriend made me come here." 
ELIZA  "YOUR BOYFRIEND MADE YOU COME HERE" 
User: "He says I'm depressed much of the time."
ELIZA: "I'M SORRY TO HEAR YOU ARE DEPRESSED"

The world's first 'chatbot' was a hit

Unlike chatbots today that use large language models and train on massive language databases to generate responses, ELIZA — developed three decades before the term "chatbot" even existed — had little data to rely on.

The DOCTOR script would search for keywords in the person's reply and mirror it back to them in its response. If no keyword was detected, the script would simply offer a generic response.

ELIZA was programmed to prompt the user to continue the conversation. That made it seem like it was a good listener, which is important in psychotherapy, and what made the program a huge sensation.

During the late 1960s and early '70s, before computers shrunk for individual use, they were large, and quite costly mainframe systems. So ELIZA seemed miraculous, with students believing the machine could think like a human and understand their problems.

At the time, Weizenbaum described the response to ELIZA as "a striking form of Turing's test," where a user cannot tell whether responses are coming from a machine or a real person.

I had the privilege of meeting Joseph Weizenbaum in the early '80s. He told me, "The program totally backfired. People thought ELIZA was intelligent, they were confiding in the machine, revealing personal issues they would not tell anyone else. Even my secretary asked me to leave the room so she could be alone with the computer. They called me a genius for creating it, but I kept telling them that the computer was not thinking at all."

Later, Weizembaum wrote a book called Computer Power and Human Reason: From Judgment to Calculation in which he emphasized that computers, as clever and capable as they may become, do not think like humans and should never replace humans in roles such as doctors, teachers or scientists. He disliked the term "artificial intelligence," believing that humans are always necessary and computers should never be allowed to make important decisions.

Reanimating defunct code 

For nearly 60 years, AI historians thought the original 420-line computer code for ELIZA and the famous DOCTOR script were lost. But in 2021, two software sleuths found the original printouts of code in a dusty box of Weizenbaum's archives at MIT.

Those software scientists, among others, wrote in a paper that has yet to be peer-reviewed that they figured the only way to see if the code worked was to try it — a task made even more difficult given that the defunct code was written for a computer and operating system that no longer existed.

Big, boxy computers with a lot of switches are seen here in a grainy black and white photograph.
ELIZA was originally programmed to work on an IBM 7094 that MIT had at the time. (IBM Customer Engineering Instruction-Maintenance )

Back in the 1960s, MIT had an IBM 7094, an early transistorized computer loaded with 32 kilobytes of user memory. At the time, it was one of the biggest and fastest computers available. The operating system developed for it was called the Compatible Time-Sharing System (CTSS). It was also the world's first time sharing system — meaning that it could support around 30 users at once. 

To resurrect the original ELIZA program with its DOCTOR script, the researchers used a restored CTSS operating system on hardware and software designed to emulate the original IBM 7094.

On Dec 31, 2024, they brought ELIZA back to life and tested it by recreating the "Men are all alike" conversation. 

The revived version, adapted to work on modern systems, is available here for anyone to try out.

Watch: A reanimated ELIZA holding the same conversation in Weizembaum's 1966 paper

Weizenbaum's legacy lives on in Germany at the Weizenbaum Institute, dedicated to the critical exploration and constructive shaping of digitization for the benefit of society.

Today, AI is a powerful new tool that is having a profound influence on science, medicine, academics and culture. It's also growing at an astounding rate. This growth comes with a very real fear factor helped along by Hollywood with the likes of the Terminator film series or War Games, a 1983 film where computers try to eliminate humanity — and more recently, ominous warnings from AI industry insiders.

This past week, government leaders, executives, and experts from over 100 countries met in Paris for the Paris Artificial Intelligence Action Summit, to discuss the future of AI with a focus on how to keep it both accessible and safe as the technology continues to develop at breakneck speed.

As humanity struggles to deal with what may one day become a new super-intelligence, perhaps we should keep Weizenbaum's philosophy in mind: no matter how powerful computers become, humans should never be left out of the equation.

ABOUT THE AUTHOR

Bob McDonald is the host of CBC Radio's award-winning weekly science program, Quirks & Quarks. He is also a science commentator for CBC News Network and CBC TV's The National. He has received 12 honorary degrees and is an Officer of the Order of Canada.