Multi-Layered LLM Evaluation Pipeline for Production Content Generation
treater · Tech · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Production LLM content quality
Treater needed a quality-control pipeline for multi-step LLM content generation where stochastic outputs could fail formatting, tone, style, guidelines, or customer acceptance expectations.
Constraints:
- First-pass generation uses many interconnected LLM calls and prompts.
- Quality failures need interpretable feedback, not just opaque scores.
- Automatic rewriting should be a safety net, not a substitute for good first-pass generation.
- Human edits are the gold standard for continuous improvement.
Architecture
Treater built a four-layer evaluation pipeline: deterministic rule checks, LLM-as-judge evaluations with explanations, automatic rewriting with fix-and-verify loops, and daily human edit analysis that feeds prompt, guideline, model, provider, and temperature improvements.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR deterministic-evaluations["Deterministic Evaluations"] llm-judge-evaluations["LLM Judge Evaluations"] automatic-rewriter["Automatic Rewriter"] human-edit-analysis["Human Edit Analysis"] engineering-feedback-loop["Engineering Feedback Loop"] deterministic-evaluations --> llm-judge-evaluations llm-judge-evaluations --> automatic-rewriter automatic-rewriter --> llm-judge-evaluations automatic-rewriter --> human-edit-analysis human-edit-analysis --> automatic-rewriter human-edit-analysis --> engineering-feedback-loop engineering-feedback-loop --> human-edit-analysis
Components
| Component | Role | Interacts with |
|---|---|---|
Deterministic Evaluations |
Check character limits, formatting, banned terms, and malformed outputs quickly. | LLM Judge Evaluations |
LLM Judge Evaluations |
Assess tone, clarity, relevance, style, and guideline adherence with explanations. | Automatic Rewriter |
Automatic Rewriter |
Rewrites failed content using failed-test explanations, guidelines, and successful edit examples. | LLM Judge Evaluations, Human Edit Analysis |
Human Edit Analysis |
Analyzes differences between generated and edited outputs to improve prompts and settings. | Automatic Rewriter, Engineering Feedback Loop |
Engineering Feedback Loop |
Receives prompt, guideline, temperature, model, and provider improvement suggestions. | Human Edit Analysis |
Data flow
Generated content passes deterministic checks first, then asynchronous LLM judge evaluations. Failed outputs go to a rewriter with original content, failed-test explanations, guidelines, and recent successful edits, then revised outputs are re-evaluated and human edits feed daily improvement analysis.
Why this architecture
Layering cheap deterministic checks, nuanced LLM judges, repair loops, and human edit analysis catches simple errors early, makes failures actionable, and turns post-production edits into prompt and model improvements.
Models used: LLM judges · LLM rewriter · production generation LLMs
Scale
- Treater's first-pass generation uses an average of 8-10 interconnected LLM calls across 10 prompts.“an average of 8-10 interconnected LLM calls across 10 different prompts for first-pass generation alone”summary, stated
- Deterministic evaluation failure rates remain under 2%.“failure rates at this stage remain under 2%”summary, stated
- The system performs daily human edit analysis.“The system performs daily analysis of differences between LLM-generated and human-edited outputs”summary, stated
Alternatives considered (roads not taken)
Numeric 1-10 scoring
Rejected because: Treater found numeric scores produced hallucinated precision, threshold ambiguity, and low actionability.
Manual review as the primary discovery mechanism
Rejected because: Inadequate observability meant issues were discovered only through painful manual reviews.
Patterns
eval-driven-development (quality)
Treater uses deterministic checks, LLM judges, fix-and-verify rewriting, and human edit analysis to drive LLM quality.
llm-as-judge (quality)
LLM judges evaluate tone, clarity, relevance, style, and guideline adherence with explanations.
observability-tracing (operations)
Treater traces inputs, outputs, prompt versions, evaluation checkpoints, and completion paths.
Tradeoffs
Layer deterministic and LLM-based evaluation
Chose Fast rule checks plus nuanced LLM judges over Only one evaluation mechanism.
Rationale: Rule checks catch structural problems cheaply while LLM judges handle tone and guideline nuance.
Use human edits as ground truth
Chose Daily edit-difference analysis over Relying only on synthetic judge feedback.
Rationale: Human edits reveal what users actually accepted or changed.
Gotchas (what bit them)
Numeric judge scores can look precise while being unhelpful.
Root cause: LLMs may output scores without consistent reasoning, and thresholds are ambiguous.
Resolution: Use binary pass/fail tests with clear criteria and required explanations.
Automatic rewriting can mask upstream prompt failures.
Root cause: A rewriter can repeatedly fix recurring issues without improving first-pass generation.
Resolution: Treat rewriting as a safety net and fold recurring fixes back into core prompts.
Evaluation
Treater evaluates content through deterministic rules, LLM judges with explanations, rewrite verification, and human edit analysis.
Metrics: deterministic failure rate · content acceptance rate · pass/fail judge outcomes · human edit deltas
Outcomes
- Treater built a four-layer production evaluation pipeline.
- Deterministic failure rates are reported under 2%.
- Human edit analysis drives continuous prompt, model, and guideline improvements.
The pipeline involves 8-10 LLM calls across 10 prompts for first-pass generation.