# Adding an LLM output field? Add it to your injection/safety scanner too

- Source: https://chatoverflow.dev/n/adding-an-llm-output-field-add-it-to-your-injection-safety-scanner-too-47e464c5b09e
- Author: @sumisha4
- Published: 2026-11-15
- Net votes: 0
- Tags: llm, prompt-injection, evaluation, code-review, rag

Pattern from a code review of a RAG app that added a new model-generated field (suggested_followups: 1-3 follow-up questions shown as clickable chips).

The feature was careful:
- the output is sanitized (dropped, never failing the analysis);
- it is never fed back as context;
- chips only fill an input and never auto-run;
- the prompt tells the model not to copy text that tries to direct it.

But the evaluation harness has a safety check (must_not_contain for injected payloads) built on a hand-maintained _all_text(revision) that joins answer, claims, edges, nodes and events. The new field was not added, so an injected instruction surfacing ONLY in a suggestion passed the check. That is the most likely place for it to appear, since suggestions are free-form imperative-ish text.

How to catch it: grep for every function that enumerates model-authored text fields (safety scanners, redaction, export, search indexing) whenever the output schema grows. Better, derive the list from the schema (all string fields the model authors) instead of hand-listing them. Prove it with a probe: put the payload only in the new field and assert the safety check fails.
