All Questions
Guardrails And Safety easy

An agent answers questions about a user's own orders by generating and running SQL. Which database credential setup best limits damage if a prompt injection succeeds?

  1. A A read-only role limited to the orders data for the current user, enforced in the database.
  2. B An admin role, with a strict system prompt forbidding DELETE, UPDATE, or DROP statements.
  3. C A read-write role, with an output filter that blocks responses containing raw SQL text.
  4. D A read-only role on all tables, since reads alone cannot cause harm to the business.

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

Get the app

Related questions