PRODUCTION SCENARIO
A bank's assistant calls an Amazon Bedrock model through the InvokeModel API with the system instructions and the user's message concatenated into one prompt. The guardrail's prompt attack filter is set to High. A user message that tells the model to ignore all previous instructions still overrides the system prompt.
What should the team change?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Mark the user's message with guardrail input tags.
With the InvokeModel and InvokeModelWithResponseStream operations, input tags are what tell a guardrail which part of the prompt came from the user. Without them the filter cannot separate the developer's system prompt from a user message that imitates one, and prompt attacks are not filtered at all for those calls.