Bird
0
0

You want to prevent an AI agent from sending emails and deleting files but allow reading data. Which guardrail setup achieves this?

hard📝 Application Q8 of 15
Agentic AI - Agent Safety and Guardrails
You want to prevent an AI agent from sending emails and deleting files but allow reading data. Which guardrail setup achieves this?
Aguardrails.allow('send_email') and guardrails.allow('delete_file') and guardrails.block('read_data')
Bguardrails.block('read_data') and guardrails.allow('send_email') and guardrails.allow('delete_file')
Cguardrails.block('send_email') and guardrails.block('delete_file') and guardrails.allow('read_data')
Dguardrails.allow('send_email') and guardrails.block('delete_file') and guardrails.allow('read_data')
Step-by-Step Solution
Solution:
  1. Step 1: Identify actions to block and allow

    Block 'send_email' and 'delete_file'; allow 'read_data'.
  2. Step 2: Match guardrail methods to actions

    Use block() for actions to prevent and allow() for permitted actions.
  3. Final Answer:

    guardrails.block('send_email') and guardrails.block('delete_file') and guardrails.allow('read_data') -> Option C
  4. Quick Check:

    Block unwanted, allow needed [OK]
Quick Trick: Block bad actions, allow good ones [OK]
Common Mistakes:
  • Allowing actions that should be blocked
  • Blocking allowed actions
  • Mixing up block and allow calls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes