Google Cloud Discovery Engine V1 Client - Class GroundingSupport (1.2.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class GroundingSupport.

Grounding info for a claim in the candidate and its support.

Generated from protobuf message google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ GenerateGroundedContentResponse \ Candidate \ GroundingMetadata

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ claim_textstring

Text for the claim in the candidate. Always provided when a support is found.

↳ support_chunk_indicesarray

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

↳ support_scorefloat

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated. Higher value means that the claim is better supported by the chunks.

getClaimText

Text for the claim in the candidate. Always provided when a support is found.

Returns
TypeDescription
string

setClaimText

Text for the claim in the candidate. Always provided when a support is found.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSupportChunkIndices

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSupportChunkIndices

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

Parameter
NameDescription
varint[]
Returns
TypeDescription
$this

getSupportScore

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated.

Higher value means that the claim is better supported by the chunks.

Returns
TypeDescription
float

hasSupportScore

clearSupportScore

setSupportScore

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated.

Higher value means that the claim is better supported by the chunks.

Parameter
NameDescription
varfloat
Returns
TypeDescription
$this