Class KnowledgeBaseVectorSearchConfiguration
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>
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
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) final RetrievalFilterfilter()Specifies the filters to use on the metadata in the knowledge base data sources before returning results.final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()Settings for implicit filtering.final IntegerThe number of source chunks to retrieve.final SearchTypeBy default, Amazon Bedrock decides a search strategy for you.final StringBy default, Amazon Bedrock decides a search strategy for you.Contains configurations for reranking the retrieved results.static Class<? extends KnowledgeBaseVectorSearchConfiguration.Builder>final StringtoString()Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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:
- Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
-
implicitFilterConfiguration
Settings for implicit filtering.
- Returns:
- Settings for implicit filtering.
-
numberOfResults
The number of source chunks to retrieve.
- Returns:
- The number of source chunks to retrieve.
-
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.If the service returns an enum value that is not available in the current SDK version,
overrideSearchTypewill returnSearchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoverrideSearchTypeAsString().- Returns:
- 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. - See Also:
-
overrideSearchTypeAsString
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.If the service returns an enum value that is not available in the current SDK version,
overrideSearchTypewill returnSearchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoverrideSearchTypeAsString().- Returns:
- 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. - See Also:
-
rerankingConfiguration
Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
- Returns:
- Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>
-
builder
-
serializableBuilderClass
public static Class<? extends KnowledgeBaseVectorSearchConfiguration.Builder> serializableBuilderClass() -
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-