4. Generative AI#
Generative AI can work with text, images, audio, video, and documents. This chapter explains how large language models work at a conceptual level, how to instruct them well, and how to choose use cases where their strengths outweigh their limits.
Language Models: LLMs generate text by predicting likely next tokens, which makes them fluent but not inherently factual.
Prompting: Clear instructions, context, examples, and output formats shape the quality and consistency of results.
Use Cases: Compare drafting, document extraction, and multimodal tasks against their evidence, cost, and review needs.
Chapter Video
Grant Sanderson (3Blue1Brown) created this animation for the Computer History Museum’s Chatbots Decoded exhibit.
Grant Sanderson (3Blue1Brown). Large Language Models, Explained Briefly. Created for the Computer History Museum. Watch on YouTube.
Hosted on YouTube; property of its original creator, embedded here for educational reference only.
Learning Objectives
By the end of this chapter, you will be able to:
Explain how a large language model generates text using tokens and context windows.
Write prompts that specify role, task, context, examples, and output format.
Compare stored prompt responses and validate structured output before using it in a workflow.
Evaluate a proposed generative AI use case for value and risk.
Explain why generative models can produce confident but incorrect output.
Separate generated document fields and narratives from the evidence and authority needed for accounting work.
Chapter Flow
Concept Map
- Tokens
- Context windows
- Reasoning effort
- Instructions
- Examples
- Output validation
- Drafting
- Multimodal use
- Input permissions
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
Token |
A chunk of text, often part of a word, that a language model reads and generates. |
2 |
Context window |
The maximum amount of text a model can consider at once, including the prompt and its response. |
3 |
Prompt |
The instructions and input given to a generative model. |
4 |
System prompt |
Standing instructions that set a model’s role, rules, and tone for a conversation. |
5 |
Few-shot prompting |
Including worked examples in a prompt so the model follows the demonstrated pattern. |
6 |
Temperature |
A setting that controls how varied or predictable a model’s output is. |
7 |
Structured output |
Model output in a fixed format, such as JSON, that software can parse reliably. |
8 |
Hallucination |
Fluent model output that is false or unsupported by any source. |
9 |
Foundation model |
A large model trained on broad data that can be adapted to many tasks. |
10 |
Multimodal model |
A model that works with more than one kind of input or output, such as text and images. |
11 |
Fine-tuning |
Further training a model on specialized examples to change its behavior. |
12 |
Copilot |
A generative AI assistant embedded in an application to help a person do their work. |
13 |
Reasoning model |
A model that produces intermediate steps before its answer, usually at higher cost and latency. |
14 |
Chatbot |
A conversational interface to a model, answering questions in a dialogue. |
15 |
AI agent |
A system that uses a model to pursue a goal by choosing and running tools, within limits set by people. |
16 |
Jagged frontier |
The uneven boundary of tasks where a model is reliable, so some hard tasks work and some easy ones fail. |