GroundingSupport

public final classGroundingSupport


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

Summary

Public fields

final @NonNullList<@NonNullInteger>

A list of indices that refer to specificGroundingChunk classes within theGroundingMetadata.groundingChunks array.

final @NonNullSegment

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

Public constructors

GroundingSupport(
    @NonNullSegment segment,
    @NonNullList<@NonNullInteger> groundingChunkIndices
)

Public fields

groundingChunkIndices

public final @NonNullList<@NonNullIntegergroundingChunkIndices

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

segment

public final @NonNullSegment segment

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

Public constructors

GroundingSupport

public GroundingSupport(
    @NonNullSegment segment,
    @NonNullList<@NonNullInteger> groundingChunkIndices
)

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.