Class: Google::Cloud::AIPlatform::V1::RagRetrievalConfig

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/tool.rb

Overview

Specifies the context retrieval config.

Defined Under Namespace

Classes: Filter, Ranking

Instance Attribute Summary collapse

Instance Attribute Details

#filter::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Filter

Returns Optional. Config for filters.

Returns:



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'proto_docs/google/cloud/aiplatform/v1/tool.rb', line 630

class RagRetrievalConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Config for filters.
  # @!attribute [rw] vector_distance_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector distance smaller than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_distance_threshold`, `vector_similarity_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] vector_similarity_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector similarity larger than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_similarity_threshold`, `vector_distance_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] metadata_filter
  #   @return [::String]
  #     Optional. String for metadata filtering.
  class Filter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Config for ranking and reranking.
  # @!attribute [rw] rank_service
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::RankService]
  #     Optional. Config for Rank Service.
  #
  #     Note: The following fields are mutually exclusive: `rank_service`, `llm_ranker`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] llm_ranker
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::LlmRanker]
  #     Optional. Config for LlmRanker.
  #
  #     Note: The following fields are mutually exclusive: `llm_ranker`, `rank_service`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class Ranking
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Config for Rank Service.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name of the rank service.
    #     Format: `semantic-ranker-512@latest`
    class RankService
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Config for LlmRanker.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name used for ranking.
    #     Format: `gemini-1.5-pro`
    class LlmRanker
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#ranking::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking

Returns Optional. Config for ranking and reranking.

Returns:



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'proto_docs/google/cloud/aiplatform/v1/tool.rb', line 630

class RagRetrievalConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Config for filters.
  # @!attribute [rw] vector_distance_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector distance smaller than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_distance_threshold`, `vector_similarity_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] vector_similarity_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector similarity larger than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_similarity_threshold`, `vector_distance_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] metadata_filter
  #   @return [::String]
  #     Optional. String for metadata filtering.
  class Filter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Config for ranking and reranking.
  # @!attribute [rw] rank_service
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::RankService]
  #     Optional. Config for Rank Service.
  #
  #     Note: The following fields are mutually exclusive: `rank_service`, `llm_ranker`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] llm_ranker
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::LlmRanker]
  #     Optional. Config for LlmRanker.
  #
  #     Note: The following fields are mutually exclusive: `llm_ranker`, `rank_service`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class Ranking
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Config for Rank Service.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name of the rank service.
    #     Format: `semantic-ranker-512@latest`
    class RankService
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Config for LlmRanker.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name used for ranking.
    #     Format: `gemini-1.5-pro`
    class LlmRanker
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#top_k::Integer

Returns Optional. The number of contexts to retrieve.

Returns:

  • (::Integer)

    Optional. The number of contexts to retrieve.



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'proto_docs/google/cloud/aiplatform/v1/tool.rb', line 630

class RagRetrievalConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Config for filters.
  # @!attribute [rw] vector_distance_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector distance smaller than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_distance_threshold`, `vector_similarity_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] vector_similarity_threshold
  #   @return [::Float]
  #     Optional. Only returns contexts with vector similarity larger than the
  #     threshold.
  #
  #     Note: The following fields are mutually exclusive: `vector_similarity_threshold`, `vector_distance_threshold`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] metadata_filter
  #   @return [::String]
  #     Optional. String for metadata filtering.
  class Filter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Config for ranking and reranking.
  # @!attribute [rw] rank_service
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::RankService]
  #     Optional. Config for Rank Service.
  #
  #     Note: The following fields are mutually exclusive: `rank_service`, `llm_ranker`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] llm_ranker
  #   @return [::Google::Cloud::AIPlatform::V1::RagRetrievalConfig::Ranking::LlmRanker]
  #     Optional. Config for LlmRanker.
  #
  #     Note: The following fields are mutually exclusive: `llm_ranker`, `rank_service`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class Ranking
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Config for Rank Service.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name of the rank service.
    #     Format: `semantic-ranker-512@latest`
    class RankService
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Config for LlmRanker.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     Optional. The model name used for ranking.
    #     Format: `gemini-1.5-pro`
    class LlmRanker
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end