How Can I Fetch Memory or Conversation History in Amazon Bedrock for My Chatbot?

0
0
Asked By CuriousCoder42 On

I'm working on a chatbot using Amazon Bedrock that responds to queries about our products based on our documentation. I'm using the Java SDK and the RetrieveAndGenerate functionality. I'm curious if there's a way to fetch conversation history using the session ID. I've looked through the documentation but couldn't find anything. Has anyone else tackled this issue?

3 Answers

Answered By TechSavvyJoe On

Hey! I was wondering about how accurate your chatbot is. Are you doing anything specific to check its accuracy for individual conversations?

Answered By DataNinja On

1. When you add data, make sure to include the metadata as the session ID and use that in your retrieval filters.
2. You might want to treat each session as a single chunk in your chunking strategy.
3. I suggest steering clear of the Bedrock agent; it doesn't offer much and operates mainly in a basic mode.

Answered By DocExpert On

You might want to create an agent and connect it to your knowledge base. Then switch your API call from RetrieveAndGenerate to InvokeInlineAgent. This way, you can work with the sessionId parameter directly. Don’t forget to enable memory in the Agent Builder, too!

ChatBotGuru88 -

Thanks for the tip! I’m a bit hesitant to use Bedrock’s agent since it doesn’t support the Claude Sonnet 4 model I want to use, but I’ll consider it for the earlier models.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.