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
Name Description
data array

Optional. Data for populating the Message object.

↳ claim_text string

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

↳ support_chunk_indices array

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_score float

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
Type Description
string

setClaimText

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

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var int[]
Returns
Type Description
$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
Type Description
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
Name Description
var float
Returns
Type Description
$this