Grounding metadata contains sources, citations, and search entry points used to ground a generated answer or suggestion.
| JSON representation |
|---|
{ "webSearchQueries": [ string ], "searchEntryPoint": { object ( |
| Fields | |
|---|---|
webSearchQueries[] |
Optional. The web search queries that were used to generate the content. |
searchEntryPoint |
Optional. A web search entry point that can be used to display search results. |
groundingChunks[] |
Optional. A list of supporting references retrieved from the grounding source. |
groundingSupports[] |
Optional. A list of grounding supports that connect the generated content to the grounding chunks. |
SearchEntryPoint
A web search entry point that can be used to display search results.
| JSON representation |
|---|
{ "renderedContent": string } |
| Fields | |
|---|---|
renderedContent |
Optional. An HTML snippet that can be embedded in a web page or an application's webview. This snippet displays a search result, including the title, URL, and a brief description of the search result. |
GroundingChunk
A piece of evidence that supports a claim made by the model.
This is used to show a citation for a claim made by the model. It contains a reference to the source of the information.
| JSON representation |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "web": { object ( |
| Fields | |
|---|---|
| The source of the grounding chunk. Currently we only support web search. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
web |
Optional. A grounding chunk from a web page, typically from web search. See the |
retrievedContext |
Optional. A grounding chunk from a data source retrieved by a data store tool. |
| End of mutually exclusive fields. | |
Web
A Web chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information.
| JSON representation |
|---|
{ "uri": string, "title": string, "domain": string } |
| Fields | |
|---|---|
uri |
Output only. The URI of the web page that contains the evidence. |
title |
Output only. The title of the web page that contains the evidence. |
domain |
Output only. The domain of the web page that contains the evidence. This can be used to filter out low-quality sources. |
RetrievedContext
Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset.
| JSON representation |
|---|
{ "uri": string, "title": string, "text": string } |
| Fields | |
|---|---|
uri |
Output only. The URI of the retrieved data source. |
title |
Output only. The title of the retrieved data source. |
text |
Output only. The content of the retrieved data source. |
GroundingSupport
A collection of supporting references for a segment or part of the model's response.
| JSON representation |
|---|
{
"segment": {
object ( |
| Fields | |
|---|---|
segment |
Optional. Segment of the content this support belongs to. |
groundingChunkIndices[] |
Optional. A list of indices into |
Segment
A segment of the content.
| JSON representation |
|---|
{ "startIndex": integer, "endIndex": integer, "text": string } |
| Fields | |
|---|---|
startIndex |
Output only. The start index of the segment, measured in bytes. This marks the beginning of the segment and is inclusive, meaning the byte at this index is the first byte of the segment. |
endIndex |
Output only. The end index of the segment, measured in bytes. This marks the end of the segment and is exclusive, meaning the segment includes content up to, but not including, the byte at this index. |
text |
Output only. The text of the segment. |