What is generative AI? How AI creates text, images and code

Most AI used to sort and predict. Generative AI creates something new. Here is what generative AI is, how it makes text and pictures, a short history, and what to watch out for.

A single prompt card in the middle reads: a cat who runs a tea stall. Four arrows lead from a machine labelled generative AI to four outputs: a short story beginning Every morning at six, Billu the cat lit the stove; a simple drawing of a cat behind a tea stall counter; a few lines of code for a tea stall menu; and a sound wave labelled a jingle.
Fig. 1 — One prompt, many kinds of new content. Generative AI learns the patterns in its training data, then produces new examples that follow them.

For years, most AI that people met in everyday life was a sorter and predictor. Is this email spam? Is this a cat or a dog? Will this customer cancel their subscription? It looked at something that already existed and gave a label or a number.

Then something changed. You could type “write a short poem about monsoon in Mumbai” or “draw a cat who runs a tea stall” and get something that didn’t exist a moment ago. That’s generative AI. This guide explains what it is, how it makes text and images, where it came from, and what it can’t do.

What is generative AI?

Generative AI is AI that creates new content, such as text, images, audio, video or code, based on patterns it learned from large amounts of existing examples.

The key word is new. Generative AI doesn’t usually copy and paste from its training data. It learns the patterns (how sentences flow, what cats look like, how Python code is structured) and then produces new examples that follow those patterns.

Generative AI vs predictive AI

A simple way to tell them apart is what comes out.

Two side-by-side panels. Left panel, predictive AI: a photo of a cat goes in and a small label comes out reading cat, 97 percent. Caption: looks at something and labels or scores it. Right panel, generative AI: a text prompt, a cat wearing sunglasses, goes in and a brand-new picture of a cat with sunglasses comes out. Caption: creates something new.
Predictive AI labels what exists. Generative AI makes something new. (Numbers are illustrative.)
Predictive AI Generative AI
What it gives you A label, a score or a number New content
Example question “Is this a cat?” “Draw me a cat.”
Everyday examples Spam filters, fraud alerts, face unlock, price estimates ChatGPT, Claude, Gemini, image generators, coding assistants

The two often work together. A shopping app might use predictive AI to guess what you’ll like and generative AI to write the product summary you read.

What can generative AI create?

  • Text: answers, emails, essays, summaries, translations. This is the job of large language models.
  • Code: whole functions, fixes and explanations, in many programming languages.
  • Images: illustrations, photos, logos and edits from a text description.
  • Audio: natural-sounding speech, voice cloning and music.
  • Video: short clips generated from a prompt or an image.
  • And more: 3D models, designs, even suggestions for new protein structures in science.

How does generative AI work?

All generative AI follows the same broad recipe: learn the patterns in a huge collection of examples, then generate new examples that fit those patterns. Different kinds of content use different methods to do the generating.

Text: one piece at a time

Text generators are large language models. They write by predicting the next small piece of text (a token), adding it, and repeating, thousands of times, until the answer is complete. Because each piece is picked with some randomness, you can get a different answer every time you ask.

Images: from noise to picture

Many popular image generators, including Stable Diffusion, use a method called diffusion. During training, the model is shown real images with more and more random noise (like TV static) added, and it learns to remove the noise step by step. To create a new image, it starts from pure noise and removes it bit by bit, guided by your text prompt, until a picture appears that matches your description.

It’s a bit like a sculptor who starts with a rough block and keeps chipping away until a statue appears, except the “block” is random static and the guide is your prompt.

Learning first, generating later

In both cases, all the learning happens beforehand, during training. When you use the tool, the model doesn’t search the internet for a matching picture or paragraph. It produces new output from its learned numbers (its weights). Some tools do add a web search step for up-to-date answers, but the writing itself is still generated.

A short history

Generative AI didn’t appear overnight. A few milestones:

  • 2014: Ian Goodfellow and colleagues introduce GANs (generative adversarial networks): two neural networks, one making fake images and one trying to spot fakes, each improving the other. GANs made strikingly realistic faces possible.
  • 2017: Google researchers publish “Attention Is All You Need”, introducing the transformer, the design behind today’s large language models. It’s the “T” in GPT.
  • 2018: OpenAI releases the first GPT (generative pre-trained transformer) model.
  • 2020s: diffusion models make high-quality image generation from text widely available.
  • November 2022: OpenAI launches ChatGPT, and generative AI goes mainstream almost overnight.

Where is generative AI used?

  • Writing and editing: drafts, rewrites, tone changes, translation
  • Customer support: answering common questions, ideally from the company’s real documents
  • Software development: writing, reviewing and explaining code
  • Design and marketing: concept art, mock-ups, product images, ad variations
  • Learning: explaining a topic at your level, quizzing you, answering follow-up questions
  • Accessibility: describing images aloud, turning speech into text and text into natural speech

Limits and risks

Generative AI is powerful, but it’s important to know what can go wrong.

  • It can be confidently wrong. A text model generates what is likely, not what is checked. It can invent facts, quotes or references. This is called hallucination (letter H in this series). Verify anything that matters.
  • It can reflect bias. It learns from human-made data, so it can repeat stereotypes. See AI bias.
  • Fakes are easier to make. Realistic fake images, audio and video (deepfakes) can be used to mislead or scam people. Be careful with surprising media, and with urgent voice calls asking for money.
  • Ownership questions. There are ongoing legal debates and court cases about training on copyrighted work and who owns AI-generated output. The rules differ by country and are still developing.
  • Privacy. Think before pasting personal or confidential information into a generative AI tool.

Common misconceptions

“Generative AI searches the internet and copies what it finds.” On its own, it generates new output from learned patterns. (Some tools add search, and models can occasionally repeat memorised text, but copying isn’t how they normally work.)

“Generative AI and AI are the same thing.” Generative AI is one part of AI. Spam filters, face unlock and route planning are AI too, but they aren’t generative.

“It understands what it creates.” It’s very good at producing content that fits patterns. It doesn’t have experiences or intentions, and it doesn’t check its work against the real world unless a tool does that for it.

“It will always give the same answer.” Generation usually involves randomness, so the same prompt can give different results.

Key takeaways

  • Generative AI creates new content (text, images, audio, video, code) from learned patterns.
  • Predictive AI labels or scores existing things; generative AI makes new things.
  • Text generators predict the next token; many image generators use diffusion, turning noise into a picture.
  • Key milestones: GANs (2014), the transformer (2017), ChatGPT (November 2022).
  • It can be wrong, biased or misused, so check important output and use it responsibly.

Frequently asked questions

What is generative AI in simple words?

Generative AI is AI that makes new things, such as writing, pictures, music or code, after learning from lots of examples.

Is ChatGPT generative AI?

Yes. ChatGPT is a generative AI chatbot. It uses large language models to generate text, and can also work with images and other kinds of content.

What is the difference between AI and generative AI?

AI is the whole field of computers doing tasks that need human-like intelligence. Generative AI is the part of AI focused on creating new content. All generative AI is AI, but not all AI is generative.

How does generative AI create images?

Many image generators use diffusion: they learn to remove noise from images during training, then create a new image by starting from random noise and cleaning it up step by step, guided by your text description.

Is content made by generative AI original?

It is newly generated, not usually copied, but it’s built from patterns in human-made training data. Whether it can be owned or copyrighted, and how training data may be used, are legal questions that are still being settled and vary by country.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.