Generative AI
AI that creates text, images, and code
Some AI sorts things, like a spam filter. Generative AI does something new: it creates. This is the kind of AI you will use to build every app in this course.
What is generative AI?
Generative AI is AI that makes new content when you ask for it. "Generate" just means "create".
Think of the difference between a librarian and a writer. A librarian finds a book that already exists. A writer writes a new page just for you. Generative AI is the writer.
- A spam filter answers "spam or not spam?"
- Generative AI answers "write me an email", and writes one that never existed before.
What it can create
Generative AI can create many kinds of content. You describe what you want in plain words, and it makes it.
| Feature | You ask for | It creates |
|---|---|---|
| Text | A birthday message for my sister | A warm, personal message |
| Images | A logo for a plant shop | A new picture |
| Code | A to-do list web page | Working HTML and JavaScript |
| Audio | Read this paragraph aloud | A spoken voice recording |
In this course, you will mostly use text and code. Here is a code example you can try right now:
Create a simple web page with a button.
When I click the button, show a random motivational quote.
Keep it to one HTML file.Let's break this down:
- You described what you want, not how to code it.
- The AI writes the code for you.
- This is the core idea of building apps without writing code yourself.
What it's good at
Generative AI is a great helper for many everyday tasks:
- First drafts of emails, posts, and documents
- Explaining hard topics in simple words
- Summarizing long text into key points
- Brainstorming names, ideas, and plans
- Writing code from a plain description
What it's bad at
It also has real weak spots. Knowing them will save you a lot of trouble:
- Facts: it can make up facts that sound true. You will learn more about this on the Hallucinations page.
- Recent news: it may not know about events after it was trained, unless it can search the web.
- Exact math: it can slip on long calculations.
- Reading your mind: a vague request gets a vague result.
Common mistakes
Asking too vaguely
# Wrong
Write something about my shop.
# Right
Write a 3-sentence welcome message for the home page of my
handmade candle shop. Friendly tone. Mention free shipping over $50.Trusting every fact
If the AI gives you a statistic, a date, or a quote, check it in a reliable source before you publish it.
Practice
Try these exercises to lock in what you just learned.
What's next?
The generative AI that writes text and code is powered by something called a large language model. Let's find out what that is.