Pixel Myth
← Field notes
Architecture

Prompt debt: the code nobody dares to touch

Architecture field note

Nine hundred lines of instructions, grown by patches, with rules that contradict each other. It's a recognizable pattern now.

A client's system prompt instruction had grown to nine hundred lines of text. Each production incident added a new sentence to prevent recurrence. Nobody ever removed a sentence from it.

The instruction set behaved worse than the version from exactly one year ago despite the underlying model family improving dramatically across multiple generations. The rules contradicted each other in places and created confusion.

We could not safely prune it without breaking things. Without an evaluation set tied to specific test cases, nobody knew which rule prevented which bad behavior. Removing one sentence might break three production cases.

The only realistic path was rebuilding from scratch completely. We extracted test cases from actual production query logs, wrote clear rules against those test cases, and stopped when all tests passed.

The final prompt came out at one hundred eighty lines with a better evaluation score than the nine hundred line version. The rules were coherent because we built them against requirements.

Prompt debt accumulates the same way code debt does over time. The remedy is the same: refactor against a comprehensive test suite.