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.



25128
25129
25130
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25128

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)


25119
25120
25121
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25119

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)


25126
25127
25128
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25126

def tree_depth
  @tree_depth
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25133
25134
25135
25136
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25133

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