GroundingMetadata interface

Metadata returned when grounding is enabled.

Currently, only Grounding with Google Search is supported (see GoogleSearchTool).

Signature:

export interface GroundingMetadata 

Properties

Property Type Description
groundingChunks GroundingChunk[] A list of GroundingChunk objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response.
groundingSupports GroundingSupport[] A list of GroundingSupport objects. Each object details how specific segments of the model's response are supported by the groundingChunks.
retrievalQueries string[]
searchEntryPoint SearchEntrypoint Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response".
webSearchQueries string[] A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves.

GroundingMetadata.groundingChunks

A list of GroundingChunk objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response.

Signature:

groundingChunks?: GroundingChunk[];

GroundingMetadata.groundingSupports

A list of GroundingSupport objects. Each object details how specific segments of the model's response are supported by the groundingChunks.

Signature:

groundingSupports?: GroundingSupport[];

GroundingMetadata.retrievalQueries

Use GroundingSupport instead.

Signature:

retrievalQueries?: string[];

GroundingMetadata.searchEntryPoint

Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response".

Signature:

searchEntryPoint?: SearchEntrypoint;

GroundingMetadata.webSearchQueries

A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves.

Signature:

webSearchQueries?: string[];