Skip to content

Bedrock agent denying answering to a "compliance" question due to harmful fictional scenario

0

Hello!

I'm having issues my Bedrock agent responses, the idea of this agent is to handle between it's responsibilities compliance questions from finance institutions based on it's knowledge base, that is loaded if plenty law and policies documents from the country.

The problem is the following, if I ask the agent for a question or situation that clearly have a compliance risk, it refuses to answer due to a "harmful fictional scenario", while I was expecting it to answer why the question/situation violates policies or why it's a compliance risk.

Looking at the traces, the Agent indeed found the correct reason why it violates compliance policies, but it marks the input with category A and refuses to answer. Follow attached an image about the problem:

Sample error

1 Answer
2
Accepted Answer

Hi, You can handle this by doing a return control of the agent action and then handle the output you want to respond with via the InvokeAgent API. Please refer documentation here: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html

AWS
answered 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.