-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding bedrock metadata filter and search type parameters #104
Adding bedrock metadata filter and search type parameters #104
Conversation
@3coins can you please have a look? I confirmed that this PR is working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravediamond
Thanks for making these changes. Added some suggestions to simplify the code and handle the nextToken.
@3coins Thank you for the review. I correct my PR as per your recommendations. What do you think ? |
Ok I corrected as per your reviews and I will create another PR for the nextToken when it is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravediamond
Made a small update to exclude None values from filter, this was failing the integration test.
Looks good now, thanks for making all the updates.
Description
This pull request enhances the functionality of the
AmazonKnowledgeBasesRetriever
class by adding optional parameters for the following features (already implemented in boto3):filter
parameter inVectorSearchConfig
to filter on metadata tags.overrideSearchType
inVectorSearchConfig
to override the default search type to be able to choose between 'Default', 'Hybrid' or 'Semantic'Here an example answer before the change:
And now after the change:
Change
SearchFilter
class to handle parameter filteringfilter
parameter inVectorSearchConfig
overrideSearchType
inVectorSearchConfig
Motivation
This will allow users to better use the full capacity of Bedrock Knowledge Base.
Additional Notes
nextToken
feature when with very long results has not been implemented.