GroundingChunkRetrievedContext

@Serializable
data class GroundingChunkRetrievedContext(val documentName: String? = null, val ragChunk: RagChunk? = null, val text: String? = null, val title: String? = null, val uri: String? = null, val customMetadata: List<GroundingChunkCustomMetadata>? = null, val fileSearchStore: String? = null, val pageNumber: Int? = null, val mediaId: String? = null)

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.

Constructors

Link copied to clipboard
constructor(documentName: String? = null, ragChunk: RagChunk? = null, text: String? = null, title: String? = null, uri: String? = null, customMetadata: List<GroundingChunkCustomMetadata>? = null, fileSearchStore: String? = null, pageNumber: Int? = null, mediaId: String? = null)

Properties

Link copied to clipboard

Optional. User-provided metadata about the retrieved context. This field is not supported in Vertex AI.

Link copied to clipboard
val documentName: String? = null

Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}. This field is not supported in Gemini API.

Link copied to clipboard
val fileSearchStore: String? = null

Optional. Name of the FileSearchStore containing the document. Example: fileSearchStores/123. This field is not supported in Vertex AI.

Link copied to clipboard
val mediaId: String? = null

Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}. This field is not supported in Vertex AI.

Link copied to clipboard
val pageNumber: Int? = null

Optional. Page number of the retrieved context, if applicable. This field is not supported in Vertex AI.

Link copied to clipboard
val ragChunk: RagChunk? = null

Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used. This field is not supported in Gemini API.

Link copied to clipboard
val text: String? = null

The content of the retrieved data source.

Link copied to clipboard
val title: String? = null

The title of the retrieved data source.

Link copied to clipboard
val uri: String? = null

The URI of the retrieved data source.