Skip to content

Separating knowledge in RAG solutions

1

I have a solution where I am using Lex, Bedrock, Bedrock knowledge bases, S3, and OpenSearch for RAG.

When I upload documents to my knowledge base, the S3 bucket, Bedrock knowledge bases pulls it and ingest it into the OpenSearch service.

I have multiple applications that can be integrated with the Lex chatbot and I have a requirement for separating knowledge for each application.

I am thinking of using different intents for different applications but I am not sure how can I use different knowledge set with different intents. I do not use to add another knowledge base for each application. Is there a solution to separate knowledge for each application while using a single knowledge base ?

1 Answer
0

Yes, there is a solution to separate knowledge for each application while using a single knowledge base in your RAG setup with Amazon Bedrock. Instead of creating multiple knowledge bases, you can leverage metadata or tags to differentiate between documents belonging to different applications.

When uploading documents to your S3 bucket, you can include application identifiers as object metadata or tags. This approach allows you to use a single knowledge base for all applications while still maintaining separation.

When querying the knowledge base using the Retrieve or RetrieveAndGenerate API, you can then filter the results based on these metadata or tags to retrieve documents specific to a particular application. This filtering capability is supported in the API calls, allowing you to retrieve only the relevant information for each application.

For example, when uploading documents to S3, you could add metadata or tags that identify which application each document belongs to. Then, when using Lex with different intents for different applications, you can include filters in your API calls to the knowledge base based on these metadata or tags. This way, each intent will only retrieve and use the documents relevant to its specific application.

This approach allows you to maintain the simplicity and cost-efficiency of using a single knowledge base while still providing the necessary separation of knowledge for your multiple applications. It offers a good balance between isolation of application-specific information and the management simplicity of a unified knowledge base.
Sources
Amazon Bedrock Knowledge Base -Limit of 50 Knowledge Base | AWS re:Post
Knowledge bases for Amazon Bedrock - AWS Prescriptive Guidance

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.