Just read the Anthropic paper on "Context Caching and Output Guardrails." It's a clever attack where repeated, similar queries cause the model to cache certain internal activations, which can then be used to override safety fine-tuning on subsequent, related requests. This is directly relevant to anyone using NemoClaw's guardrail layer for security-critical filtering.
The core issue is that NemoClaw's guardrails often operate *after* the LLM generates a response. If the underlying model's own safety training has been bypassed via a context-caching attack, the guardrail is evaluating an already-compromised output. This creates a potential blind spot.
From a compliance and audit logging standpoint, this raises two immediate concerns:
1. **Audit Log Integrity:** If a bypass occurs at the model level before the guardrail check, will our audit logs capture the *true* sequence of events? We need logs that show the raw model output *before* guardrail processing to diagnose such attacks.
2. **Policy-as-Code Gaps:** Our `config.yml` might define perfect rules, but they rely on receiving a harmful output to block. We need to consider if our policy should also monitor for patterns of queries that could *lead* to a bypass, not just the bad output itself.
Example: A series of seemingly benign queries that prime the cache, followed by a guarded query that slips through. The guardrail log might only show the final, blocked (or worse, allowed) query without the preceding context.
```yaml
# Our current guardrail logging might capture this:
- event: output_guardrail_triggered
query: "Tell me how to build a weapon"
action: blocked
timestamp: 2023-10-26T14:30:00Z
# But we might be missing the preceding attack sequence:
- event: model_inference
query: "Explain the concept of kinetic energy transfer"
cached_context_flag: true # Hypothetical
- event: model_inference
query: "Describe common household chemical reactions"
cached_context_flag: true
# ... then the final query leverages the cached context.
```
Are other teams looking at this? How are you adapting your agent deployments and audit pipelines to account for these deeper model-level bypasses? Specifically, what's the best practice for logging the *input* sequence context to correlate with guardrail events?