ELIZA (Natural Language Processing)
The first AI that pretended to listen — 1966 and surprisingly convincing.
Have a conversation with the historic ELIZA
Pattern Matching The inside view of the last reply: the keyword it spotted, the underlying pattern, and which parts of your message ELIZA folded into the answer.
- question
- sorry
- why
- what
- how
- yes
- no
- remember
- dream
- i am sad
- i am happy
- i am angry
- i am afraid
- i think
- i dont know
- i feel
- computer
- mother
- father
- family
- love
- boyfriend girlfriend
- everyone
- nobody
- always
- never
- i want
- i need
- i cant
- i can
- none – default reply
No pattern match analysis available yet. Start a conversation to see how ELIZA processes your input.
No rule fired yet
Definition
ELIZA - The First Chatbot
Analogy
Definition
Pattern Matching
ELIZA recognizes patterns in your input and responds with pre-programmed phrases:
Keywords
ELIZA recognizes keywords in your input and prioritizes responses based on their psychological significance:
Pattern-Matching Theory
ELIZA is based on the principle that meaningful dialogue can be simulated through pattern recognition and text transformation. This approach was primitive by today's standards, but revealed fundamental insights about human-computer interaction and the psychology of conversation.
The system works through simple string matching: It searches the user input for predefined keywords and patterns. When a pattern is found, ELIZA selects an appropriate predefined response and transforms it through pronoun reflection (I→you, my→your). This simple technique was surprisingly effective in creating the illusion of understanding.
Natural Language Processing
As one of the earliest NLP systems, ELIZA established fundamental concepts that remain relevant today: pattern recognition in natural language, context-aware responses, and the importance of conversation flow in human-computer interfaces.
Its approach was based on simple string matching and text transformations - no machine learning, no neural networks, just clever rules. Yet ELIZA demonstrated that even with simple techniques, a remarkable illusion of intelligence can be created when the right conversation patterns are used.
Modern Relevance
While today's chatbots use neural networks and machine learning, ELIZA's fundamental insights about conversation patterns, user expectations, and the importance of meaningful responses remain relevant in contemporary AI development.
ELIZA taught us important lessons: People are willing to attribute intelligence and understanding to systems, even when they are not present. This insight is still central today in the development of conversational AI and in shaping user expectations.
Try the demo! Chat with ELIZA and notice how she mirrors your statements. Can you recognize the patterns?
Development
ELIZA was developed by Joseph Weizenbaum at MIT from 1964-1966. Named after Eliza Doolittle from Shaw's Pygmalion, it was originally intended to demonstrate the superficiality of communication between humans and machines.
Historical Significance
- Pioneering early demonstration of natural language processing
- Proved the power of simple pattern-matching techniques
- Inspired decades of NLP research
- Warned against anthropomorphic projections onto computers
Limitations
Despite its sophisticated appearance, ELIZA has no real understanding of conversation. It operates purely through pattern recognition and substitution - a point Weizenbaum emphasized as a warning about how easily humans attribute human-like qualities to computer programs.
1
# ELIZA Chatbot
2
function eliza_chatbot():
3
# Main function: Pattern-based conversation
4
patterns = load_patterns()
5
responses = load_responses()
6
memory = initialize_memory()
7
8
greet_user()
9
10
while conversation_active:
11
# Receive user input
12
input = get_user_input()
13
processed = preprocess(input)
14
15
# Check for exit request
16
if is_goodbye(processed):
17
say_goodbye()
18
break
19
20
# Find and apply patterns
21
for each pattern in patterns:
22
if pattern_matches(pattern, processed):
23
keywords = extract(pattern, input)
24
response = choose_response(pattern.responses)
25
response = substitute_pronouns(response)
26
response = insert_keywords(response, keywords)
27
break
28
29
# Optional: Use memory
30
memory.store(input, response)
31
32
# Output response
33
output(response)
34
35
return eliza_system
📚 Load Patterns
Load all conversation patterns and predefined responses. Each pattern has keywords and possible responses. Based on psychotherapeutic conversation techniques.
patterns = load_patterns()
responses = load_responses()
memory = initialize_memory()
👋 Greeting
Start of conversation. Friendly greeting and invitation to talk.
📥 Input
User enters text. System receives and stores message.
🔍 Pattern Matching
Input is compared with patterns. Keywords are identified.
🔄 Transformation
Response is generated and adjusted. Pronouns are reflected.
💬 Response
System outputs response. Waits for next input.
Check
ELIZA Knowledge Quiz
Test your understanding of the world's first chatbot
What main technique does ELIZA use to generate responses?
Select one answer
1. What main technique does ELIZA use to generate responses?
2. What historical significance did ELIZA have for computer science? (Multiple correct answers)
3. What was Joseph Weizenbaum's main concern regarding ELIZA?