Amazon Bedrock Knowledge Base Evaluation Failing with "Unexpected Error"

0

Evaluating a Knowledge Base in Amazon Bedrock

Setup Details

I am trying to evaluate a Knowledge Base (KB) in Amazon Bedrock using the following configuration:

  • Model: anthropic.claude-3-5-sonnet-20240620-v1:0
  • Evaluator Model: meta.llama3-1-70b-instruct-v1:0
  • Dataset: Stored in an S3 bucket (.jsonl format)
  • Output Location: S3 bucket

Issue

When attempting to create the evaluation job via the AWS Console or boto3, the following error occurs:

🚨 "The system encountered an unexpected error during processing. Try your request again."

Troubleshooting Steps Taken

✅ Verified that the IAM role (Amazon-Bedrock-IAM-Role-emailinsightsevaluation) has the necessary permissions for Bedrock, S3, and evaluation jobs.
✅ Confirmed that the dataset exists and is correctly formatted as .jsonl.
✅ Ensured both models (Claude 3.5 for KB and Llama 3 as evaluator) are available in the us-east-1 region.
✅ Attempted to remove promptTemplate and modify numberOfResults.

Questions

  1. Does Amazon Bedrock support evaluating a Knowledge Base with an external evaluator model like meta.llama3-1-70b-instruct-v1:0?
  2. Are there additional IAM permissions required beyond bedrock:CreateEvaluationJob?
  3. Could there be a misconfiguration in my Knowledge Base setup that prevents evaluation?
  4. How can I access detailed logs or debugging information to identify the root cause of this error?
1 Answer
0

Based on the information provided, it appears you're encountering some challenges with evaluating a Knowledge Base in Amazon Bedrock. Let me address your questions and provide some insights:

  1. Amazon Bedrock does support evaluating Knowledge Bases, but there may be limitations on which models can be used as external evaluators. While Claude 3.5 is a supported model for Knowledge Bases, it's not clear if the Llama 3 model you're trying to use as an evaluator is fully supported for this purpose in Bedrock. You might want to consider using a model that's more commonly used with Bedrock, such as Claude 2 or another Amazon-provided model.

  2. The IAM permissions you've set up seem to be correct, but there might be additional permissions required depending on the specific operations being performed during the evaluation. Make sure your IAM role has permissions not just for creating the evaluation job, but also for accessing the S3 buckets (both input and output), and for invoking the models being used.

  3. A misconfiguration in your Knowledge Base setup could indeed be preventing the evaluation. Double-check that your Knowledge Base is properly set up and that all the data sources are accessible. Also, ensure that the format of your evaluation dataset in S3 matches exactly what Bedrock expects for Knowledge Base evaluations.

  4. To access more detailed logs or debugging information, you should check CloudWatch Logs associated with your Bedrock resources. If you haven't already, enable detailed logging for your Bedrock operations. You can also check the CloudTrail logs for a more comprehensive view of the API calls being made.

Given the "unexpected error" message you're receiving, it's possible that there's an internal issue with the Bedrock service or a compatibility problem with the models you're trying to use. If the problem persists after verifying all your configurations and permissions, it would be advisable to contact AWS Support for more in-depth troubleshooting.

In the meantime, you could try the following:

  • Use a different evaluator model that's known to work well with Bedrock Knowledge Base evaluations.
  • Simplify your evaluation job configuration to isolate the issue.
  • Verify that your S3 buckets (both input and output) are in the same region as your Bedrock resources.
  • Double-check the format of your JSONL file to ensure it strictly adheres to Bedrock's requirements.

If none of these steps resolve the issue, gathering as much information as possible from CloudWatch Logs and CloudTrail before contacting AWS Support will help in quickly identifying and resolving the root cause of the problem.
Sources
Amazon Bedrock Data Source syncing error | AWS re:Post
Troubleshooting model customization issues - Amazon Bedrock

profile picture
answered 3 months 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.

Guidelines for Answering Questions