Issue #115

Treat Model Output as Untrusted Input to Your Own System

sent to 25 subscribers

Model output is not just something you read. In most AI features it becomes something your system *does*: it gets rendered into a page, interpolated into a query, written to a file, passed to a shell, or fed to the next tool in an agent loop. That makes it input to your own code, and input to your own code deserves the same suspicion as anything a stranger could send.

Teams are often careful about what goes *into* the model and relaxed about what comes *out*, because the output feels like it came from "our" component. But the model can reproduce attacker-supplied text from a document it retrieved, echo markup from a user's message, or simply produce something malformed on a bad day. Whether the cause is malice or noise, the failure lands in your downstream code.

A few habits that cost little:

None of this is exotic. It's the ordinary discipline of input handling, applied to a source that happens to feel friendly. The next time you review an AI feature, trace each place model text leaves the model and ask what would happen if that text were hostile. The answer usually points straight at the next fix.

← Back to archive