IBM Open Module
Log In Create Account
Certification learning module

Retrieval-Augmented Generation

Build, evaluate, secure, and operate a retrieval pipeline that grounds responses in approved evidence.

Module 5 of 6 About 6 min IBM Certified watsonx Generative AI Engineer - Associate / C1000-185
83%
Course position
Module 5

Retrieval-Augmented Generation

Build, evaluate, secure, and operate a retrieval pipeline that grounds responses in approved evidence.

IBM Certified watsonx Generative AI Engineer - Associate / C1000-185

Retrieval-Augmented Generation

Retrieval-augmented generation, usually shortened to RAG, grounds a model response in information retrieved for the current request. For the C1000-185 exam, study RAG as a complete information system, not as a single model setting. A strong answer connects the business question, source documents, ingestion process, search behavior, prompt construction, generated response, evaluation, and operations. This module aligns with the current IBM objective section Retrieval-Augmented Generation, weighted at 17 percent when the official certification page was verified on 2026-07-31.

Decide whether retrieval solves the actual problem

Begin with the requirement. RAG is useful when a response must reflect private, changing, or specialized knowledge that is not reliably available from the base model. Examples include answering from product manuals, internal policies, support articles, or a controlled research collection. Retrieval can update the knowledge available at inference time without changing the foundation model's parameters. It can also expose supporting passages so an application can show where an answer came from.

RAG is not automatically the best solution. A deterministic database lookup can be safer for an exact account balance. A rules engine can be clearer for a fixed eligibility decision. Fine-tuning may be more appropriate for repeatable behavior, format, or task adaptation. A scenario that requires current documents and attributable evidence usually favors retrieval. A scenario that requires a new response style but no external facts may favor prompting or tuning. On the exam, eliminate answers that add a vector store merely because the scenario mentions generative AI.

Build the ingestion and indexing path

A retrieval system first converts source material into searchable units. Inventory the approved sources, remove duplicates, preserve useful metadata, split content into coherent chunks, and create representations suitable for retrieval. Chunk boundaries matter. Very large chunks can introduce irrelevant text and consume the context window. Very small chunks can lose the surrounding explanation. A useful design keeps each unit meaningful while retaining identifiers such as document title, section, owner, revision date, access label, and source URL.

Embedding models turn text into numeric vectors whose relative positions can support semantic similarity search. The embedding model used for stored passages and incoming queries must be compatible. Changing an embedding approach can require rebuilding the index. The index should also retain metadata for filtering. A support assistant might restrict retrieval by product version, region, tenant, or publication status before ranking results. Access controls must be enforced before retrieved text reaches the prompt. Hiding unauthorized citations in the interface after generation is too late.

Practice drawing this flow from memory: approved sources to extraction, cleaning, chunking, embedding, indexed passages, query processing, candidate retrieval, ranking, prompt assembly, model response, and evidence display. For each stage, name one failure signal and one corrective action. This exercise turns a broad architecture question into a sequence of observable decisions.

Retrieve useful context and construct the prompt

At request time, the application can normalize or rewrite the query, apply filters, retrieve candidate passages, and rank the most useful evidence. Retrieval quality depends on more than vector similarity. Keyword search can preserve exact identifiers. Hybrid search can combine lexical and semantic evidence. Reranking can improve the order of candidates after initial retrieval. The right choice depends on the document set and evaluation results, not on a universal preference.

The final prompt should separate instructions, user input, and retrieved context. Tell the model how to use the evidence, how to handle insufficient support, and what response shape is required. Treat retrieved text as untrusted data because a document can contain misleading instructions. Do not allow a passage to override system rules or authorization boundaries. When attribution matters, carry source identifiers through retrieval and return citations that map to the passages actually used.

Context limits require selection. Sending every document increases latency and cost while making it harder for the model to focus. Choose the smallest evidence set that supports a useful answer. If retrieval confidence is weak, a safe response can ask a clarifying question, state that the approved material is insufficient, or route the case to a person. Confident fabrication is not a recovery strategy.

Evaluate the pipeline, not only the prose

Separate retrieval evaluation from generation evaluation. Retrieval metrics ask whether relevant passages were found and ranked highly enough. Generation checks ask whether the answer is correct, grounded in those passages, complete for the request, and compliant with the required format. End-to-end checks also measure latency, cost, refusal behavior, citation accuracy, and authorization enforcement. A pleasant answer can conceal failed retrieval, while perfect retrieval can still feed a poorly constructed prompt.

Create a representative test set containing ordinary questions, ambiguous requests, conflicting documents, missing evidence, stale versions, access-restricted material, and adversarial text. Record the expected sources and acceptable answer behavior. Compare changes against the same set before promotion. In production, monitor retrieval misses, empty results, source freshness, user feedback, response time, and the rate at which answers lack adequate support. Log enough identifiers to reproduce a failure without exposing sensitive content unnecessarily.

Use a scenario decision checklist

For an exam scenario, work in this order:

  1. Identify the knowledge boundary. Decide which facts must come from approved external sources.
  2. Choose source and chunk controls that preserve meaning, metadata, freshness, and permissions.
  3. Select retrieval behavior based on measured relevance, including filters, hybrid search, or reranking where justified.
  4. Construct a prompt that distinguishes instructions from evidence and defines behavior when evidence is weak.
  5. Evaluate retrieval, generation, safety, latency, and cost independently before judging the whole system.
  6. Plan monitoring, reindexing, rollback, and incident investigation as part of the design.

Try this drill: an internal assistant gives accurate answers for public policies but reveals a restricted procedure when a user guesses its title. The primary defect is not model creativity. The retrieval layer failed to enforce authorization before prompt assembly. The corrective plan starts with source permissions and filtered retrieval, then adds regression tests that prove unauthorized passages never enter model context.

Official Scope and Verification

Verification ledger baseline: 2026-07-13. This lesson was rechecked on 2026-07-31 against IBM's current C9007000 certification page and the Associate learning path. Product-oriented follow-up reading is available in IBM's documentation for text embeddings, RAG experiment settings, and RAG notebooks. IBM can revise objectives, services, interfaces, and administrative details. Recheck the certification page before scheduling the exam, and use the latest product documentation when practicing in watsonx.