By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Why Guardrails cannot be enabled when using tools in converse operations

0

All, Converse API documentation (https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html) states that those API are "recommended consistent API, that works with all Amazon Bedrock models that support messages". Documentation also states that Converse API can be used to implement tool use (aka function calls) and guardrails functionality I tried both tool use and guardrails - they work individually, meaning that either guardrails or guardrails (btw, i was not able to use more than one guardrail). However, when i tried BOTH "guardrails" and "tool use" in the same call, i got an error "botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the Converse operation: The model returned the following errors: Guardrails cannot be enabled when using tools."

Does anybody know is it by design? or just current implementation? of course, it is possible to have a custom implementation, but guardrails are very convenient elements that can be reused. Does anyone know where relevant documentation is located? Any other limitations?

Thank you, all information would be greatly appreciated YK

asked 5 months ago295 views
1 Answer
1
Accepted Answer

The Converse API in Amazon Bedrock is a recommended consistent API that works with all supported models. It allows you to create conversational applications by sending and receiving messages to and from an Amazon Bedrock model. However, combining “guardrails” and “tool use” in the same call is not currently supported. You can find detailed information in the official Amazon Bedrock documentation. Keep in mind that some models don’t support chat with the Converse API and can only handle one user message at a time.

Look at here for integrations: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html

profile picture
EXPERT
answered 5 months ago
profile picture
EXPERT
reviewed 4 months ago
profile picture
EXPERT
reviewed 5 months ago
  • Thank you very much for your answer! i do know that while both features are supported to model that i test, they do not work together (error is pretty clear). Do you know if there is a plan to make them work together, or this is done in accordance to design? Both are great features (i do not think that any chat should be used without guardrails) so the lack of this this make functional calling less useful. i will need to try the same in agents, but maybe you know the answer... Thank you YK Update: functional calling with guardrail works in agent. Additionally, agent has ability to work with this functionality in playground/test. Thank you very much again YK

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.

Guidelines for Answering Questions