MLA-C02

Introduction to Retrieval Augmented Generation

RAG architecture patterns, Amazon Bedrock Knowledge Bases, retrieval strategies and reranking, optimising retrieval and embeddings, custom retrieval pipelines, monitoring retrieval accuracy and refreshing knowledge bases.

  • 7 lessons
  • Module quiz

Foundation models know only what was in their training data, which is fixed at a point in time and excludes an organisation's private documents. Retrieval augmented generation (RAG) addresses this by searching a knowledge source for passages relevant to each question and adding them to the prompt, so the model answers from current, specific information and can cite its sources.

Amazon Bedrock Knowledge Bases provides managed RAG: it ingests documents, splits and embeds them, stores the vectors and retrieves passages through the Retrieve and RetrieveAndGenerate APIs. Answer quality depends mostly on retrieval, so this module also covers retrieval strategies, reranking, embedding choices, custom pipelines, monitoring of retrieval accuracy and keeping the index up to date.

What the exam expects

Questions test choosing the RAG pattern for a type of question, diagnosing whether a bad answer comes from retrieval or from generation, knowing which settings cannot be changed after creation, the embedding model and vector store of a knowledge base and the chunking and parsing of a data source, and keeping indexes fresh with ingestion jobs.

How this module is organised

Selecting a RAG Architecture Pattern explains the patterns. Building Managed RAG with Amazon Bedrock Knowledge Bases explains the managed service. Tuning Retrieval with Search Types, Filters and Reranking and Optimizing Chunking and Embedding Models for Retrieval explain how to improve retrieval. Building Custom Retrieval Pipelines explains when to build your own. Monitoring RAG Retrieval and Generation Quality and Keeping Knowledge Bases Current and Re-Indexing Safely explain how to operate RAG systems.

  1. Selecting a RAG Architecture Pattern Lesson 1
  2. Building Managed RAG with Amazon Bedrock Knowledge Bases Lesson 2
  3. Tuning Retrieval with Search Types, Filters and Reranking Lesson 3
  4. Optimizing Chunking and Embedding Models for Retrieval Lesson 4
  5. Building Custom Retrieval Pipelines Lesson 5
  6. Monitoring RAG Retrieval and Generation Quality Lesson 6
  7. Keeping Knowledge Bases Current and Re-Indexing Safely Lesson 7
  8. Practise and review
  9. Checkpoint Practice activities across the module
  10. Test your knowledge 4 questions