aws-solutions / qnabot-on-aws

AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
https://aws.amazon.com/solutions/implementations/aws-qnabot
Apache License 2.0
401 stars 253 forks source link

Metadata filter using an attribute from bot user #780

Closed preethy-1 closed 1 week ago

preethy-1 commented 3 weeks ago

Hi @abhirpat,

How can I make use of the domain data passed from the parent web application to chatbot to apply metadata filtering in Amazon Bedrock Knowledge base for RAG. For eg: if domain data is "banking", then filter should only pickup document sources having metadata attribute domain as "banking"

abhirpat commented 3 weeks ago

Hi @preethy-1, the QnABot allows customize metadata and filters for RAG using Amazon Bedrock Knowledge through setting KNOWLEDGE_BASE_METADATA_FILTER in the content designer. This and additional customizations are available from v6.1.0 (please see CHANGELOG).

To learn in detail about how this functionality works, you may find this overview and example helpful https://aws.amazon.com/blogs/machine-learning/amazon-bedrock-knowledge-bases-now-supports-metadata-filtering-to-improve-retrieval-accuracy/.

fhoueto-amz commented 1 week ago

closing this