All Questions
Guardrails And Safety hard

An analytics agent runs SQL through a database tool, and an output classifier scans its final responses for sensitive data. An injected instruction in a retrieved wiki page made the agent run UPDATE accounts SET plan='enterprise'. The final message was just "Done!", so the classifier flagged nothing. Where should the control live?

  1. A Tighten the output classifier to flag vague confirmations like 'Done!' after tool calls and force a regeneration with details.
  2. B Filter the user's chat messages for SQL keywords before they reach the model, since SQL injection starts with user text.
  3. C State in the system prompt that retrieved wiki content is data only and must never be treated as instructions to follow.
  4. D Give the tool a read-only database role and route writes through narrow, typed endpoints that check caller authorization.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions