Prompt Chains To Supercharge Your AI Game

Prompt chaining is when you feed the response of one prompt into the input for another prompt. This lets you perform complex tasks by breaking the task into smaller, connected prompts.

There are two approaches to elevating AI models like ChatGPT. One approach is the “mega-prompt,” a large, detailed instructional prompt. The other is chaining individual prompts, each tailored for a specific task. Chains has two advantages over mega-prompts:

Task Specificity: GPT models perform clear, focused tasks more effectively than complex ones. Try asking GPT to perform a task on a short passage, then repeat it on a large one. Drop a short book into your prompt and ask GPT to identify all instances where the protagonist does an action, like laughing, the error rate increases compared to the task performed on a paragraph.

Shorter prompts aren’t necessarily better—detailed prompts often outperform one-liners. Rather, GPT’s attention dilutes as the prompt’s text volume increases. Breaking a complex task into smaller, focused tasks can outperform a single complex task.

Separation of concerns: Breaking a complex tasks into a process and assigning each step to the AI lets you maintain responsibility for the overall approach, while AI handles individual task details.

This delegation is ideal and easier to remember with a prompt chain. With mega-prompts, it’s tempting to give AI a complex and messy task and forget the AI can’t do research, doesn’t understand nuance, and hallucinates facts.

The trade-off is that prompt chains require expertise, are harder to construct, take longer to execute, and can be more expensive.

In short, always think of AI as a smart intern- brilliant at reason but zero expertise. Would you expect an intern to write a research paper, or would you break the process down into discrete steps and provide clean guidance on each step?


Discover more from Josh Pitzalis

Subscribe to get the latest posts to your email.