1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
To achieve what you want, you should rather use the Retrieve API of Bedrock rather than RetrieveAndGenerate, where you don't have control on the prompt.
So, Retrieve will allow you to get the RAG data like RetrieveAndGenerate would do but then you can use this data to invoke the LLM that you want the way you want. In particular to build the memory that you want (retrieved from a Redis cache for the session or the like), you can leverage the Messages API of Bedrock LLMs.
See https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages.html
Best,
Didier
Relevant content
- asked 2 months ago
- asked 3 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 5 months ago
So we might have to use our own code to create the memory based system? It's not built in within boto3's bedrock functions?
https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
in this they have used converse aPI. but I don't see retrieve function here at all. How to integrate "Retrieve" function with the Converse aPI?
Hi @Didier_Durand, can you please be more specific?
right now, this is the code i have
client = session.client('bedrock-agent-runtime')
can you add converse api to it?