Citations available for Vertex AI Search with structured data ? #4275
Replies: 2 comments
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: The ADK does support citation metadata for Vertex AI Search, but it is primarily designed for unstructured data. While there is some indication that it can work with structured data, it's possible that you are encountering a limitation or a configuration issue. Hello! Thanks for your question. The Application Development Kit (ADK) is designed to work with Vertex AI Search and provides citation metadata through the Based on the information available, the ADK's grounding capabilities are most robust with unstructured data, where it can extract chunks of text and their corresponding URIs to include in the
While I cannot confirm if this is a bug or a limitation without more details about your implementation, I would recommend reviewing the ADK's documentation on grounding with Vertex AI Search and ensuring your data and tool configuration align with the expected formats. If you continue to experience issues, providing a minimal reproducible example would be very helpful for further investigation. [1] https://google.github.io/adk-docs/grounding/vertex_ai_search_grounding/ |
Beta Was this translation helpful? Give feedback.
-
|
Hi, adding concrete details + a minimal repro snippet from my side. What I observe
This makes me suspect one of:
Minimal repro (ADK)import os
from google.adk.agents import LlmAgent
from google.adk.tools import VertexAiSearchTool
DATA_STORE_ID = "projects/PROJECT/locations/global/collections/default_collection/dataStores/STORE_ID"
agent = LlmAgent(
name="search_agent",
model="gemini-3-flash-preview",
instruction="Search the datastore and answer using the retrieved results.",
tools=[VertexAiSearchTool(data_store_id=DATA_STORE_ID)],
)
# Runner code depends on your ADK integration; the key check is:
# print(response.grounding_metadata) # <-- empty/missing for me on structured datastoreWhen the datastore is structured, I also see the API-side constraint: So this engine is effectively locked into Minimal repro (GenAI SDK)import os
from google import genai
client = genai.Client(vertexai=True)
# Pseudocode-ish: the key point is that the direct SDK call returns grounding/citation payload
# in the response object (whereas ADK's LlmResponse.grounding_metadata is empty for me).
#
# resp = client.models.generate_content(
# model="gemini-3-flash-preview",
# contents="...",
# tools=[ ... Vertex AI Search tool / retrieval config ... ],
# )
# print(resp.candidates[0].grounding_metadata or resp.candidates[0].groundingMetadata)Ask / clarificationCan you confirm whether
If structured/DOCUMENTS is not currently supported for citations, it’d be helpful to document that limitation (and recommended workarounds, like emitting doc ids/URIs explicitly in text). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is citation metadata (e.g., groundingMetadata) currently supported when grounding on a Vertex AI Search datastore backed by structured data?
In my testing, this metadata appears to be dropped, though it is present when using the GenAI SDK directly.
Beta Was this translation helpful? Give feedback.
All reactions