Architecture & Patterns: Security + Guardrails¶
Production Patterns¶
Architecture View¶
graph LR
A[User input] --> B[Input policy check]
B --> C[Model response]
C --> D[Output redaction]
D --> E[Tool allowlist]
E --> F[Safe execution]
Common Failure Modes¶
Common Failure Modes¶
- Relying on prompt instructions without runtime checks.
- Logging raw sensitive outputs before redaction.
- Broad tool permissions with no path or command scope.
Interview Q&A¶
Q: Interview Q: Why is defense-in-depth necessary for agent systems?
Any single guardrail can fail under adversarial input. Layered controls reduce risk and provide fallback containment.
Q: Interview Q: How do you evaluate guardrail quality over time?
Track blocked and allowed outcomes against labeled test sets, then monitor false positives and false negatives per policy version.