cd /news/large-language-models/my-llm-pipeline-failed-its-own-tests… · home › topics › large-language-models › article
[ARTICLE · art-177145] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

My LLM Pipeline Failed Its Own Tests (and That Was the Point) published: true

A developer built a multi-stage LLM writing pipeline—outline, draft, refine, plus four guardrails for length, outline-copying, structure and repetition—and found that testing the checks against deliberately bad and good output exposed flaws in the guardrails themselves. A planted-error test showed the fact-checker caught all three injected mistakes from a source file, but on a real post it reported zero issues while missing an error describing attention scores as divided by the "inverse square root" of the key dimension instead of the square root. The developer traced an over-length problem to the draft prompt's paragraph rules rather than the trimming pass, and fixed it by scaling paragraph rules to each section's word budget with a hard ceiling.

recommendation

Validate fact-checking and guardrail stages against planted errors and known-good drafts before trusting a zero-issue report, and keep a human read of the final output.

more in playbook: Verifying model output
by read1 min views6 publishedNov 27, 2026

The outline stage returns validated JSON. The draft stage writes each section separately, passing in the previous text for flow. The refine stage edits for repetition and can fact-check against a source file. Four guardrails then check length, outline-copying, structure and repetition. Tone, audience and length are configurable, and I ran it on three different topics.

My first fix was to trim the draft afterwards, but each pass removed only 10 to 20 words. The real cause was my own draft prompt, which demanded 2 to 3 paragraphs of 3 to 5 sentences per section. Five sections of that can never fit in 700 words. Scaling the paragraph rules to each section's word budget and adding a hard ceiling fixed it at the source.

I tested the checks with deliberately bad input. A pasted outline must fail the "not just the outline" check, and it did (12 of 12 key points copied). But testing also showed that my structure check wrongly flagged the one-paragraph conclusion, and my outline-copy threshold was too strict for short posts. A check you haven't tested against both bad and good output only measures your assumptions.

I planted three errors in a test draft, such as "PostgreSQL cannot store vectors", and the fact-checker found and fixed all three from the source file. Then I ran it on the real Transformer post. It reported zero issues, yet the post said attention scores are divided by the "inverse square root" of the key dimension. The correct operation is dividing by the square root. I caught it by reading the post myself.

── more in #large-language-models 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/my-llm-pipeline-fail…] indexed:0 read:1min 2026-11-27 · —