Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDbAnn

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

Config for ANN search. RagManagedDb uses a tree-based structure to partition data and facilitate faster searches. As a tradeoff, it requires longer indexing time and manual triggering of index rebuild via the ImportRagFiles and UpdateRagCorpus API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDbAnn

Returns a new instance of GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDbAnn.



24793
24794
24795
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24793

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#leaf_countFixnum

Number of leaf nodes in the tree-based structure. Each leaf node contains groups of closely related vectors along with their corresponding centroid. Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus). Default value is 500. Corresponds to the JSON property leafCount

Returns:

  • (Fixnum)


24784
24785
24786
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24784

def leaf_count
  @leaf_count
end

#tree_depthFixnum

The depth of the tree-based structure. Only depth values of 2 and 3 are supported. Recommended value is 2 if you have if you have O(10K) files in the RagCorpus and set this to 3 if more than that. Default value is 2. Corresponds to the JSON property treeDepth

Returns:

  • (Fixnum)


24791
24792
24793
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24791

def tree_depth
  @tree_depth
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24798
24799
24800
24801
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24798

def update!(**args)
  @leaf_count = args[:leaf_count] if args.key?(:leaf_count)
  @tree_depth = args[:tree_depth] if args.key?(:tree_depth)
end