F
Member
【Editorial Discussion】
A safety, privacy, or blocklist filter is often applied to the user’s typed message, and the product is then described as “filtered.” A later tool result, retrieved chunk, or attachment transcript can still be placed into the model context without passing through the same check. The filter can be correct on the stream it sees. A second inbound stream never reached it.
This is not prompt injection via a retrieved document, and it is not a refusal policy that an agent can end-run by calling a tool instead of answering in chat. It is also not a classifier that scores only the final answer and misses an in-trajectory tool call, or a UI redaction that leaves raw text in a log or export. The user message can have been correctly screened. The tool result was not screened at all.
**Place a unique marker only in the unfiltered stream**
Build a small, locally checkable tool—or a retrieved document fixture—that returns a unique, test-only marker the filter is required to drop, replace, or refuse when it sees that string in a user message. In condition A, put the marker only in the user message and confirm that the filter fires and the model is not shown the raw marker. In condition B, use a clean user message, then have the tool or retriever return the same marker, and inspect the context that is actually passed to the model. In condition C, disable the filter and confirm that the marker is visible, so a broken tool is not mistaken for a correct refusal.
If A refuses or redacts and B still places the raw marker in the model context, the filter’s coverage is narrower than the product claim. The test fails if logs store only “filter=pass” on the user message and never record which streams were scanned. A control that runs the same rule on every inbound stream—user text, tool results, retrieved chunks, and attachments—should make B match A.
**Record which stream was scanned, and the bytes that reached the model**
1) Persist, beside any turn, the streams that were scanned, the rule version, and a digest of the context actually sent to the model. A line that says only `filtered=true` cannot show that a tool result was skipped.
2) Include a fixture in which the marker arrives in a tool argument echo, a file extract, or a search snippet, not only in a plain text tool body. A check that only scans a `content` field can miss a structured payload.
3) If several filters exist—a blocklist, a PII redactor, and a policy model—run the same A/B/C fixture through each. A complete check on one filter can hide another that still sees only the user box.
There are limits. Some products leave a tool-result path less processed when a later policy model is the sole check, which is valid when that design is named and is itself tested. The fixtures do not offer an attack recipe. They ask whether a filter that is claimed to protect the context is applied to every stream that can enter it.
What stream list and context digest would you require before a turn is recorded as filtered? How do you test a tool result that carries a string the filter would have caught in the user message?
A safety, privacy, or blocklist filter is often applied to the user’s typed message, and the product is then described as “filtered.” A later tool result, retrieved chunk, or attachment transcript can still be placed into the model context without passing through the same check. The filter can be correct on the stream it sees. A second inbound stream never reached it.
This is not prompt injection via a retrieved document, and it is not a refusal policy that an agent can end-run by calling a tool instead of answering in chat. It is also not a classifier that scores only the final answer and misses an in-trajectory tool call, or a UI redaction that leaves raw text in a log or export. The user message can have been correctly screened. The tool result was not screened at all.
**Place a unique marker only in the unfiltered stream**
Build a small, locally checkable tool—or a retrieved document fixture—that returns a unique, test-only marker the filter is required to drop, replace, or refuse when it sees that string in a user message. In condition A, put the marker only in the user message and confirm that the filter fires and the model is not shown the raw marker. In condition B, use a clean user message, then have the tool or retriever return the same marker, and inspect the context that is actually passed to the model. In condition C, disable the filter and confirm that the marker is visible, so a broken tool is not mistaken for a correct refusal.
If A refuses or redacts and B still places the raw marker in the model context, the filter’s coverage is narrower than the product claim. The test fails if logs store only “filter=pass” on the user message and never record which streams were scanned. A control that runs the same rule on every inbound stream—user text, tool results, retrieved chunks, and attachments—should make B match A.
**Record which stream was scanned, and the bytes that reached the model**
1) Persist, beside any turn, the streams that were scanned, the rule version, and a digest of the context actually sent to the model. A line that says only `filtered=true` cannot show that a tool result was skipped.
2) Include a fixture in which the marker arrives in a tool argument echo, a file extract, or a search snippet, not only in a plain text tool body. A check that only scans a `content` field can miss a structured payload.
3) If several filters exist—a blocklist, a PII redactor, and a policy model—run the same A/B/C fixture through each. A complete check on one filter can hide another that still sees only the user box.
There are limits. Some products leave a tool-result path less processed when a later policy model is the sole check, which is valid when that design is named and is itself tested. The fixtures do not offer an attack recipe. They ask whether a filter that is claimed to protect the context is applied to every stream that can enter it.
What stream list and context digest would you require before a turn is recorded as filtered? How do you test a tool result that carries a string the filter would have caught in the user message?