Interface KnowledgeBaseVectorSearchConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,
,KnowledgeBaseVectorSearchConfiguration> SdkBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,
,KnowledgeBaseVectorSearchConfiguration> SdkPojo
- Enclosing class:
KnowledgeBaseVectorSearchConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionfilter
(Consumer<RetrievalFilter.Builder> filter) Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.filter
(RetrievalFilter filter) Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.implicitFilterConfiguration
(Consumer<ImplicitFilterConfiguration.Builder> implicitFilterConfiguration) Configuration for implicit filtering in Knowledge Base vector searches.implicitFilterConfiguration
(ImplicitFilterConfiguration implicitFilterConfiguration) Configuration for implicit filtering in Knowledge Base vector searches.numberOfResults
(Integer numberOfResults) The number of text chunks to retrieve; the number of results to return.overrideSearchType
(String overrideSearchType) By default, Amazon Bedrock decides a search strategy for you.overrideSearchType
(SearchType overrideSearchType) By default, Amazon Bedrock decides a search strategy for you.rerankingConfiguration
(Consumer<VectorSearchRerankingConfiguration.Builder> rerankingConfiguration) Configuration for reranking search results in Knowledge Base vector searches.rerankingConfiguration
(VectorSearchRerankingConfiguration rerankingConfiguration) Configuration for reranking search results in Knowledge Base vector searches.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
numberOfResults
The number of text chunks to retrieve; the number of results to return.
- Parameters:
numberOfResults
- The number of text chunks to retrieve; the number of results to return.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideSearchType
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, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available.- Parameters:
overrideSearchType
- 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 aHYBRID
search using both vector embeddings and raw text, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideSearchType
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, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available.- Parameters:
overrideSearchType
- 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 aHYBRID
search using both vector embeddings and raw text, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
filter
Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.
- Parameters:
filter
- Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
filter
default KnowledgeBaseVectorSearchConfiguration.Builder filter(Consumer<RetrievalFilter.Builder> filter) Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.
This is a convenience method that creates an instance of theRetrievalFilter.Builder
avoiding the need to create one manually viaRetrievalFilter.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tofilter(RetrievalFilter)
.- Parameters:
filter
- a consumer that will call methods onRetrievalFilter.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
implicitFilterConfiguration
KnowledgeBaseVectorSearchConfiguration.Builder implicitFilterConfiguration(ImplicitFilterConfiguration implicitFilterConfiguration) Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions.
- Parameters:
implicitFilterConfiguration
- Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
implicitFilterConfiguration
default KnowledgeBaseVectorSearchConfiguration.Builder implicitFilterConfiguration(Consumer<ImplicitFilterConfiguration.Builder> implicitFilterConfiguration) Configuration for implicit filtering in Knowledge Base vector searches. This allows the system to automatically apply filters based on the query context without requiring explicit filter expressions.
This is a convenience method that creates an instance of theImplicitFilterConfiguration.Builder
avoiding the need to create one manually viaImplicitFilterConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toimplicitFilterConfiguration(ImplicitFilterConfiguration)
.- Parameters:
implicitFilterConfiguration
- a consumer that will call methods onImplicitFilterConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
rerankingConfiguration
KnowledgeBaseVectorSearchConfiguration.Builder rerankingConfiguration(VectorSearchRerankingConfiguration rerankingConfiguration) Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models.
- Parameters:
rerankingConfiguration
- Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
rerankingConfiguration
default KnowledgeBaseVectorSearchConfiguration.Builder rerankingConfiguration(Consumer<VectorSearchRerankingConfiguration.Builder> rerankingConfiguration) Configuration for reranking search results in Knowledge Base vector searches. Reranking improves search relevance by reordering initial vector search results using more sophisticated relevance models.
This is a convenience method that creates an instance of theVectorSearchRerankingConfiguration.Builder
avoiding the need to create one manually viaVectorSearchRerankingConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed torerankingConfiguration(VectorSearchRerankingConfiguration)
.- Parameters:
rerankingConfiguration
- a consumer that will call methods onVectorSearchRerankingConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-