Prompt Integrity: We Stopped Letting the LLM Rewrite Your Prompts — Here's What Broke
The failure report that changed how we build is the kind you can reconstruct from almost any prompt-rewriting pipeline, because they all break the same way. Picture a completely ordinary session: a user uploads a photo of their living room, types a five-word prompt — "make it cozy, keep the rug" — and gets back a render where the rug was gone, the sofa had visibly grown, and the whole scene had slid from afternoon daylight into warm evening lamplight.
Nothing about that output was broken in the model sense. The image was sharp, the shadows were plausible, every chair leg touched the floor. It just wasn't what the person asked for. The rug — the one thing they had explicitly protected — was the first thing to go.
The lesson generalizes. That rug is not an image-model problem, an aesthetic problem, or a prompt-engineering skill issue. It is the predictable output of an architecture that treats the user's words as a seed rather than a specification. We stopped doing that. This is a breakdown of the mechanism, what broke, what fixing it cost us, and who wins and loses when you decide that the prompt a user typed is the prompt the model executes.
Prompt integrity is the property that the text reaching the downstream model is a provable, inspectable function of the text the user supplied — and that any transformation of it is visible, attributable, and reversible.

图示:来源页预览图(仅作编辑上下文;版权归属原发布方) · 来源引用:dev.to
The Failure Is Not a Bug. It's the Architecture.
Anatomy of a rewriting pipeline
Almost every "enhancement" stage looks the same. The user's string is passed to a second LLM with a system prompt along the lines of "You are an expert prompt engineer. Expand the user's prompt into a detailed, vivid description that will produce a high-quality result." The output — typically 5–15× longer — is what the image model, video model, or downstream agent actually sees. The original is usually logged to an analytics table and then discarded.
There may be additional stages: a classifier that routes to a style preset, a safety pass, a template that appends boilerplate ("professional lighting, 8k, highly detailed"). Each stage is individually defensible. Together they form a lossy, opaque channel between what a person meant and what a machine was told.
The honest case for rewriting
It is not pure stupidity. Short prompts genuinely under-specify, and diffusion and language models genuinely respond to detail. On aggregate benchmarks, expanded prompts score higher on aesthetic-preference raters. Rewriting is a real quality lever for the median prompt — which is exactly the case that hides the failure, because the median prompt is a thin mood request from a first-time user who will never notice the difference between "what I asked for" and "something nice."
The people who do notice are the ones with specific intent. Specific intent is where your retention lives.
Five Ways Rewriting Destroys Intent
1. Preservation constraints get treated as content requests
"Keep the rug" is not a request to generate a rug. It is an assertion that a region of the input is frozen. Rewriters are optimized to produce descriptions of what should be present, and "keep X" reads to them as a weak, redundant mention of X. Sometimes it gets dropped as noise. Sometimes it survives as "a rug" — which is worse, because now the model is free to generate a rug, at a different scale, in a different style, and the user's actual rug is gone.
2. Negations collapse
LLM-expanded prompts are bad at negation, and the rewriter itself is often the first place the negation dies. "No text in the image" becomes "a clean, minimal design" — and then the downstream model, which also handles negation poorly, puts a title on it. Negation is a constraint. Expansion is prose. Prose does not carry constraints well.
3. Priors compound
The rewriter's model of "cozy" includes lamplight, throws, warm grades, and golden hour. The image model's model of "cozy" includes the same cluster. When you pipe one prior into the other, you don't get "cozy"; you get the intersection of two priors, applied with double confidence. The user said cozy and meant "a blanket on the sofa in the daylight they already have." The pipeline heard cozy and delivered a magazine shoot at dusk.
4. Scope inflates and degrees of freedom multiply
A five-word prompt constrains two or three things. An eighty-word rewrite constrains nothing, because it asserts fifteen things — texture, lighting, lens, material, mood, color grade. Each added descriptor is a claim the user never made, held with the same apparent authority as the ones they did. Every token beyond the user's intent is a degree of freedom the model can spend on something else.
5. The original is destroyed, so nothing is diffable
This is the structural sin. If you overwrite the prompt and keep only the expanded version, you cannot answer the only question that matters after a bad output: what did we actually ask for? You cannot A/B the rewrite, you cannot show the user what changed, and you cannot build a regression suite. Every incident becomes archaeology.
Why the Metrics Never Caught It
The average is not the contract
Offline evals measure preference over a sampled distribution. Constraint-bearing prompts — "keep the rug," "don't change her face," "leave the logo untouched" — are rare in that distribution and almost never isolated as a metric. So rewriting improves the number that leadership watches while degrading the thing users actually care about, invisibly, for months.
Goodhart on aesthetic scores
Once "expanded prompts score higher on aesthetic preference" becomes a target, the pipeline optimizes toward more aesthetically confident prompts. Aesthetic confidence and constraint fidelity are not merely uncorrelated; they are often in tension. The most confident possible prompt is one that fully reimagines the scene — which is precisely the one that deletes the rug.

图示:HEXOPS 原创配图(受选题启发,非复制原文图片) · 来源引用:dev.to
What "Stopping It" Actually Means
Removing the rewriter is not a one-line deletion. Integrity requires three concrete commitments.
Pass-through by default
The default path must be: user string in, user string out, byte-for-byte. Rewriting becomes a mode, not a stage. If the pipeline needs to add anything — a style tag, a system instruction — it does so in a channel the user can see, not by editing their sentence.
Enhancement becomes an explicit, diffable action
The useful half of rewriting survives as a button, not a hidden step: Enhance. Show the diff. "We added: warm lamplight, soft textures. We removed: nothing. Accept / Edit / Revert." Now the rewrite is an artifact the user owns, and the metrics can measure acceptance rate rather than assuming benefit.
Constraints get their own channel
Anything that parses as preserve, don't, keep, or only is extracted into a structured keep/avoid list and passed to the downstream model through a separate, higher-priority channel that no prose expansion is allowed to touch. This is the single highest-leverage change. It converts a fragile sentence into an explicit contract.
The Trade-offs, Honestly
What you give up
Thin prompts get worse. A first-time user who types "a cat" now gets exactly a cat — flat, literal, unremarkable — instead of the styled, cohesive image that made them say "whoa." Some of that magic was real, and removing it costs you first-session delight and probably some activation.
You export prompt craft to the user. For a while, the burden of specificity lands on people who don't know the vocabulary. Support volume goes up. Onboarding copy has to teach a skill.
You lose a convenient lever. The rewriter was a place to inject style consistency, brand voice, and house aesthetics. Those now need to live in templates, presets, or explicit channels — more plumbing, less one-line tinkering.
What you get back
Predictability. The same prompt produces the same intent, session to session, model version to model version.
Debuggability. "What did we ask for?" is now a SELECT statement instead of a guess.
Cheaper model migrations. When the executed prompt is stable, a model upgrade is a controlled experiment. When the executed prompt is a function of the rewriter's mood, every migration is a coupled, unmeterable change and every regression looks like a model regression.
Trust with the users who spend money. The people who write "keep the rug" are the people with a workflow, a client, a deadline, and a reason to pay. Losing their rug is not an aesthetic complaint. It's a breach.
The hybrid that actually works
Enhancement as an opt-in with a visible diff. Hard constraints in a protected channel. Expansion allowed to add atmosphere and forbidden from removing or reinterpreting a single preservation clause. Reward the user for specificity instead of silently papering over its absence.
Who Benefits and Who Pays
Beneficiaries: professional and repeat users — anyone whose prompt contains an implicit "and don't break this." Support and trust teams, who stop fielding unfalsifiable "it changed my thing" tickets. Enterprise buyers and auditors, who need a reproducible record of what was submitted. Platform teams, who get a decoupled upgrade path. And, quietly, the rewriter itself: an enhancement feature with an accept/reject rate is measurable, whereas a hidden stage only gets blamed.
Who pays: growth loops optimized on first-render wow. Demo videos. The internal team whose metric was "expansion improved mean aesthetic score," because that metric is about to go flat and someone will ask why. And any product whose differentiation was the prompt magic rather than the outcome — because prompt magic is the easiest part of this stack to copy.
Risks Worth Naming
Under-specification becomes the user's problem. Integrity without assistance is just indifference. If you remove the rewriter and don't build the constraint channel and the visible enhance, you've traded a silent failure for a loud one.
You lose a safety chokepoint. The rewriting stage was often where policy filtering, PII scrubbing, and injection defense lived. Pass-through doesn't remove the need for those — it removes their hiding place. Put them in front of the model explicitly, and log the decision.
Integrity is not correctness. A faithful pipeline into a model that can't render hands is still a pipeline that renders bad hands. Integrity buys you attribution, not quality. Don't let it become an excuse to stop improving the model.
The prompt surface becomes more directly attackable. When the executed prompt is the user's prompt, injection and adversarial phrasing reach the model unfiltered by paraphrase. That is a real cost, and it has to be paid with detection, not with silent rewriting.
Text-level integrity cannot enforce visual constraints. "Keep the rug" is a text instruction about pixels. A faithful prompt is still just a hope until something verifies the rug survived. Integrity is the precondition for verification, not a substitute for it.
The Takeaway
The rug didn't disappear because the model was weak. It disappeared because we inserted an optimist between the user and the model — an optimist trained to make things prettier, with no concept of a promise. Prompt rewriting is a bet that the user's words are a rough draft of their intent. Sometimes they are. When they aren't, they are a specification, and editing someone's specification without telling them is not enhancement. It's a silent breach, and the bill arrives as churn from exactly the users you wanted most.
Sources
- Primary source: "Prompt Integrity: We Stopped Letting the LLM Rewrite Your Prompts — Here's What Broke", dev.to (goodesign).
- Background concepts referenced: Goodhart's Law (Charles Goodhart, 1975) as applied to aesthetic-preference proxy metrics; the general treatment of preservation and negation constraints in prompt-expansion and text-to-image pipelines. These are cited as established ideas rather than as specific claims from the source article; the failure taxonomy, trade-off analysis, and recommended architecture above are original analysis.



