KnowledgeBaseVectorSearchConfiguration¶
Structure Class¶
KnowledgeBaseVectorSearchConfiguration
dataclass
¶
Configurations for how to perform the search query and return results. For more information, see Query configurations.
This data type is used in the following API operations:
-
Retrieve request -- in the
vectorSearchConfigurationfield -
RetrieveAndGenerate request -- in the
vectorSearchConfigurationfield
Attributes¶
filter
class-attribute
instance-attribute
¶
filter: RetrievalFilter | None = field(repr=False, default=None)
Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
implicit_filter_configuration
class-attribute
instance-attribute
¶
implicit_filter_configuration: ImplicitFilterConfiguration | None = None
Settings for implicit filtering.
number_of_results
class-attribute
instance-attribute
¶
number_of_results: int = 5
The number of source chunks to retrieve.
override_search_type
class-attribute
instance-attribute
¶
override_search_type: SearchType | None = None
By default, Amazon Bedrock decides a search strategy for you. If you're
using an Amazon OpenSearch Serverless vector store that contains a
filterable text field, you can specify whether to query the knowledge
base with a HYBRID search using both vector embeddings and raw text,
or SEMANTIC search using only vector embeddings. For other vector
store configurations, only SEMANTIC search is available. For more
information, see Test a knowledge
base.
reranking_configuration
class-attribute
instance-attribute
¶
reranking_configuration: VectorSearchRerankingConfiguration | None = None
Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.