내용으로 건너뛰기

Using SessionId with Bedrock knowledgebase

0

Hi All,

To carry on with the context of the conversation, I am using the sessionID returned in the response of first retrieve_and_generate call and sending the further questions alongwith this sessionID. But whenever I ask to 'further elaborate on the previous answer', it always responds to the first question I have asked instead of responding to the current question which I had asked. Eg, Q1 - Who is a CS? A1 - CS stands for company secretary Q2 - How to become a CS? A2 - To become a CS, we have to do abc things. Q3 - Can you further elaborate on the previous answer A3 - CS stands for company secretary who are appointed by institute of company secretary of India.

In Q3, it has responded to Q1 instead of elaborating on Q2. What am I doing wrong?

1개 답변
2

Hi,

I'd suggest to start by tracing your activity with Bedrock KB in the way it is described in my article: https://repost.aws/articles/AR-LV1HoR_S0m-qy89wXwHmw/the-leverage-of-llm-system-prompt-by-knowledge-bases-for-bedrock-in-rag-workflows

This way you will if the Message API for invocation contains the history of previous prompts in the discussion or not: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages.html (I supposed that you use Anthropic's Claude messages)

Best,

Didier

전문가

답변함 2년 전

전문가

검토됨 2년 전

  • Ok, what I have understood looking at invocation logs is that - If you ask "Please elaborate on above answer", the system will look into the chat history and pickup a question randomly from the past questions IF it is doesn't have any more information to elaborate on the previous answer. This is a very very weird behaviour where in, it should have responded that there is nothing more to elaborate.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠