You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amazon DynamoDB limits the size of each item in a table to 400 KB. It's feasible that this limit could be reached on the sessions table because of all the extra metadata stored in the item. Especially when running with RAG configured. The session table stores chat history in a single item attribute.
To work around this limitation, we can store chat history as individual items in the sessions table. I can submit a PR for this change if there is an interest in this issue.
The text was updated successfully, but these errors were encountered:
gbone-restore
changed the title
Enabling RAG makes it relatively easy to reach dynamodb item limits on sessions table.
Enabling RAG makes it relatively easy to reach 400KB limit for a dynamodb item on sessions table
Sep 27, 2024
Here's the data model that I used to test out this change.
The partition key is now users and the sort key is sessions. And there are two types of items to make selecting session history and dealing with chat history a little easier. I can submit a PR with a working example. The bulk of the changes are in lib/shared/layers/python-sdk/python/genai_core/langchain/chat_message_history.py and lib/shared/layers/python-sdk/python/genai_core/sessions.py.
Amazon DynamoDB limits the size of each item in a table to 400 KB. It's feasible that this limit could be reached on the sessions table because of all the extra metadata stored in the item. Especially when running with RAG configured. The session table stores chat history in a single item attribute.
To work around this limitation, we can store chat history as individual items in the sessions table. I can submit a PR for this change if there is an interest in this issue.
The text was updated successfully, but these errors were encountered: