StaffCoder
RAG

RAG Practice Exercises

Python 3.13
2 modules · 12 challengesSign up
Modules2 modules · 12 challenges
Module 1 of 2 · 6 challenges

Embeddings & Vector Search

Learn how to turn text into vectors, search by meaning with cosine similarity and FAISS, fuse dense and keyword results, rerank for precision, and ship a search service that meets its latency SLOs.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

6 challenges

Embedding Space

Sign up to unlock
67%2 of 3 solvedmedium
About this challenge

Embed texts, measure meaning with cosine similarity, and return the true nearest neighbors.

Solved in a browser IDE and graded by tests. Sign up to solve

Index And Distance

Sign up to unlock
100%1 of 1 solvedmedium
About this challenge

Configure the vector store's distance to match the embedding model and make recall real.

Solved in a browser IDE and graded by tests. Sign up to solve

Hybrid Fusion

Sign up to unlock
100%1 of 1 solvedmedium
About this challenge

Fuse dense and keyword rankings so exact identifiers and paraphrases both find their documents.

Solved in a browser IDE and graded by tests. Sign up to solve

Reranker Call

Sign up to unlock
100%1 of 1 solvedmedium
About this challenge

Rerank the retrieved candidates so the right document climbs from position twenty to the top.

Solved in a browser IDE and graded by tests. Sign up to solve

Latency Budget

Sign up to unlock
100%1 of 1 solvedmedium
About this challenge

Make a correct search index fast enough for its latency budget - build once, answer in milliseconds.

Solved in a browser IDE and graded by tests. Sign up to solve

Search Service SLO

STAR
Solving it completes the module
100%1 of 1 solvedmedium
About this challenge

Wire the index, filter, hybrid fusion and reranker into one search service that meets every SLO in a single run.

Solved in a browser IDE and graded by tests. Sign up to solve

About this path

Learn how to build production Retrieval-Augmented Generation with LangChain - semantic search over vector indexes, ingesting real documents into clean chunks, and wiring retrieval into an LLM for grounded, cited answers.

This path covers retrieval-augmented generation from both ends: embeddings and vector search, and turning real documents into clean, searchable chunks. You write Python with LangChain, and the challenges are medium difficulty, so you should be comfortable with Python first. No earlier RAG experience is needed. The ingestion module works with PDFs, HTML, tables and scanned pages.

Frequently asked questions

4

What will I practice in this path?

2 modules: Embeddings & Vector Search and Document Ingestion & Parsing.

How many RAG exercises are there, and how hard are they?

12 exercises, all medium.

What does this path run on?

Challenges run on Python 3.13.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.