GroundingSupport

public final class GroundingSupport

Provides information about how a specific segment of the model's response is supported by the retrieved grounding chunks.

Summary

Public fields

final @NonNull List<@NonNull Integer>

A list of indices that refer to specific GroundingChunk classes within the GroundingMetadata.groundingChunks array.

final @NonNull Segment

Specifies the segment of the model's response content that this grounding support pertains to.

Public constructors

GroundingSupport(
    @NonNull Segment segment,
    @NonNull List<@NonNull Integer> groundingChunkIndices
)

Public fields

groundingChunkIndices

public final @NonNull List<@NonNull IntegergroundingChunkIndices

A list of indices that refer to specific GroundingChunk classes within the GroundingMetadata.groundingChunks array. These referenced chunks are the sources that support the claim made in the associated segment of the response. For example, an array [1, 3, 4] means that groundingChunks[1], groundingChunks[3], groundingChunks[4] are the retrieved content supporting this part of the response.

segment

public final @NonNull Segment segment

Specifies the segment of the model's response content that this grounding support pertains to.

Public constructors

GroundingSupport

public GroundingSupport(
    @NonNull Segment segment,
    @NonNull List<@NonNull Integer> groundingChunkIndices
)