Interface KnowledgeBaseVectorSearchConfiguration.Builder

All Superinterfaces:
Buildable, CopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>, SdkBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>, SdkPojo
Enclosing class:
KnowledgeBaseVectorSearchConfiguration

public static interface KnowledgeBaseVectorSearchConfiguration.Builder extends SdkPojo, CopyableBuilder<KnowledgeBaseVectorSearchConfiguration.Builder,KnowledgeBaseVectorSearchConfiguration>
  • 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.

      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

      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 the RetrievalFilter.Builder avoiding the need to create one manually via RetrievalFilter.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to filter(RetrievalFilter).

      Parameters:
      filter - a consumer that will call methods on RetrievalFilter.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • numberOfResults

      KnowledgeBaseVectorSearchConfiguration.Builder numberOfResults(Integer 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

      KnowledgeBaseVectorSearchConfiguration.Builder overrideSearchType(String 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, 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.

      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 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • overrideSearchType

      KnowledgeBaseVectorSearchConfiguration.Builder overrideSearchType(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, 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.

      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 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: