Academy / Generative AI Engineering
Path 3 · Course 1 · For developers and technical teamsBuilding 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 Python code you can run and edit on the page.
0 of 6 modules complete
Modules
- 140 min
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, RAG in twenty lines of plain Python, and when a long prompt is the better design.
- 250 min
Embeddings and vector search
Embeddings, cosine similarity, semantic search in code, vector databases and ANN indexes, and choosing an embedding model, looking inside the vectors, and how far brute-force search stretches.
- 345 min
Preparing documents: chunking and metadata
Loading and cleaning documents, why and how to chunk, chunking strategies and code, metadata, and keeping the index fresh, detecting changed documents, seeing the chunk-size trade-off, and adding context to chunks.
- 450 min
Retrieval that works
Lexical vs semantic search, hybrid search and reciprocal rank fusion, reranking, contextual retrieval, query rewriting, filters and permissions, with runnable hybrid search, permission filtering and query rewriting.
- 550 min
Generating grounded answers
A grounded prompt template, design choices, an end-to-end mini RAG system in Python, and showing sources to users, presenting sources, checking citations automatically, and screening for prompt injection.
- 650 min
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, comparing retrievers on one test set, and a first look at agentic RAG.
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 →