Build this pipeline yourself
Open in the interactive wizard to customize and export
04
AI Content Generation
Multi-stage content creation with research, outline, draft, review, and SEO optimization
advanced Content Creation
Components Used
generator json_transform logger
The Problem
Creating quality content is time-consuming. Writers spend hours on research, outlining, drafting, and editing. Content teams need to produce consistently high-quality articles at scale, but:
- Research is scattered - Facts from multiple sources need synthesis
- Outlines vary wildly - No consistent structure
- First drafts need polish - Multiple editing passes required
- SEO is an afterthought - Keywords and meta added last
Pain Points We’re Solving
- Inconsistent quality - Articles vary based on writer’s day
- Slow turnaround - Hours per article
- Missing metadata - SEO optimization forgotten
- No review process - Drafts go straight to publish
Thinking Process
Content creation follows a natural workflow. Let’s model it:
flowchart TB
subgraph Human["Traditional Human Workflow"]
H1["Research topic<br/>30-60 mins"]
H2["Create outline<br/>15-30 mins"]
H3["Write draft<br/>1-2 hours"]
H4["Self-review<br/>30 mins"]
H5["SEO optimization<br/>15 mins"]
end
H1 --> H2 --> H3 --> H4 --> H5
subgraph AI["AI-Assisted Pipeline"]
A1["Research<br/>~5 sec"]
A2["Outline<br/>~3 sec"]
A3["Draft<br/>~10 sec"]
A4["Review<br/>~5 sec"]
A5["SEO<br/>~3 sec"]
end
A1 --> A2 --> A3 --> A4
A3 --> A5
Temperature Strategy
Different tasks need different creativity levels:
quadrantChart
title Temperature vs Task Type
x-axis Low Creativity --> High Creativity
y-axis Structured --> Freeform
quadrant-1 Draft Writing
quadrant-2 Research
quadrant-3 SEO Meta
quadrant-4 Review
Research: [0.65, 0.3]
Outline: [0.5, 0.7]
Draft: [0.8, 0.8]
Review: [0.25, 0.4]
SEO: [0.15, 0.6]
Solution Architecture
flowchart TB
subgraph Input["📥 Content Brief"]
I1["topic"]
I2["content_type"]
I3["target_audience"]
I4["word_count"]
I5["tone"]
end
subgraph Research["🔍 Research Phase"]
R1["Identify key points"]
R2["Find angles"]
R3["Gather examples"]
R4["Extract keywords"]
end
subgraph Outline["📋 Outline Phase"]
O1["Generate 3 title options"]
O2["Structure sections"]
O3["Plan intro/conclusion"]
end
subgraph Draft["✍️ Draft Phase"]
D1["Write full content"]
D2["Apply tone"]
D3["Hit word count"]
end
subgraph Review["🔍 Review Phase"]
RE1["Assess quality"]
RE2["Identify strengths"]
RE3["Suggest improvements"]
end
subgraph SEO["📈 SEO Phase"]
S1["Meta description"]
S2["Keywords"]
S3["Optimized title"]
end
subgraph Output["📤 Final Output"]
F1["title"]
F2["content"]
F3["meta_description"]
F4["keywords"]
F5["review_notes"]
end
Input --> Research --> Outline --> Draft
Draft --> Review
Draft --> SEO
Review --> Output
SEO --> Output
Pipeline Stages
Stage 1: Research & Key Points
{
"id": "research",
"component": "generator",
"config": {
"system_prompt": "You are a research assistant. Extract key information for content creation.",
"prompt": "Research the topic: {{input.topic}}\n\nTarget audience: {{input.target_audience}}\nContent type: {{input.content_type}}\n\nProvide:\n1. 5-7 key points to cover\n2. Unique angles to explore\n3. Examples or case studies to include\n4. Keywords for SEO",
"temperature": 0.7,
"max_tokens": 800
}
}
Stage 2: Create Outline
{
"id": "outline",
"component": "generator",
"depends_on": ["research"],
"config": {
"system_prompt": "You are a content strategist creating structured outlines.",
"prompt": "Based on this research:\n{{stages.research.output.text}}\n\nCreate an outline for a {{input.content_type}} with:\n1. 3 title options\n2. Introduction hook\n3. Main sections with subpoints\n4. Conclusion approach",
"temperature": 0.6,
"max_tokens": 600
}
}
Stage 3: Write Draft
{
"id": "draft",
"component": "generator",
"depends_on": ["outline"],
"config": {
"system_prompt": "You are an expert content writer. Write engaging, well-structured content.",
"prompt": "Write a {{input.content_type}} based on this outline:\n{{stages.outline.output.text}}\n\nRequirements:\n- Tone: {{input.tone}}\n- Target word count: {{input.word_count}}\n- Audience: {{input.target_audience}}\n\nWrite the complete content now.",
"temperature": 0.8,
"max_tokens": 2000
}
}
Stages 4-5: Parallel Review & SEO
flowchart LR
D["Draft Complete"]
D --> R["Review<br/>temp: 0.3"]
D --> S["SEO Meta<br/>temp: 0.2"]
R --> O["Final Output"]
S --> O
Review Stage:
{
"id": "review",
"component": "generator",
"depends_on": ["draft"],
"config": {
"system_prompt": "You are an editorial reviewer providing constructive feedback.",
"prompt": "Review this {{input.content_type}}:\n\n{{stages.draft.output.text}}\n\nProvide:\n1. Overall assessment\n2. 3 strengths\n3. 3 areas for improvement\n4. Specific suggestions",
"temperature": 0.3,
"max_tokens": 500
}
}
SEO Stage:
{
"id": "seo-meta",
"component": "generator",
"depends_on": ["draft"],
"config": {
"system_prompt": "You are an SEO specialist. Return JSON only.",
"prompt": "Generate SEO metadata for:\n{{stages.draft.output.text}}\n\nReturn JSON: {\"meta_description\": \"...\", \"keywords\": [...], \"seo_title\": \"...\"}",
"temperature": 0.2,
"max_tokens": 200
}
}
Temperature Guide
xychart-beta
title "Temperature by Stage"
x-axis ["Research", "Outline", "Draft", "Review", "SEO"]
y-axis "Temperature" 0 --> 1
bar [0.7, 0.6, 0.8, 0.3, 0.2]
| Stage | Temperature | Rationale |
|---|---|---|
| Research | 0.7 | Explore diverse angles |
| Outline | 0.6 | Structured but flexible |
| Draft | 0.8 | Maximum creativity |
| Review | 0.3 | Analytical, precise |
| SEO | 0.2 | Consistent JSON output |
Sample Input
{
"topic": "The Future of AI in Healthcare: Transforming Patient Care",
"content_type": "blog_post",
"target_audience": "healthcare professionals and technology enthusiasts",
"word_count": 600,
"tone": "professional"
}
Expected Output
{
"title": "How AI is Revolutionizing Patient Care: A Healthcare Professional's Guide",
"content": "The integration of artificial intelligence into healthcare represents one of the most significant transformations in modern medicine...\n\n## Diagnostic Accuracy\n...\n\n## Personalized Treatment Plans\n...\n\n## Operational Efficiency\n...\n\n## The Road Ahead\n...",
"meta_description": "Discover how AI is transforming healthcare with improved diagnostics, personalized treatments, and operational efficiency. A comprehensive guide for healthcare professionals.",
"keywords": ["AI healthcare", "medical AI", "patient care technology", "healthcare automation", "diagnostic AI"],
"review_notes": "Strong introduction with clear value proposition. The diagnostic accuracy section could benefit from specific statistics. Consider adding a real-world case study in the personalized treatment section.",
"word_count": 612
}
Key Learnings
1. Sequential Dependency Chain
Each stage builds on the previous:
- Research informs the outline
- Outline structures the draft
- Draft feeds review and SEO
2. Parallel Efficiency
Review and SEO don’t depend on each other, so they run simultaneously.
3. System Prompts Matter
Each stage has a specialized persona:
- Research: Researcher
- Outline: Strategist
- Draft: Writer
- Review: Editor
- SEO: Specialist
Try It Yourself
fm run pipelines/04-content-generation.pipeline.json \
--input inputs/04-content-request.json