Skip to lesson

Google CloudProfessional Agentic Architect2026-090 Prerequisites

Connect embeddings, retrieval, grounding, and RAG

Completed by the knowledge check

Learning objective

Explain embeddings, vector retrieval, grounding, and the purpose of retrieval-augmented generation (RAG). This prerequisite lesson establishes the terms; later lessons design and tune the full retrieval pipeline.

Core idea

Think of RAG as an evidence path:

content -> embedding -> vector index -> retrieved content -> model context -> answer

An embedding helps the system compare meaning. Vector retrieval uses those comparisons to find candidate content. Grounding connects generated claims to supplied evidence. RAG combines retrieval and generation so a model can answer with request-time knowledge without storing that knowledge in its parameters.

No stage guarantees the next one. A close vector does not guarantee a relevant passage, a relevant passage does not guarantee a grounded answer, and a grounded answer is not necessarily complete.

How it works

An embedding model maps an input, such as a passage or query, to a vector of numbers. Inputs with related meaning should occupy nearby regions of the vector space. Google Cloud defines text embeddings as numerical vector representations that capture semantic relationships and lists semantic search, classification, and clustering among their uses in Text embeddings.

To prepare a corpus, the system divides source content into useful chunks, generates an embedding for each chunk, and stores the vectors with the original text and metadata. At request time, it embeds the query in a compatible space and searches for nearby vectors. A similarity function produces a score or ordering. The vector is a search representation; the original chunk remains the evidence.

Vector retrieval is usually approximate at large scale. It trades some exactness for lower latency and higher throughput. It can also be combined with keyword signals and metadata filters. Vertex AI Vector Search supports searching embeddings at scale, while the broader Vertex AI search and RAG APIs separate parsing, embeddings, retrieval, ranking, grounded generation, and grounding checks.

After retrieval, the application adds selected chunk text, source information, and instructions to the model request. This is the “augmentation” in RAG. The model then generates an answer from the request and evidence. Good instructions tell it to use the supplied sources, cite them, and abstain when support is insufficient.

Grounding is the relationship between the response and evidence. A grounding check can compare claims with reference text and return support information and citations; Google Cloud documents this separately in Check grounding with RAG. Grounding reduces unsupported generation but does not prove that the source is authoritative, current, or applicable. Those properties depend on ingestion, metadata, access controls, and source governance.

Key distinctions and trade-offs

Embedding versus chunk: An embedding is a numerical representation used for comparison. A chunk contains the words, structure, and metadata that can support an answer.

Vector search versus lexical search: Vector search can match semantic similarity even when words differ. Lexical search can be stronger for exact names, identifiers, and rare terms. Hybrid retrieval combines both when the workload needs them.

Retrieval versus reranking: Retrieval efficiently selects candidates from a large corpus. Reranking spends more computation to reorder a smaller candidate set using a richer relevance judgment.

RAG versus tuning: RAG supplies information in request-time context. Tuning uses training examples to change model behavior. Use RAG for private, changing, or attributable knowledge; use tuning for learned task behavior or style.

More retrieved chunks may improve recall, but they consume context and can add irrelevant or conflicting evidence. Fewer chunks improve focus and cost, but can omit the passage that answers the question. Measure this trade-off on representative queries.

Architecture / decision scenario

An engineering assistant answers questions about internal services. A developer asks, “How does the Atlas deployment roll back?” The corpus contains runbooks, design notes, and old incident reports.

The system embeds the query, retrieves semantically related chunks, and filters them to the developer’s access group and the current Atlas documentation version. A reranker places the rollback runbook above an incident report that merely mentions rollback. The model receives the runbook text and source URL, then answers with a citation.

If no current authorized chunk supports the answer, the assistant abstains. A high similarity score to an outdated incident report is not enough because similarity measures relatedness, not authority or freshness.

Common exam traps

  • Treating an embedding as compressed source text that the model can quote.
  • Assuming the nearest vector is correct, current, authorized, or authoritative.
  • Calling retrieval itself grounding. The generated claims must use and remain supported by the evidence.
  • Assuming RAG changes model parameters.
  • Retrieving more chunks without accounting for context limits, distraction, latency, and cost.
  • Using vector search for exact identifiers without considering lexical or hybrid retrieval.

What to remember

  • Embeddings represent meaning for comparison; chunks carry evidence.
  • Vector retrieval finds candidates and does not generate an answer.
  • RAG adds retrieved knowledge to the request-time model context.
  • Grounding concerns support between claims and evidence.
  • Evaluate relevance together with authority, freshness, permissions, latency, and context use.

Knowledge check

References