A regulated multi-agent assistant must block toxic user inputs, prevent disallowed tool calls, sanitize untrusted tool responses, and filter unsafe final answers. A single output filter has been bypassed by malicious tool-return content influencing the model. What guardrail strategy should you implement?
Select an answer to reveal the explanation.
Short Explanation
Use multi-intervention guardrails at user input, tool-call authorization, tool-response ingestion, and final output. If you don't guard tool returns or later turns, attacks slip through. Layer the checks in orchestration middleware.
Full Explanation
Correct strategy: Use multi-intervention guardrails that inspect and enforce policy at user input, tool-call authorization, tool-response ingestion, and final output stages. Guardrails must cover user inputs, tool calls, tool responses, and outputs because attacks move between stages. Single-stage output filters miss tool-mediated attacks; validating each stage closes those gaps. Design layered interventions in orchestration middleware for regulated systems.
Why final-output-only guarding with trusted tool responses is wrong: Tool responses can carry indirect prompt injection and must not be fully trusted.
Why removing guardrails for latency is wrong: Regulated workloads need stronger, not weaker, controls.
Why first-message-only guardrails are wrong: Threats appear throughout the session, not only on the first message.
Exam tip: Four stages—input, tool call, tool response, output—all guarded.