aws-samples / aws-samples/bedrock-chat

[BUG]Advanced document analysis does not allow chunk text to be retrieved correctly

Open
#810 2 comments 0 reactions 0 assignees View on GitHub
identified
Dominant language
TypeScript
Stars
1.3k
Forks
535
Avg merge
1d 12h
Merged PRs (30d)
10

Description

## 🚨 **Please Note** 🚨

To ensure efficient investigation of the issue, please fill out the fields below with as much detail as possible. **Reports that do not follow this template may be closed without notification.** We appreciate your cooperation.

## 🐞Describe the bug

When using advanced document parsing (sonet3.5), I cannot get chunked text correctly

## 🔄 To Reproduce

1. Prepare a knowledge base that uses advanced document analysis (sonet3.5)
2. Create a bot that links the knowledge base from 1.
3. Talk to the bot

## 📷 Screenshots
![Image](https://github.com/user-attachments/assets/19a30ae9-d05b-4953-b382-338878d4b11a)

## 🔎 Logs for Chat Issues

If the issue occurs during a chat interaction, please check the following logs on Amazon Cloudwatch Logs and include the relevant entries in your issue:

- `/aws/lambda/BedrockChatStack-BackendApiHandlerXXXX`
- `/aws/lambda/BedrockChatStack-WebSocketHandlerXXXX`

## 🔎 Logs for Bot Creation/Update Issues

If the issue occurs during bot creation or updating, please check the execution records of the AWS Step Functions state machine named `EmbeddingStateMachineXXX` and include the details in your issue.

## 📝 Additional context

When the content is IAMGE, the text seems to be stored in x-amz-bedrock-kb-description, but I think this is not being taken into consideration.

![Image](https://github.com/user-attachments/assets/3635e971-55c3-4276-ad28-ae064324c88d)

Could you please take the following into consideration?
![Image](https://github.com/user-attachments/assets/8cfc4edc-639b-4f78-a30c-a12489da5546)

Contributor guide

Open the contributing guide

Research direction

Start with the AWS CloudWatch logs for BedrockChatStack-BackendApiHandlerXXXX and BedrockChatStack-WebSocketHandlerXXXX, then inspect the EmbeddingStateMachineXXX execution records for a knowledge base using advanced document analysis. Compare the retrieved chunks with the text stored in x-amz-bedrock-kb-description for image content; done means chunk text is retrieved correctly in the bot conversation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, typescript
Domain
ai, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.