Lesson 2 of 12 · What Is Generative AI?
A Short History of Generative AI
How generative AI developed, from the 1960s chatbot ELIZA to transformers, GPT, image generators and ChatGPT. Build an ELIZA-style chatbot in Python.
- 8 min read
- Beginner
- Reviewed
- The main steps from early chatbots to today's assistants
- Why rule-based systems hit a wall
- What the transformer is and why 2017 matters
- Why ChatGPT in 2022 felt so sudden, even though it was not
Seventy years in one lesson
Generative AI feels new, but the ideas behind it are old. What changed is how much data and computing power we can throw at them. This lesson walks through the key moments, so the names you hear today make sense.
1948: text from statistics
The mathematician Claude Shannon showed that you can produce English-looking text using nothing but statistics. Count which letters, or words, tend to follow which, then pick each next one according to those counts. His results looked like nonsense English, but they were more English-like the more previous words he took into account.
That is exactly the idea you built in the first lesson: learn what follows what, then generate. Today's models are a hugely more powerful version of it.
1966: ELIZA, the first chatbot
At MIT, Joseph Weizenbaum built ELIZA, a program that chatted like a therapist. It had no understanding at all. It looked for keywords in what you typed and filled in a reply from a template.
Many people still felt it understood them, which surprised and worried its creator. People have always been quick to see a mind behind fluent text. That is worth remembering today too.
Here is a tiny ELIZA. Run it, then type your own sentences into the last lines.
rules = [
("i feel", "Why do you feel{rest}?"),
("i am", "How long have you been{rest}?"),
("because", "Is that the real reason?"),
("mother", "Tell me more about your family."),
]
def eliza(sentence):
text = sentence.lower().strip(".!?")
for pattern, reply in rules:
if pattern in text:
# Everything after the keyword is copied into the reply
rest = text.split(pattern, 1)[1]
return reply.replace("{rest}", rest)
return "Please, go on."
print(eliza("I feel tired today."))
print(eliza("I am learning about AI"))
print(eliza("My mother called me"))
print(eliza("What is the capital of France?"))It works for sentences its rules expect and fails for everything else. To make it better you must write more rules, forever. That is the wall every rule-based system hits: language has too many possibilities to list by hand.
1980s to 2000s: learning from data
Researchers increasingly let computers learn patterns from examples instead of following hand-written rules. Statistical language models, which predict the next word from the previous few, powered speech recognition and machine translation. Neural networks, loosely inspired by the brain, slowly improved as computers got faster.
2013 to 2014: words as numbers, and machines that make pictures
- Word embeddings (2013). Google's word2vec turned every word into a list of numbers so that words with similar meanings got similar numbers. Computers could now work with meaning, not just spelling.
- GANs (2014). Ian Goodfellow and colleagues invented generative adversarial networks: two networks compete, one making fake images and one trying to spot them. Both get better, and the fakes become realistic. GANs produced the first convincing AI faces.
2017: the transformer
A team at Google published a paper called "Attention Is All You Need". It introduced the transformer, a new design for neural networks.
Older networks read text one word at a time, which was slow to train and forgot the start of long passages. Transformers look at the whole passage at once and can be trained on enormous amounts of text in parallel. Almost every modern language model is a transformer.
2018 to 2020: GPT and the power of scale
OpenAI trained transformers simply to predict the next word on large amounts of internet text, and called them GPT: Generative Pre-trained Transformer.
| Model | Year | Size (parameters) | What people noticed |
|---|---|---|---|
| GPT | 2018 | about 117 million | Pretraining on raw text helps many tasks |
| GPT-2 | 2019 | 1.5 billion | Surprisingly fluent paragraphs |
| GPT-3 | 2020 | 175 billion | Could do new tasks from a few examples in the prompt |
The big lesson was scale. Making the same kind of model bigger, and training it on more data, kept making it better, often in ways nobody predicted.
2021 to 2022: pictures from words
- DALL·E (2021) generated images from text descriptions.
- Diffusion models took over image generation. They start from random noise and remove it step by step until a picture appears. You will see how in the next lesson.
- In 2022, DALL·E 2, Midjourney and Stable Diffusion made high-quality image generation available to everyone. Stable Diffusion was released openly, so anyone could run it on their own computer.
November 2022: ChatGPT
OpenAI released ChatGPT, a chat version of its GPT models, as a free web app. It reached millions of users within days and is often described as one of the fastest-growing apps ever.
The underlying technology was not brand new. What made the difference was:
- Training for conversation. The model was further trained on example conversations and on human ratings of which answers were better, so it followed instructions instead of just continuing text.
- A simple interface. Anyone could type a question and get an answer, with no programming.
2023 onwards: the race
- 2023: OpenAI released GPT-4, Anthropic released Claude, Google released Bard and then Gemini, and Meta released Llama, whose weights researchers could download. Models began to accept images as well as text.
- 2024: Video generation became convincing, voice conversations with AI became natural, and reasoning models appeared: models that work through a problem step by step before answering, which made them much better at maths and code.
- 2025 onwards: AI agents that use tools, search the web, and write and run code became part of everyday work, and strong open models from many countries competed with closed ones.
Common mistakes
Teach ELIZA a new rule. Notice that every new kind of sentence needs a new rule written by hand. That is the wall rule-based systems hit.
rules = [
("i feel", "Why do you feel{rest}?"),
("i am", "How long have you been{rest}?"),
]
# Add a rule so that "I want a holiday" gets the reply:
# What would it mean to you if you got a holiday?
def eliza(sentence):
text = sentence.lower().strip(".!?")
for pattern, reply in rules:
if pattern in text:
rest = text.split(pattern, 1)[1]
return reply.replace("{rest}", rest)
return "Please, go on."
print(eliza("I want a holiday"))
What did the 2017 paper “Attention Is All You Need” introduce?
Summary
- Generating text from statistics goes back to Claude Shannon in 1948.
- ELIZA (1966) used hand-written rules. Rule-based systems cannot keep up with real language.
- Learning from data, word embeddings, GANs and then the transformer (2017) set the stage.
- GPT models showed that scale brings new abilities.
- ChatGPT (2022) added training for conversation and a simple chat box, and the public race began.
Next: generative AI is not only about text. Let's look at images, audio and video.
Finished reading? Tick it off to track your progress.