aws-samples / bedrock-claude-chat

AWS-native chatbot using Bedrock + Claude (+Mistral)
MIT No Attribution
698 stars 240 forks source link

fix[240]: chat history language through prompt order #247

Closed kylelee24 closed 2 months ago

kylelee24 commented 2 months ago

Issue #, if available:

240

Description of changes: When using application in English, chat history shows as Spanish as described in issue #240.

Changing prompt rule ordering used to determine chat history title. Moved - Title must be in the same language as the conversation. to end.

Before fix: image

After fix: image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

statefb commented 2 months ago

@kylelee24 Thank you for your contribution! Do you have any statistical evidence to show that the prompt is better than previous one?

kylelee24 commented 2 months ago

@kylelee24 Thank you for your contribution! Do you have any statistical evidence to show that the prompt is better than previous one?

I only have the before/after fix screenshots I posted in the PR. You can see in the second screenshot the 3 same questions asked returned chat history titles in English. Testing seems to return consistent results.

statefb commented 2 months ago

Thank you. I'll merge this, but since there is not enough evidence, I would like to leave the issue #240 open.