LESSON 6 Β· FOUNDATIONS

Real-World Applications

See where Generative AI is already useful, how the pieces fit together, and how to turn a real business problem into an AI workflow.

12 min readβ€’Beginnerβ€’Generative AI

By the end of this lesson, you will be able to:

  • Identify common Generative AI applications across different industries.
  • Explain what the model receives and what it produces in a real workflow.
  • Build a simple Python application that generates useful text.
  • Understand when Generative AI should be combined with retrieval, tools, or traditional ML.
  • Design a small, measurable Generative AI use case.
1

Where does Generative AI fit?

Generative AI is useful whenever an application needs to create, transform, summarize, explain, or interact with information. The model is usually one part of a larger application rather than the entire application.

Generative AIunderstand instructions
and produce useful output
Textsummaries, emails, support replies
Codeexplanations, tests, debugging
KnowledgeQ&A over company documents
Creative workcopy, images, ideas, scripts
Educationtutors, practice, explanations
Automationdrafts, extraction, workflows

Important: A production application normally adds rules, data, permissions, validation, monitoring, and sometimes other AI systems around the model.

2

Example 1: Customer support

Support teams receive repetitive questions, but a useful response still needs to be clear and specific. Generative AI can draft a response from the customer's message and approved information.

INPUTCustomer messageβ€œHow can I return my order?”
β†’
CONTEXTReturn policyApproved company information
β†’
GENERATIONSupport replyClear, natural-language draft

Build a simple support-reply generator

The code below uses a real model API. In a production system, the policy would normally come from a database or retrieval system rather than being typed directly into the prompt.

</> Python
# Run this cell in Google Colab.
%pip install -q openai

from getpass import getpass
import os

os.environ["OPENAI_API_KEY"] = getpass("Enter your OpenAI API key: ")

from openai import OpenAI
client = OpenAI()

customer_message = "How can I return my order? It arrived yesterday."
return_policy = "Customers can return unused items within 30 days. The item must be in its original condition."

prompt = f"""Write a concise support reply.
Use only the policy below.

Policy:
{return_policy}

Customer:
{customer_message}"""

response = client.responses.create(
    model="gpt-5.6-luna",
    input=prompt,
)

print(response.output_text)
Possible outputHi! You can return an unused item within 30 days, provided it is in its original condition. Please start the return through our returns process.

Notice the architecture: the model did not invent the return policy from nowhere. The application supplied the policy as context and asked the model to turn that information into a customer-friendly response.

3

Example 2: Software development

Developers can use Generative AI to explain unfamiliar code, create test cases, suggest refactoring ideas, write documentation, and help investigate errors.

INPUT

A function or error

Give the model a small, focused piece of code and explain the goal.

OUTPUT

Useful development artifact

Ask for an explanation, test cases, documentation, or a safer rewrite.

</> Python
# Run this cell in Google Colab.
%pip install -q openai

from getpass import getpass
import os

os.environ["OPENAI_API_KEY"] = getpass("Enter your OpenAI API key: ")

from openai import OpenAI
client = OpenAI()

code = """
def calculate_total(price, quantity):
    return price * quantity
"""

response = client.responses.create(
    model="gpt-5.6-luna",
    input=f"Explain this Python function to a beginner and give two test cases.\n\n{code}",
)

print(response.output_text)

Good practice: Ask for small, verifiable changes. Then run the code, inspect the tests, and review the result instead of blindly accepting generated code.

4

Example 3: Company knowledge assistants

Employees often need answers hidden inside policies, product manuals, onboarding documents, or internal guides. A language model can turn retrieved information into a natural answer.

1User asksβ€œWhat is our refund window?”
β†’
2RetrieveFind the relevant policy section.
β†’
3GenerateExplain the policy clearly.
This is where RAG becomes important. The model handles language generation, while retrieval supplies current or private information. You will build this pattern later in the course.
5

More applications you will see in practice

MARKETING

Campaign drafts

Generate first drafts for product descriptions, email variants, ad copy, and social posts.

EDUCATION

AI tutors

Explain concepts at different levels, create practice questions, and give feedback on answers.

OPERATIONS

Document workflows

Summarize long documents, extract key information, and turn notes into structured drafts.

RESEARCH

Information synthesis

Compare supplied material, summarize findings, and help researchers explore ideas.

MEDIA

Creative production

Generate scripts, story ideas, captions, image concepts, and other creative starting points.

ANALYTICS

Natural-language interfaces

Let users ask questions about data and receive explanations or next-step suggestions.

6

Generative AI is not only text

Modern AI applications can work across multiple kinds of content. The exact capabilities depend on the model and product, but the broader idea is simple: generation can happen in different modalities.

Textemails, summaries, explanations
Codeprograms, tests, documentation
Imagesconcepts, illustrations, designs
Audiospeech and voice experiences
Videogenerated or transformed visual content
7

A real application is more than one API call

A production system usually surrounds the model with application logic.

1Userasks a question
β†’
2Applicationchecks permissions
β†’
3Data / Toolsgets relevant information
β†’
4Modelgenerates output
β†’
5Validationchecks the result
PromptWhat should the model do?
ContextWhat information does it need?
ToolsWhat actions or systems can it use?
GuardrailsWhat must it never do?
EvaluationHow will you know it works?
MonitoringHow will you detect failures?
8

How to choose a good Generative AI use case

Do not start with β€œWhere can we add AI?” Start with a painful, repetitive, measurable task.

01Is there a clear input?

Messages, documents, code, questions, or other information.

02Is generation actually useful?

The output should save time, improve quality, or unlock a new experience.

03Can a human verify it?

High-impact outputs need appropriate review and controls.

04Can you measure success?

Define quality, time saved, accuracy, cost, or another meaningful metric.

Simple rule: Start narrow. Prove value with one workflow before expanding the system.

9

Mini-project: Build an AI support assistant

Take the support example one step further. Design a small assistant that drafts answers to common customer questions.

1CollectChoose 10–20 real support questions.
2PrepareWrite the approved answers or policies.
3PromptAsk the model to answer using only that information.
4TestTry normal, ambiguous, and impossible questions.
5MeasureCheck correctness, helpfulness, and time saved.
Challenge: Add a rule saying the assistant must say it does not know when the supplied policy does not contain the answer. Then test it with a question that is outside the policy.
PRACTICE

Identify the best application

Choose an approach before revealing the answer.

1Turn a 20-page internal policy into a short employee summary.Generative AI
2Predict whether a payment is likely to be fraudulent.Traditional ML / prediction
3Answer questions using private company documents.Generative AI + retrieval (RAG)
4Generate five alternative product descriptions.Generative AI
QUICK QUIZ

What is the strongest starting point for a production Generative AI project?

30-second recap

  • Generative AI can create, transform, summarize, explain, and interact with information.
  • Common applications include support, coding, education, marketing, document workflows, research, and creative work.
  • Real applications often combine a model with context, retrieval, tools, rules, permissions, and validation.
  • A strong use case starts with a narrow problem and a measurable outcome.
  • When private or changing knowledge is required, retrieval can supply the information the model needs.