What Is Generative AI? A Simple Guide with Examples

AI BASICS TO ADVANCED · LESSON 03
From an idea
to a first draft.
How generative AI creates content—and why your judgment matters.

Raju has learned how AI can estimate tea sales and recognize snacks in a photo. Today, he needs something different: a welcoming description for his new ginger tea. Can AI help him write it? This is where generative AI enters the story.

Raju and his shop are fictional teaching examples. The illustration is AI-generated.

01. What is generative AI?

Generative AI is AI that produces content, such as text, images, audio, video, or code, using patterns learned during training. Its output responds to an input, often called a prompt. Different models support different kinds of inputs and outputs; one model does not necessarily do everything.

ONE CAPABILITY · MANY KINDS OF CONTENT
01
Text and code
Draft a description or function
02
Images
Create a visual concept
03
Audio and video
Generate sound or moving images
“Generative” describes producing content. It does not guarantee that the output is correct, unique, or ready to publish.

02. Predicting sales and writing a menu are different tasks

Raju’s sales model estimates how many cups he might sell. A snack classifier predicts a category. A generative language model can produce a menu description. The distinction here is what the application produces—not whether mathematics or prediction is involved internally.

MATCH THE OUTPUT TO THE TASK
01
Forecasting
Estimate tomorrow’s cup count
02
Classification
Identify a pictured snack
03
Generation
Draft a ginger-tea description
Language generation can itself use prediction: many language models repeatedly predict the next token.

03. Give the AI a useful brief

Raju should provide the facts he knows and explain the result he wants. A prompt is the input or instruction given to the model. “Write something about tea” leaves many choices open. A specific brief reduces ambiguity, although it cannot guarantee accurate output.

A CLEAR PROMPT HAS THREE USEFUL PARTS
01
Task
Write a menu description
02
Context
Black tea, milk, ginger, sugar
03
Constraints
Warm tone; under 30 words; no invented facts
Provide relevant information. Do not include private customer details or other sensitive material without appropriate permission.
A prompt you can try
Write a friendly menu description under 30 words for ginger tea made with black tea, milk, fresh ginger, and sugar. Use only these facts. Do not invent prices, awards, or health benefits.
Illustrative draft

Enjoy a warming cup of black tea with milk, fresh ginger, and sugar—a comforting choice for your tea break.

This is a teaching example; your tool may produce a different answer.

04. How does it produce an answer?

During training, a model’s adjustable values are changed so it learns patterns in data. During generation, it uses those learned patterns together with the supplied input. Many text models generate a sequence one token at a time. A token can be a word, part of a word, punctuation, or another text unit.

A SIMPLIFIED TEXT-GENERATION LOOP
01
Read the context
Instructions and available input
02
Select a next token
Use the model’s predicted probabilities
03
Repeat
Add the token and continue until stopping
This describes common autoregressive language models. Image, audio, and video generation can use different mechanisms.

05. Training is not the same as chatting

When Raju sends a prompt, he is normally using an already-trained model. His message supplies context for that response; it does not automatically retrain the underlying model. Whether a service stores conversations or uses them for later training depends on that service’s settings and policies.

KEEP THESE TWO STAGES SEPARATE
01
Training
Adjust the model using data
02
Inference
Use the trained model to generate output
Conversation context can affect a reply without changing the model’s underlying weights.

06. Does it search the internet for every answer?

Not necessarily. A model can generate from its learned patterns and the context provided. Some applications also connect it to web search, documents, or other tools. Without such a connection, do not assume an answer reflects current prices, today’s news, or a verified source.

TWO POSSIBLE APPLICATION FLOWS
01
Without retrieval
Prompt + learned patterns → response
02
With retrieval
Find sources → add context → response
Even a response based on retrieved sources can misread or misrepresent them. Check the cited source when accuracy matters.

07. Why can a confident answer be wrong?

Suppose the draft says, “Raju’s award-winning ginger tea costs ₹20.” Raju never supplied a price or an award. Those are unsupported claims. Generative AI can produce plausible but incorrect information, often called hallucination. Fluent writing is not evidence that a statement is true.

SPOT THE INVENTED DETAIL
01
Known fact
The drink contains fresh ginger
02
Unsupported addition
“Award-winning” or an invented price
03
Review action
Remove the claim or verify it
This invented menu example shows the problem. In technical work, similar errors can appear as nonexistent APIs or fabricated references.

08. Why can the same prompt produce different replies?

There may be several plausible ways to describe the same tea. Generation settings, sampling, model versions, and changes in context can affect which output appears. Variation can help brainstorming, but a different answer is not automatically a better answer.

SAME BRIEF · DIFFERENT POSSIBLE DRAFTS
01
Option A
“A warming cup…”
02
Option B
“Take a comforting tea break…”
03
Selection
Choose by accuracy, clarity, and tone
Later lessons will explain temperature and other generation settings.

09. Use AI as a draft assistant

Raju can use generated text to get started, then check it against his real menu. A developer can ask for code suggestions and run appropriate tests. A learner can ask for an explanation and verify unfamiliar claims. The review should match the consequences of getting something wrong.

DRAFT → REVIEW → USE
01
Draft
Give a clear brief and relevant facts
02
Review
Check facts, suitability, and omissions
03
Use
Edit and publish only after checking
For Raju: confirm ingredients, remove invented claims, and make sure the final description matches the actual drink.

A practical checklist before using the result

  • Facts: Are names, numbers, claims, and references supported?
  • Instructions: Did it follow the requested format and limits?
  • Privacy: Does the input or output expose sensitive information?
  • Suitability: Is the wording appropriate for the intended audience?
  • Validation: If it is code, have you reviewed and tested it?
Keep these distinctions clear
  • Generative AI is part of AI; it does not replace every other AI technique.
  • A chatbot is an interface. Not every chatbot uses a generative model.
  • Generated content is not guaranteed to be original; models can sometimes reproduce learned material.
  • A useful draft still needs a suitable review.

Check your understanding

Think about each question before opening the answer.

1. Raju predicts 120 cups for tomorrow. Is that content generation?

In this example, the task is demand forecasting. Writing a new menu description is our generative task.

2. An AI invents an award for Raju’s shop. What should he do?

Remove the unsupported claim. Do not publish it unless reliable evidence confirms it.

3. Does a clear prompt guarantee a correct answer?

No. It helps communicate the task, but the result still needs checking.

YOUR ONE-SENTENCE TAKEAWAY

Generative AI produces content from learned patterns and your input—but a convincing result still needs checking.

Try it yourself

Use the ginger-tea prompt above. Compare the result with the facts in the prompt. Did it add any ingredient, price, award, or health claim that you did not provide? Edit the draft until every factual claim is supported.

Tell us in the comments: What useful change did you make to the AI’s first draft?

Next lesson

What Is a Large Language Model (LLM)? We will look more closely at the language models behind many AI assistants and the difference between a model and an application.


Sources and further reading

Examples are illustrative, not claims about a deployed business system.

Comments

Popular posts from this blog

Beyond Standard RAG: The Architecture of Agentic Retrieval and Self-Correction Loops

The Architecture of Vision-Language Models: How Multimodal AI Sees and Understands the World

Java Collection Framework: A Practical Guide with Examples