ELIZA (Natural Language Processing)
The first AI that pretended to listen — 1966 and surprisingly convincing.
ELIZA - The First Chatbot
Analogy:
Definition:
How it works
Pattern Matching
ELIZA recognizes patterns in your input and responds with pre-programmed phrases:
Keywords
ELIZA Chat
Have a conversation with the historic ELIZA
🔍 Pattern Matching
No pattern match analysis available yet. Start a conversation to see how ELIZA processes your input.
🏆 Top rules this session
No rule fired yet
ELIZA Explained
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.
ELIZA Knowledge Quiz
What main technique does ELIZA use to generate responses?
1. What main technique does ELIZA use to generate responses?
- ☐ A) Machine learning
- ☐ B) Pattern matching and text substitution
- ☐ C) Deep neural networks
- ☐ D) Statistical language models
2. What historical significance did ELIZA have for computer science? (Multiple correct answers)
- ☐ A) It demonstrated the limitations of rule-based systems
- ☐ B) It already used machine learning
- ☐ C) It inspired decades of NLP research
- ☐ D) It warned against anthropomorphic projections
3. What was Joseph Weizenbaum's main concern regarding ELIZA?
- ☐ A) That it didn't work well enough
- ☐ B) That it was programmed too complexly
- ☐ C) That people attributed real intelligence to it
- ☐ D) That it required too much computing power
Related Content
Article
The AI Winters
Why artificial intelligence was written off multiple times without caring.
The Birth of AI
The early years of AI — full of optimism that lasted roughly 15 years.
Consciousness vs. Probability
The philosophical question of whether LLMs understand what they say — sorted without arrogance.
A Digital Helper — AI in Everyday Life
Three small helpers that have long been AI — even without headlines.
Rules & Logic: Expert Systems
AI before it learned from data: asked experts, wrote down rules, hoped.
Function Calling — When AI Presses Buttons
When AI no longer just talks but presses the button — how that works technically.
Learning with AI (Instead of Cheating)
How to use AI as a learning partner instead of a cheat sheet with internet access.
Large Language Models
The model that basically only predicts the next word — and makes a remarkable career doing it.
Programming vs. Training
How programming changed when people stopped writing every rule themselves.
Truth Online
How to still sort out what is true on the web — a method collection for skeptical readers.
Demo
Attention — where do language models look?
Interactive heatmap of self-attention: precomputed patterns show how a 2-layer transformer wires words together — pronoun resolution, verb-object, disambiguation.
Rule-Based AI
Collect clues and solve criminal cases through systematic application of rule-based logic. This interactive demo shows how AI systems reach solutions step by step.