Lesson 25 of 30

Generative AI and LLMs

Discover how generative AI creates text, code, images, and more, and why large language models are so influential.

Beginner Friendly
3 Worked Examples
Exercises Included

Learning objectives

  • Understand what generative AI is
  • Recognize common uses of large language models
  • Appreciate both the power and limits of generated content

Introduction

Generative AI refers to systems that create new content rather than only classifying or scoring existing data. This content can include text, code, images, audio, video, and structured outputs. Large language models, or LLMs, are one of the most visible forms of generative AI because they can produce fluent natural language responses.

Generative AI is powerful because it can draft, summarize, brainstorm, translate, explain, and support interactive workflows. It often feels more flexible than classical AI systems because users can guide it with prompts.

However, generated content is not automatically correct. Fluency can create an illusion of certainty. Responsible use requires verification, context, and awareness of limitations.

What makes generative AI different

Traditional models often output a class, score, or ranking. Generative systems output new content. A language model predicts the most suitable next pieces of text based on context and training patterns.

This makes the interface more open-ended. Users can ask for explanations, drafts, plans, or code rather than selecting from fixed options.

Where LLMs are useful

LLMs are widely used for writing support, question answering, document summarization, knowledge retrieval workflows, code assistance, and customer service automation.

Their usefulness increases further when they are combined with tools, retrieval systems, structured outputs, and human review.

Limitations and responsible use

LLMs can make factual mistakes, misunderstand ambiguous prompts, or produce answers that sound confident without being reliable. They may also reflect biases from training data.

This is why users should verify important information, especially in legal, medical, educational, or financial contexts.

Examples

Drafting content

A language model creates a first draft of a lesson plan, report, or email to save time for the user.

Summarizing documents

An assistant reviews a long report and produces a shorter summary with key points and action items.

Code support

A developer uses an LLM to explain an error message, suggest a function, or refactor repetitive code.

Exercises

  1. Define generative AI in your own words.
  2. List five tasks where LLMs can be useful.
  3. Why can generated content be persuasive even when it is wrong?
  4. What checks would you apply before trusting an AI-generated answer?
  5. Write a short paragraph comparing a classifier and a generative model.

Key takeaway

Generative AI expands what software can help create, but human review remains essential because fluent output is not the same as guaranteed truth.