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

> Source: <https://dev.to/abhi18/my-llm-pipeline-failed-its-own-tests-and-that-was-the-pointpublished-true-2f4p>
> Published: 2026-11-27 07:42:06+00:00

**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 the playbook "Verifying model output": <https://wpnews.pro/playbooks/output-verification>

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.
