Skip to main content

Credits of the image to Anthropic

Overview

Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one. You can add programmatic checks on any intermediate steps to ensure that the process is still on track. This workflow trades off latency for higher accuracy by making each LLM call an easier, more focused task.

When to use

Tasks that can be cleanly decomposed into fixed subtasks.

Using prompt chaining in Latitude

Marketing Copy
This pattern is particularly effective when you have a clear process that can be broken down into logical stages, and when the quality benefits of step-by-step processing outweigh the increased latency and cost.