ADK Grounding and RAG

Retrieve, augment, generate — a query becomes a grounded answer with citations

ADK Grounding and RAG Retrieve, augment, generate — a query becomes a grounded answer with citations 01 / Query 02 / Retrieve 03 / Augment 04 / Generate 05 / Answer User Query · question · 01 / Query · input User Query question input Retrieval Tool · search_docs() · 02 / Retrieve · top-k Retrieval Tool search_docs() top-k Doc Store · embeddings · 02 / Retrieve · vectors Doc Store embeddings vectors Prompt Builder · query + passages · 03 / Augment · context Prompt Builder query + passages context Model · LLM · 04 / Generate · generate Model LLM generate Grounded Answer · with citations · 05 / Answer · sources Grounded Answer with citations sources question matched passages fetched docs augmented prompt response Legend primary data policy / PII async batch data store

Retrieve

  • • The query drives a retrieval tool, not a raw vector call
  • • Passages come from an embedded document store
  • • Only the top-k most relevant chunks are pulled

Augment + generate

  • • The prompt is rebuilt with query plus passages
  • • The model answers from supplied evidence, not memory
  • • Grounding metadata rides along with the response

Citations

  • • Grounding metadata maps claims back to sources
  • • The UI renders passages as inline citations
  • • Ungrounded output can be flagged or refused