Academy / Generative AI Engineering

Path 3 · Course 1 · For developers and technical teams

Building LLM Applications with RAG

Connect large language models to your own documents: embeddings and vector search, chunking, hybrid retrieval and reranking, grounded answers with citations, and evaluating what you build — with working Python code.

By · Last updated

6 modulesAbout 4 hoursKnowledge check per moduleFinal assessment & certificateBasic Python

0 of 6 modules complete

Modules

  1. 1

    Why LLMs need your data

    What LLMs don't know, prompt-stuffing vs RAG vs fine-tuning, the two halves of the RAG pipeline, and where RAG fails.

    25 min
  2. 2

    Embeddings and vector search

    Embeddings, cosine similarity, semantic search in code, vector databases and ANN indexes, and choosing an embedding model.

    35 min
  3. 3

    Preparing documents: chunking and metadata

    Loading and cleaning documents, why and how to chunk, chunking strategies and code, metadata, and keeping the index fresh.

    30 min
  4. 4

    Retrieval that works

    Lexical vs semantic search, hybrid search and reciprocal rank fusion, reranking, contextual retrieval, query rewriting, filters and permissions.

    35 min
  5. 5

    Generating grounded answers

    A grounded prompt template, design choices, an end-to-end mini RAG system in Python, and showing sources to users.

    35 min
  6. 6

    Evaluating and improving RAG

    Retrieval and generation metrics, building a test set, recall@k and MRR in code, LLM-as-judge, the improvement loop, advanced RAG and a production checklist.

    35 min

Frequently asked questions

What is RAG (retrieval-augmented generation)?

RAG connects a large language model to your own documents: it retrieves the most relevant passages for a question and gives them to the model, so it can answer from your content with citations instead of from memory alone. Module 1: Why LLMs need your data →

Should I use RAG or fine-tuning?

Use RAG when the model needs knowledge — especially private or frequently changing information. Fine-tuning is better for changing behaviour, style or format, not for adding facts. Module 1: Why LLMs need your data →

What is chunking in RAG?

Chunking splits documents into smaller passages before they are embedded and indexed. Good chunk size and boundaries, plus useful metadata, have a big effect on retrieval quality. Module 3: Preparing documents: chunking and metadata →

What is hybrid search?

Hybrid search combines keyword (lexical) search with semantic vector search, often merging results with reciprocal rank fusion. It catches both exact terms and meaning, and reranking can improve it further. Module 4: Retrieval that works →

How do you evaluate a RAG system?

Evaluate retrieval and generation separately: measure whether the right passages are found (for example recall@k and MRR) and whether answers are faithful to them, using a test set and, carefully, LLM-as-judge. Module 6: Evaluating and improving RAG →