- Newest
- Most votes
- Most comments
The Bedrock Invoke Agent API does support filtering, but it doesn't directly expose all OpenSearch filtering operators. The filtering operators you mentioned (IN, EQUALS, NOTEQUALS, etc.) are indeed available in the Bedrock API, and these are likely translated to appropriate OpenSearch queries internally. However, not all OpenSearch operators are directly exposed in the Bedrock API.
Regarding the RANGE operator specifically, while it's supported in OpenSearch, it's not directly available as a filtering operator in the Bedrock Invoke Agent API. Instead, the API provides GREATERTHAN, GREATERTHANEQUALS, LESSERTHAN, and LESSERTHANEQUALS, which can be used to achieve similar functionality to a range query.
As for directly using OpenSearch-supported operators in the Invoke Agent API, there isn't a straightforward way to do this. The API is designed to provide a abstracted interface that works across different knowledge base types, not just OpenSearch. This abstraction allows for consistency but may limit access to some database-specific features.
If you need more advanced filtering capabilities that are specific to OpenSearch, you might need to consider implementing these in a custom function that the agent can call, rather than relying solely on the built-in filtering capabilities of the Invoke Agent API.
It's worth noting that the available filtering options and capabilities may evolve over time as the Bedrock service is updated, so it's always a good idea to check the latest documentation for any new features or changes in this area.
Sources
Bedrock Agent with knowledgebase metadata search | AWS re:Post
Configure and customize queries and response generation - Amazon Bedrock
PatternObjectFilterConfiguration - Amazon Bedrock
Relevant content
asked a year ago
- AWS OFFICIALUpdated a year ago
