Interface KnowledgeBaseVectorSearchConfiguration.Builder

    • Method Detail

      • numberOfResults

        KnowledgeBaseVectorSearchConfiguration.Builder numberOfResults​(Integer numberOfResults)

        The number of results to return.

        The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in this field if you are sending a RetrieveAndGenerate request.

        Parameters:
        numberOfResults - The number of results to return.

        The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in this field if you are sending a RetrieveAndGenerate request.

        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:
        SearchType, SearchType
      • 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:
        SearchType, SearchType