AI Terminology
/Intermediate
Prompt Chaining
Definition
The architectural practice of breaking a complex, multi-step task into several smaller, separate API calls to an LLM, where the output of one prompt becomes the input of the next.
Explain Like I'm New
An assembly line. You don't ask the AI to write a whole book at once. Prompt 1: 'Write an outline.' Prompt 2: 'Take this outline and write Chapter 1.' Prompt 3: 'Take Chapter 1 and fix the grammar.'
Real World Example
A legal AI app. Step 1: Extract all dates from the contract. Step 2: Pass those dates to the AI and ask it to determine which one is the expiration date. Step 3: Pass that expiration date to the AI and ask it to draft a warning email.
Common Use Cases
- •Complex automation
- •Agentic workflows
- •Error reduction
Interview Questions
basic
- Why use Prompt Chaining instead of just writing one massive, complex prompt?
intermediate
- What is a major downside of Prompt Chaining in a production application?