Generative AI & LLMsLesson 1 of 4

Introduction to Generative AI

We have not written any code yet. This chapter only explains what Generative AI is, because the rest of the LangChain course assumes you have seen a chat tool at least once.

What is Generative AI?

Older software classified things: spam or not spam, cat or dog in a photo. Generative AI creates output — text, images, code, audio — from a request you type in.

Open ChatGPT, write a question, get an answer. That question is the prompt. Claude and Gemini follow the same pattern with different models behind them.

Rough mental model: autocomplete on your phone, but scaled up to full paragraphs and trained on far more text.

An Example

A Class 8 student stuck on Life Science might type:

Explain photosynthesis in 3 bullet points for a school note.
G
  • Plants use sunlight, water and CO₂ to make glucose.
  • Chlorophyll in the leaves absorbs the light.
  • Oxygen is released — the gas we breathe.
Prompt in, response out — same pattern across most chat tools.

The answer is assembled on the spot. It is not pulled from one saved webpage. The model has seen many explanations during training and drafts a new version for this prompt.

Strengths and Limits

Good for first drafts — emails, short notes, rough code, breaking a chapter into simpler points. Handy when you are stuck on wording or structure.

Poor substitute for fact-checking. Dates, numbers, citations, and exam answers still need your own review. Models can sound certain while being wrong; that is often called a hallucination.

Training data has a cutoff, so do not expect live scores, today's headlines, or post-cutoff events unless the tool has search built in.

Where You See It Today

Most chat products sit on a large language model (LLM). The next lesson covers OpenAI specifically — ChatGPT, the API, and keys. LangChain comes later, when we wire models into Python.

What's Next

What OpenAI is, how ChatGPT differs from the API, and where your API key lives.