prompt_chains

Prompt chains let you break complex tasks into multiple sequential steps. Each step builds on the context of previous steps, enabling sophisticated multi-turn workflows.

what_are_chains

A prompt chain is a sequence of prompts that execute one after another. The output from each step is available as context for subsequent steps, allowing you to:

  • Break complex tasks into manageable steps
  • Build on intermediate results
  • Create multi-stage content workflows
  • Implement iterative refinement processes

creating_a_chain

1

Write your main prompt

Start by writing the high-level task you want to accomplish in the prompt editor.

2

Click "create_prompt_chain"

This button uses AI to analyze your prompt and suggest a multi-step breakdown. The AI considers the complexity and suggests an optimal sequence of steps.

3

Review and edit steps

The generated chain appears in a panel. Review each step and make any necessary edits. You can add, remove, or reorder steps.

4

Execute the chain

Run the chain to execute all steps in sequence. Watch the step tracker to see progress as each step completes.

example_chain

Blog post writing workflow

Original prompt: "Write a blog post about the benefits of remote work"

Step 1Research & Outline

Generate 5 key benefits of remote work with supporting points for each.

Step 2Draft Introduction

Write an engaging introduction that hooks the reader and previews the main points.

Step 3Write Body Sections

Expand each benefit into a full paragraph with examples and data.

Step 4Craft Conclusion

Write a compelling conclusion that summarizes key points and includes a call to action.

Step 5Polish & Format

Review the complete draft, add transitions, and format with headers.

use_cases

Content Creation

Research → Outline → Draft → Edit → Polish

Code Generation

Requirements → Design → Implement → Test → Document

Analysis Tasks

Gather data → Analyze → Synthesize → Recommend

Translation Workflows

Translate → Localize → Review → Adapt tone

managing_chains

Editing steps

Click on any step to edit its prompt. Changes are saved automatically. You can modify the prompt text, add variables, or adjust instructions.

Reordering steps

Drag and drop steps to change their order. The chain will execute in the new order.

Adding/removing steps

Use the add button to insert new steps at any position. Click the delete icon on a step to remove it from the chain.

Exporting chains

Export your chain as JSON to save it for later use or share with colleagues. Import chains from JSON files to reuse workflows.

step_tracker

When executing a chain, the step tracker shows real-time progress:

  • Pending - Step waiting to execute
  • Running - Step currently executing
  • Complete - Step finished successfully
  • Error - Step failed (chain pauses)

tips

Keep steps focused

Each step should have a single, clear objective. Avoid cramming too much into one step - it's better to have more focused steps.

Review generated chains

AI-generated chains are a starting point. Always review and customize the suggested steps to match your specific needs.

Test individual steps

Before running a full chain, test critical steps individually to ensure they produce the expected output.

limitations

Keep these limitations in mind when using prompt chains:

  • Context window limits - very long chains may exceed model limits
  • Accumulated errors - mistakes in early steps propagate forward
  • API costs - each step is a separate API call