Google Cloud Ai Platform V1 Client - Class ANN (1.31.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class ANN.

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.

Generated from protobuf message google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANN

Namespace

Google \ Cloud \ AIPlatform \ V1 \ RagVectorDbConfig \ RagManagedDb

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ tree_depth int

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.

↳ leaf_count int

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.

getTreeDepth

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.

Returns
Type Description
int

setTreeDepth

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.

Parameter
Name Description
var int
Returns
Type Description
$this

getLeafCount

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.

Returns
Type Description
int

setLeafCount

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.

Parameter
Name Description
var int
Returns
Type Description
$this