Multi-model LLM pipeline with Pydantic validators and generated D2 diagrams. The system makes technical publishing reviewable and repeatable; mandatory HITL approval remains the release gate.
The Problem
Technical content was hard to keep consistent
Content marketing for a technical AI consultancy requires deep domain expertise. Generic drafts missed technical nuance, required extensive editing, and made it hard to keep diagrams, claims, examples, and review standards consistent across a growing content calendar.
- Slow production loop: research, drafting, diagramming, and review happened as separate manual steps
- Inconsistent quality: drafts often missed technical depth
- No structured validation: quality checks were manual and subjective
- Diagram friction: 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
End-to-end content generation with HITL approval
The pipeline ingests topics from a content calendar, performs GSC-driven keyword research, drafts technical articles with D2 architecture diagrams, validates against 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
- 75 articles in content calendar, tiered by priority
- 12 automated quality validators before human review
- Architecture diagrams generated inside the same workflow
- Human review required before any publication
Architecture Trade-offs
Repeatable production with explicit quality gates. Research, drafting, diagramming, validation, and publication handoff follow the same reviewable path instead of scattered manual steps.
Mandatory HITL gate is the new bottleneck. Every article requires human review before publication. The pipeline can draft quickly, but queue ownership and release judgment still determine throughput.
Pydantic validators catch quality issues before human review. Structure, diagrams, banned words, FAQ shape, and summary presence are checked automatically.
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.
Similar Case Studies
Related Articles
Map this proof to your system
Send the workflow, constraints, and failure mode. We map the relevant pattern to your system and recommend the next step.
[ SUBMIT SPECS ]No SDRs. A Principal Engineer reviews every submission.
From the team behind Production-Ready AI Agents (Amazon, 2025)