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 in the knowledge base data sources before returning results.filter(RetrievalFilter filter) Specifies the filters to use on the metadata in the knowledge base data sources before returning results.implicitFilterConfiguration(Consumer<ImplicitFilterConfiguration.Builder> implicitFilterConfiguration) Settings for implicit filtering.implicitFilterConfiguration(ImplicitFilterConfiguration implicitFilterConfiguration) Settings for implicit filtering.numberOfResults(Integer numberOfResults) The number of source chunks to retrieve.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) Contains configurations for reranking the retrieved results.rerankingConfiguration(VectorSearchRerankingConfiguration rerankingConfiguration) Contains configurations for reranking the retrieved results.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
numberOfResults
The number of source chunks to retrieve.
- Parameters:
numberOfResults- The number of source chunks to retrieve.- 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
HYBRIDsearch using both vector embeddings and raw text, orSEMANTICsearch using only vector embeddings. For other vector store configurations, onlySEMANTICsearch is available. For more information, see Test a knowledge base.- 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 aHYBRIDsearch using both vector embeddings and raw text, orSEMANTICsearch using only vector embeddings. For other vector store configurations, onlySEMANTICsearch is available. For more information, see Test a knowledge base.- 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
HYBRIDsearch using both vector embeddings and raw text, orSEMANTICsearch using only vector embeddings. For other vector store configurations, onlySEMANTICsearch is available. For more information, see Test a knowledge base.- 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 aHYBRIDsearch using both vector embeddings and raw text, orSEMANTICsearch using only vector embeddings. For other vector store configurations, onlySEMANTICsearch is available. For more information, see Test a knowledge base.- 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 in the knowledge base data sources before returning results. For more information, see Query configurations.
- Parameters:
filter- Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.- 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 in the knowledge base data sources before returning results. For more information, see Query configurations.
This is a convenience method that creates an instance of theRetrievalFilter.Builderavoiding the need to create one manually viaRetrievalFilter.builder().When the
Consumercompletes,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:
-
rerankingConfiguration
KnowledgeBaseVectorSearchConfiguration.Builder rerankingConfiguration(VectorSearchRerankingConfiguration rerankingConfiguration) Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
- Parameters:
rerankingConfiguration- Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
rerankingConfiguration
default KnowledgeBaseVectorSearchConfiguration.Builder rerankingConfiguration(Consumer<VectorSearchRerankingConfiguration.Builder> rerankingConfiguration) Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
This is a convenience method that creates an instance of theVectorSearchRerankingConfiguration.Builderavoiding the need to create one manually viaVectorSearchRerankingConfiguration.builder().When the
Consumercompletes,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:
-
implicitFilterConfiguration
KnowledgeBaseVectorSearchConfiguration.Builder implicitFilterConfiguration(ImplicitFilterConfiguration implicitFilterConfiguration) Settings for implicit filtering.
- Parameters:
implicitFilterConfiguration- Settings for implicit filtering.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
implicitFilterConfiguration
default KnowledgeBaseVectorSearchConfiguration.Builder implicitFilterConfiguration(Consumer<ImplicitFilterConfiguration.Builder> implicitFilterConfiguration) Settings for implicit filtering.
This is a convenience method that creates an instance of theImplicitFilterConfiguration.Builderavoiding the need to create one manually viaImplicitFilterConfiguration.builder().When the
Consumercompletes,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:
-