aws-samples / aws-samples/bedrock-chat

[BUG] "When using a chatbot with a dictionary set to large chunks (e.g., 4096), an error occurs after asking questions two or more times

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

Description

## Describe the bug

When using a chatbot with a dictionary set to large chunks (e.g., 4096) , an error occurs after asking questions two or more times.

## To Reproduce

Steps to reproduce the behavior:

1. Create Chatbot
large chunks (e.g., 4096) & Contextual Grounding threshold is set to 0
2. asking questions two or more
3. See error

## Screenshots
1. Chatbot Setting
![image](https://github.com/user-attachments/assets/7f413eee-5a14-4cd1-94e6-882687b87510)

3.
![image](https://github.com/user-attachments/assets/fc8d8b65-52a0-4265-bad0-6baae3fb704f)

## Additional context
・Confirmed conditions:
   Reproduced with hierarchical chunks
    Parent Chunksize=4096, Child Chunksize=256 - Error occurs mostly on second query
    Parent Chunksize=2048, Child Chunksize=256 - Error occurs mostly on third query
   Parent Chunksize=1500, Child Chunksize=300 - Error occurs after fourth query
   With fixed chunks
    Parent Chunksize=4096 Error occurs mostly on second query
    Parent Chunksize=2048  Error occurs mostly on third query

・Similar to #637, this error occurs even when the Harmful Categories threshold is set to 0

Contributor guide

Open the contributing guide

Research direction

Reproduce the chatbot failure using hierarchical and fixed chunks with the listed parent and child sizes, a Contextual Grounding threshold of 0, and repeated questions. Compare the behavior with issue #637, then trace the error from the second, third, or fourth query; done means repeated questions no longer produce the reported error under these settings.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.