ELIZA: The Chatbot Who Revolutionised Human-Machine Interaction [An Introduction]
There are now over 300,000 chatbots (on Facebook). 55 years ago, there was only 1.
ELIZA: How do you do. Please tell me your problem.
YOU: I have trouble keeping my houseplants alive.
ELIZA: Your houseplants alive?
YOU: Yes, I forget to water them sometimes.
ELIZA: You are sure.
YOU: I am sure.
ELIZA: Do you know anyone else who is sure?
YOU: My plants are sure.
ELIZA: Why do you say your plants are sure?
YOU: Because they suffer the direct consequences of me not watering them.
ELIZA: Does that reason seem to explain anything else?
How do you do? Illustrated above is one example of a conversation I had with ELIZA. ELIZA is the first chatbot and early contender of the Turing Test*.
In this article, I’ll talk about why ELIZA is important, who ELIZA is, how ELIZA works, and answering one of the (in my opinion) most important questions about ELIZA.
Let’s get started.
Why Is ELIZA Significant?
The year is 1966. People are gradually gaining interest in Artificial Intelligence (AI) in the world of science fiction.
The idea of artificial neurons was introduced not too long ago, in 1943. In 1950, Alan Turing proposed the Turing Test, a ground-breaking test that would influence AI researches in years to come.
Personal computers do not exist. Interactive computing is very new — Sketchpad was just invented in 1963. Natural language processing? Not well known to the masses.
Then, boom — ELIZA shows up and blows the minds of experts, much less lay people. A bot that could respond smoothly to user inputs? Unheard of.
Today, the invention of ELIZA is considered an important milestone in the field of AI.
Surprisingly, her inventor did not intend for it to be that way.
Who Is ELIZA?
ELIZA is a natural language processing (NLP) program developed by Joseph Weizenbaum in 1966, at the MIT AI Laboratory.
NLP is a branch of AI that deals with linguistics and human language.
Her most famous script, DOCTOR, simulates the role of a Rogerian psychotherapist (more specifically, Carl Rogers). Rogers was known for reflecting whatever patients’ said back at them, in the form of a question.
A short example would be:
PATIENT: I’m feeling down today.
ROGERS: Why do you think you’re feeling down today?
Does that seem familiar? Yes, probably because that sounds exactly like what ELIZA would say.
Weizenbaum originally intended to build a ‘chatbot’ (the term wasn’t coined then) to demonstrate the superficiality of the interaction between human and machine.
Imagine his shock when he saw people believing ELIZA to be able to really feel and understand!
In his words,
“I had not realised that extremely short exposures to a relatively simply computer program could induce powerful delusional thinking in quite normal people.”
Obstacles In Creating An Interactive Program Like ELIZA
ELIZA is an ambitious project. Robots can perform insane calculations in record time yet to this day, it is difficult to program a robot to act like a human.
NLP is complex because human language is complex. Human language is complex because it is arguably a reflection of human thinking. So how did ELIZA overcome this insurmountable problem? Did Weizenbaum somehow manage to train her using loads of large datasets? No.
This is where the concept of psychotherapy fits.
By only asking questions, she had control over the direction of the conversation without having to contribute any real content.
She doesn’t have to know what’s going on, she only had to appear to know.
You may be thinking, even then, how does she know what questions to ask?
This is where pattern matching comes in. There are a few considerations:
- ELIZA would need to be able to identify important words in the user’s input.
- ELIZA would need to know how to act when there is more than one keyword or phrase.
- ELIZA would need to know how to manipulate those words to produce an output.
- ELIZA would need to know how to act when there are no keywords identified.
- And of course, ELIZA would need to know when to stop the conversation.
How Does ELIZA Work?
To address the aforementioned considerations, I’ll explain the two main parts of her operation — decomposition and reassembly. After that, we’ll look at what happens if ELIZA has no clue how to react to the user’s input.
Some simple terms:
- Input refers to whatever the user types into the program.
- Output refers to whatever ELIZA responds with.
When the user enters an input, the input text is checked for syntactical patterns that will allow the program to break the text down into smaller parts.
e.g. input: I am feeling down."I" is the pronoun.
"feeling down" is the action.
"am" connects the action to the pronoun.
The program then scans the text for keywords and assigns different numerical values to them, based on their ‘level of importance’. This is their rank.
e.g. input: I am feeling down."feeling down" might get a rank of 1 as it contains actual content.
"I" might get a rank of 2 as it is a pronoun that specifies who the user is referring to.
"am" might get a rank of 3.
ELIZA also looks out for certain words that are deemed useful to respond to, such as “alike” or “same”. See how she responds to these below.
The keywords will be placed in a ‘keystack’. The word or phrase with the highest rank is placed on top.
ELIZA decides on a series of transformations, which is dependent on the rule that applies to the keyword type. Priority is given to keywords with a higher rank.
"feeling down" will be the main content in her output, such as "How long have you been feeling down?"
"I" becomes "You" (first person pronouns are changed to second person pronouns).
If input text contains words like "alike" or "same", the output text will respond to this claim of similarity, such as "In what way?"
How are ranks decided? Statements generally follow certain patterns, or contain certain types of words, no matter the content. Words that relate to these general patterns have higher ranks. Specific words (patterns and word types) that ELIZA was programmed to look out for also get higher ranks.
After the transformation is complete, ELIZA pieces the transformed keywords back together, including ‘filler words’ or ‘question words’ that are appropriate to the input. Finally, she produces her output response.
e.g. input: People are rude.
output: Possibly they are rude."Possibly" is the 'filler word'.
"People" was probably transformed to "they".
"are rude", the main content, was copied over to be the main content of the output too.
To stop the conversation, ELIZA looks out for words like “Bye.” or “Goodbye.”
What if there are no keywords identified?
If ELIZA sees something she doesn’t understand, she will make a vague comment, like “I see.” or “Please go on.” or “Please continue.”
Another possibility is ELIZA would use her ‘Memory’ to ‘recall’ previous inputs, and use those inputs to generate responses that reference previous parts of the conversation.
Asking The Most Important Question
You’ve made it this far! You know why ELIZA is such a sensation, who ELIZA is, and how she works. But why was ELIZA named ELIZA?
*cue suspenseful music*
Excitingly, ELIZA was named after the protagonist in Pygmalion, a play written by George Bernard Shaw in 1912.
The protagonist, Eliza Doolittle, starts out as a poor flower girl. Until Higgins and Colonel Pickering sort of took her under their wings, to teach her to speak ‘upper-class English’, with the ultimate aim of getting her to pass as a duchess.
Similarly, ELIZA was trained to improve her speech to pass as a human psychotherapist.
This is probably a stretch, but do what you will with this information: Pygmalion, in ancient Greek mythology, fell in love with one of his sculptures, somehow causing it to come to life. ELIZA …carved her success by mimicking being ‘alive’.
Alright, I’ll leave you with one final nugget. Remember that conversation I had with ELIZA about houseplants? Her first prompt was “How do you do. Please tell me your problem.”
What’s the phrase Higgins has been teaching Eliza to pronounce, that Eliza repeats four times at Mrs Higgins’ at-home day, the phrase she was remembered for at the Embassy by the Hostess?
“How do you do?”
Thank you for reading. Please clap 👏 for this story to let me know if it was valuable to you. Have a great day!