Class RagQuery.Ranking.Builder (3.84.0)

public static final class RagQuery.Ranking.Builder extends GeneratedMessage.Builder<RagQuery.Ranking.Builder> implements RagQuery.RankingOrBuilder

Configurations for hybrid search results ranking.

Protobuf type google.cloud.aiplatform.v1beta1.RagQuery.Ranking

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public RagQuery.Ranking build()
Returns
Type Description
RagQuery.Ranking

buildPartial()

public RagQuery.Ranking buildPartial()
Returns
Type Description
RagQuery.Ranking

clear()

public RagQuery.Ranking.Builder clear()
Returns
Type Description
RagQuery.Ranking.Builder
Overrides

clearAlpha()

public RagQuery.Ranking.Builder clearAlpha()

Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.

optional float alpha = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RagQuery.Ranking.Builder

This builder for chaining.

getAlpha()

public float getAlpha()

Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.

optional float alpha = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
float

The alpha.

getDefaultInstanceForType()

public RagQuery.Ranking getDefaultInstanceForType()
Returns
Type Description
RagQuery.Ranking

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

hasAlpha()

public boolean hasAlpha()

Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.

optional float alpha = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the alpha field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RagQuery.Ranking other)

public RagQuery.Ranking.Builder mergeFrom(RagQuery.Ranking other)
Parameter
Name Description
other RagQuery.Ranking
Returns
Type Description
RagQuery.Ranking.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RagQuery.Ranking.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RagQuery.Ranking.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RagQuery.Ranking.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RagQuery.Ranking.Builder
Overrides

setAlpha(float value)

public RagQuery.Ranking.Builder setAlpha(float value)

Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.

optional float alpha = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value float

The alpha to set.

Returns
Type Description
RagQuery.Ranking.Builder

This builder for chaining.