Skip to content
Search ESC
LangGraphCrewAIPydanticOpenRouterD2 DiagramsMODx CMS

Autonomous Content Engine with Multi-Model LLM Pipeline

Multi-model LLM pipeline with 12 Pydantic validators, auto-generated D2 diagrams, and HITL review — replacing $600 freelance articles.

Bottom Line

Multi-model LLM pipeline with 12 Pydantic validators and auto-generated D2 diagrams. Over 99% cost reduction vs $600 freelance articles. Trade-off: mandatory HITL review gate means human approval is the new bottleneck.

// system_metrics
cost_reduction: >99%
pydantic_validators: 12
articles_pipeline: 75

The Problem

$600 per freelance article with inconsistent quality

Content marketing for a technical AI consultancy requires deep domain expertise. Freelance writers produced generic content that missed technical nuance, required extensive editing, and cost $400-600 per article. The pipeline from brief to published article took 2-3 weeks.

  • $600 average cost per article from freelance writers
  • 2-3 week turnaround from brief to publication
  • Inconsistent quality: generic AI content that missed technical depth
  • No structured validation: quality checks were manual and subjective
  • Zero diagram generation: architecture diagrams required separate design work

Our Approach

Multi-model pipeline with structured validation

We built a multi-model LLM pipeline that routes different tasks to specialized models: Gemini for research and reasoning, Claude for long-form writing, and Gemini Flash for validation. Every article passes through 12 Pydantic validators before human review.

The Architecture

Pagezilla content engine architecture — research, multi-model LLM generation, 12 Pydantic validators, HITL review, and CMS publishing

Fig 1 — Multi-model content generation with validation gates

End-to-end content generation with HITL approval

The pipeline ingests topics from a content calendar, performs GSC-driven keyword research, generates 1,800+ word articles with D2 architecture diagrams, validates against 12 quality gates, and queues for human review before CMS publication.

Key engineering decisions:

  • OpenRouter for model routing: single API key, model-agnostic switching
  • Pydantic v2 validators: word count, diagram count, banned words, FAQ structure, TL;DR presence
  • D2 to Kroki SVG pipeline: auto-generated architecture diagrams rendered server-side
  • Folder-based HITL: to_review / to_publish / published workflow with human approval gate

Results

  • Over 99% cost reduction vs. freelance content production
  • 75 articles in content calendar, tiered by priority
  • 12 automated quality validators
  • Every article includes 2+ architecture diagrams
  • Human review required before any publication

Architecture Trade-offs

Gain

Over 99% cost reduction vs $400-600 freelance articles. 75-article content calendar at pipeline speed. Turnaround compressed from 2-3 weeks (freelance) to hours.

Cost

Mandatory HITL gate is the new bottleneck. Every article requires human review before publication (folder-based to_review / to_publish / published workflow). The pipeline generates fast, but one person reviewing 75 articles is a queue management problem.

Gain

12 Pydantic validators catch quality issues before human review. Word count, diagram count, banned words, FAQ structure, TL;DR presence — all enforced automatically.

Cost

Rigid template structure. Every article must include 2+ architecture diagrams, FAQ, and TL;DR. Topics that don't naturally suit diagrammatic explanation are forced into the same structural mold.

Technology Stack

What we built with

LangGraphCrewAIPydanticOpenRouterD2 DiagramsMODx CMSPython
Similar challenge?

Deploy this architecture

Submit your requirements. We'll review your constraints, identify bottlenecks, and scope the path to production.

[ SUBMIT SPECS ]

No SDRs. A Principal Engineer reviews every submission.

From the team behind Production-Ready AI Agents (Amazon, 2025)