Class KnowledgeBaseVectorSearchConfiguration
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.KnowledgeBaseVectorSearchConfiguration
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>
@Generated("software.amazon.awssdk:codegen") public final class KnowledgeBaseVectorSearchConfiguration extends Object implements SdkPojo, Serializable, 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
vectorSearchConfiguration
field -
RetrieveAndGenerate request – in the
vectorSearchConfiguration
field
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KnowledgeBaseVectorSearchConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KnowledgeBaseVectorSearchConfiguration.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
RetrievalFilter
filter()
Specifies the filters to use on the metadata in the knowledge base data sources before returning results.<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
ImplicitFilterConfiguration
implicitFilterConfiguration()
Settings for implicit filtering.Integer
numberOfResults()
The number of source chunks to retrieve.SearchType
overrideSearchType()
By default, Amazon Bedrock decides a search strategy for you.String
overrideSearchTypeAsString()
By default, Amazon Bedrock decides a search strategy for you.VectorSearchRerankingConfiguration
rerankingConfiguration()
Contains configurations for reranking the retrieved results.Map<String,SdkField<?>>
sdkFieldNameToField()
List<SdkField<?>>
sdkFields()
static Class<? extends KnowledgeBaseVectorSearchConfiguration.Builder>
serializableBuilderClass()
KnowledgeBaseVectorSearchConfiguration.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
filter
public final RetrievalFilter 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
public final ImplicitFilterConfiguration implicitFilterConfiguration()
Settings for implicit filtering.
- Returns:
- Settings for implicit filtering.
-
numberOfResults
public final Integer numberOfResults()
The number of source chunks to retrieve.
- Returns:
- The number of source chunks to retrieve.
-
overrideSearchType
public final SearchType 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. For more information, see Test a knowledge base.If the service returns an enum value that is not available in the current SDK version,
overrideSearchType
will 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
HYBRID
search using both vector embeddings and raw text, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available. For more information, see Test a knowledge base. - See Also:
SearchType
-
overrideSearchTypeAsString
public final String 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
HYBRID
search using both vector embeddings and raw text, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search 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,
overrideSearchType
will 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
HYBRID
search using both vector embeddings and raw text, orSEMANTIC
search using only vector embeddings. For other vector store configurations, onlySEMANTIC
search is available. For more information, see Test a knowledge base. - See Also:
SearchType
-
rerankingConfiguration
public final VectorSearchRerankingConfiguration 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
public KnowledgeBaseVectorSearchConfiguration.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>
-
builder
public static KnowledgeBaseVectorSearchConfiguration.Builder builder()
-
serializableBuilderClass
public static Class<? extends KnowledgeBaseVectorSearchConfiguration.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String 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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
-