RAG

Retrieval-Augmented Generation

Definition

Retrieval-Augmented Generation combines a language model with search: before answering, relevant passages are retrieved from a knowledge base and added to the prompt.

What for?

The model answers based on current and company-specific documents, can cite sources and hallucinates less – without retraining.

Technical architecture

flowchart LR
  subgraph Ingestion
    D[Documents] --> CH[Chunking] --> EM[Embedding model] --> VDB[(Vector index)]
  end
  Q[User question] --> QE[Embedding] --> VDB
  VDB -->|top-k chunks| P[Prompt with context]
  Q --> P
  P --> LLM[LLM] --> A[Answer with sources]

Core components

Ingestion
Documents are split into chunks and stored as embeddings.
Retriever
Finds the passages most similar to a question, often with vector and keyword search.
Prompt assembly
Combines the question and the retrieved passages into one prompt.
Generator
The LLM writes the answer and refers to the sources used.

Practical examples

  • An assistant answers questions about operations manuals with page references.
  • A support bot uses the current product documentation.

Enterprise use cases

  • Internal knowledge search
  • Compliance and policy questions
  • Customer support based on documentation

Quiz

1. What happens in the retrieval step of RAG?

2. Why are documents split into chunks?

3. What is an advantage of RAG over fine-tuning alone?

Related news

This Week in Spring - December 1st, 2026

Source excerptHi, Spring fans! As I write this, I am in amazing Australia for the YOW! conference! I got here from San Francisco, landed in Sydney, and then beat feet all the way to Melbourne, the first stop on the tour. It's summertime down here, even though we've all just entered December, the final month of the year(!!), so I'm elated to have the opportunity to connect with amazing people and have amazing conversations in amazing weather! While I was on the 15-hour journey from San Francisco, I read a lot of interesting stuff and am elated to be able to share it with y'all today! So, here we go.. Spring AI 2.1 Brings AI to Java Developers - The post says Spring AI 2.1 lets Java developers build AI-powered apps directly in the Spring ecosystem, not just Python developers. It highlights features like ChatClient, RAG, tool calling, session memory, MCP support, and observability. The author frames the release as opening up AI assistants, intelligent search, document Q&A, and agent workflows for Spring Boot developers. Compiled JVM Libraries Weren’t the Main Cost - David Parry reports on 99 coding-agent runs testing whether compiled JVM libraries make agents inefficient. He found that agents usua…

Presentation: Finetuning Your Embedding Model for Better Search: Learning from Agentic Search at Dell

Source excerptRachel Shalom explains how Dell solved enterprise RAG retrieval failures on internal terminology by fine-tuning open-source embedding models. She discusses data prep with hard negatives, distributed InfoNCE loss training on H100 GPUs, automated hyperparameter tuning, and production evaluation using LLM-as-a-judge. By Rachel Shalom

Presentation: Inferencing for Enterprises

Source excerptDio Rettori discusses the operational realities of enterprise AI inference. Moving beyond fast token generation, he explores why inference requires dedicated systems engineering, tackles GPU utilization pitfalls, compares on-prem versus cloud TCO, and analyzes multi-agent latency determinism. He shares why teams must embed domain ontology directly into models rather than relying solely on RAG. By Dio Rettori

What’s new with Google Cloud

Source excerptWant to know the latest from Google Cloud? Find it here in one handy location. Check back regularly for our newest updates, announcements, resources, events, learning opportunities, and more. Tip: Not sure where to find what you’re looking for on the Google Cloud blog? Start here: Google Cloud blog 101: Full list of topics, links, and resources. aside_block <ListValue: []> Nov 16 - Nov 20 Why your AI agent keeps forgetting: a 15 minute build on agent memoryAgents that resend the full conversation get slower and more expensive, and agents that keep nothing forget users between sessions. In the latest AI Agent Clinic episode, Google Cloud engineer Laxmi Harikumar and developer Miles Libbey add long term memory to a voice agent built with Agent Development Kit (ADK). They compare 4 memory options (flat prompting, RAG, knowledge graphs and Memory Bank in Gemini platform) and show 3 ways to keep context small. Watch the episode and get the code. Cut background agent costs in half with the deferred tier on Gemini platformThe deferred service tier is generally available (GA) on the Gemini platform for the Interactions API, Agent Development Kit (ADK), and Deep Research. Running multi-hou…