Skip to content

Amazon Bedrock with Claude Sonnet 3.5 is not working the same as when I access Claude directly

0

I'm having issues using Amazon Bedrock with Claude Sonnet 3.5. I am trying to do the same thing with both of them, side by side, and the responses are different. For example, I provide a file with a very detailed prompt for which the answer is either yes or no, and Claude accessed directly gives the correct answer. Has anyone seen such discrepancies? What can explain them and how can I overcome this? Many thanks in advance.

3 Answers
1

The discrepancies you're experiencing between Claude 3.5 Sonnet accessed directly through Anthropic and through Amazon Bedrock could be due to a few factors:

  1. Model versions: It's possible that the version of Claude 3.5 Sonnet available on Bedrock may not be the exact same as the one you're accessing directly through Anthropic. There can be slight differences in model versions or fine-tuning between platforms.

  2. API differences: The way you interact with Claude through Bedrock's API might be slightly different from Anthropic's direct API. This could lead to variations in how the model processes your inputs.

  3. Prompt formatting: Ensure that you're formatting your prompts identically on both platforms. Even small differences in prompt structure or parameters could lead to different outputs.

  4. Token limits and context windows: Check if there are any differences in the maximum token limits or context windows between the two platforms, as this could affect the model's ability to process longer prompts or files.

  5. Cross-region inference: If you're using cross-region inference with Bedrock, this might introduce some variations in how the model processes your requests.

To overcome these issues:

  1. Double-check your API calls to ensure they're formatted correctly for Bedrock.
  2. Verify that you're using the latest available version of Claude 3.5 Sonnet on Bedrock.
  3. Try adjusting your prompts to be more explicit or structured to get consistent results.
  4. If possible, compare the raw API responses from both platforms to identify any differences in how the requests are being processed.
  5. Consider reaching out to AWS support for guidance, especially if you believe there might be an issue with the Bedrock implementation.

If the discrepancies persist and are significant, it may be worth reporting this to AWS support for further investigation.
Sources
Bedrock API with Cross Region Inference is not working | AWS re:Post
Intelligent document processing using Amazon Bedrock and Anthropic Claude | AWS Machine Learning Blog
Permission of AWS bedrock Claude 3.5 Sonnet on US East (N. Virginia) | AWS re:Post

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

1

When using Bedrock, check if you're using the same parameter settings (temperature, top_p, max_tokens, etc.) as your direct Claude implementation. Different settings can lead to different responses. Apart from that response length also matters.

AWS
EXPERT

answered 2 years ago

0

Thank you Srini! Where can I see those settings in Claude and in Bedrock? Can I change them? Many thanks!

answered 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.