EIZA acts as a therapist. Not just any therapist, though: a Rogerian psychotherapist.
This is key information in this case because Rogerian psychotherapy employs a unique approach called 'person-centered'. A Rogerian psychotherapist's process is to interact with the patient with complete empathy and lack of judgement.
To do this, the psychotherapist asks person-centric questions to the patient. For instance, if a patient were to say 'I feel depressed', a Rogerian psychotherapist would try to dig further by asking 'Why do you feel down?'.
This type of therapy is a back and forth of statements from the patient and questions from the therapist. The goal is to uncover realisations by digging deeper and deeper.
Ok, this concludes our lesson on psychotherapy. Why does all of this matter?
It matters because it dictates how ELIZA actually interacts with its users. It allows ELIZA to respond to input with accuracy without ever having to really understand what the user says.
How does ELIZA actually work? The DOCTOR script that powers ELIZA is relatively simple. It assigns a value to each word of a sentence a user inputs and uses the value to reorder the words in the form of a question. The value of the word is determined by its importance within the sentence (which is where the smart stuff happens).
Let's take an example. Taking the sentence 'I want to run away from my parents'.
ELIZA attributes a weighted value to each word of that sentence, like so.
chatbot ELIZA input
ELIZA attributes low values to pronouns (I), slightly higher values to action verbs (want to), and the highest value to the actual action (run away from my parents). This allows the programme to know exactly how to flip the sentence around to ask a digging question.
How? Simply turn the values into a question, flip the pronoun, and switch the verb to convey meaning.
The answer, then, becomes "What would getting to run away from your parents mean to you ?"
chatbot ELIZA output
This principle works for every user input. If you tell ELIZA you "love to fly kites", it will answer in the same fashion:
chatbot ELIZA secondoutput
As you can see, we are met with the same kind of answer. The user's input is switched around, albeit in a different manner, and a question is asked to dig deeper into the user's underlying feelings.
What can we learn from ELIZA? The biggest learning point to get from ELIZA is about complexity. It amazes me how simple ELIZA's script actually is, yet plenty of humans got easily tricked.
Granted, this was a long time ago. In fact, this was 30 years before smartphones even reached our pockets. This, once again, reinforces how much of an innovation ELIZA was.
Yet, this is something you can take from this old chatbot: don't over complicate things. Sure, ELIZA wasn't a smart chatbot by any means. It didn't learn or adapt. But it had one job to do and it did it well.
ELIZA was one of the first chatterbots (later clipped to chatbot). It was also an early test case for the Turing Test, a test of a machine's ability to exhibit intelligent behavior equivalent to, or indistinguishable from, that of a human. By today's standards ELIZA fails very quickly if you ask it a few complex questions.