Table of Contents

Class GroundingSupport

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Grounding support.

public record GroundingSupport : IEquatable<GroundingSupport>
Inheritance
GroundingSupport
Implements
Inherited Members

Properties

ConfidenceScores

Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.

[JsonPropertyName("confidenceScores")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<double>? ConfidenceScores { get; set; }

Property Value

List<double>

GroundingChunkIndices

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

[JsonPropertyName("groundingChunkIndices")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<int>? GroundingChunkIndices { get; set; }

Property Value

List<int>

RenderedParts

Indices into the rendered_parts field of the GroundingMetadata message. These indices specify which rendered parts are associated with this support message.

[JsonPropertyName("renderedParts")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<int>? RenderedParts { get; set; }

Property Value

List<int>

Segment

Segment of the content this support belongs to.

[JsonPropertyName("segment")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Segment? Segment { get; set; }

Property Value

Segment

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GroundingSupport object.

public static GroundingSupport? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GroundingSupport

The deserialized GroundingSupport object, or null if deserialization fails.