Capstone: Production RAG Assistant

Build a deployed, evaluated question-answering assistant over a real document collection, with citations, permissions and monitoring.

Advanced · about 40 hours · difficulty 4/5

Learn first: Reranking Retrieved Results, Citations and Grounded Answers, Regression Testing and Evals in CI, Deploying LLM-Powered Services, Chat and Streaming Interfaces

This capstone proves you can take retrieval from demo to production. Choose a real corpus you care about: a university handbook, an open-source project's docs, public government guidance, or your own notes.

Requirements

  • Ingestion pipeline: parse PDFs and HTML, chunk with metadata, embed, and store in pgvector (or another vector database) via a background job. Re-ingest changed documents only.
  • Retrieval: hybrid search plus a reranker, with metadata filters.
  • Answering: streamed answers with inline citations that link to the source passage, and an honest "I could not find this" path.
  • Evals: a golden set of at least 50 questions, retrieval metrics (recall at k), an answer faithfulness judge, and a CI job that runs a smoke subset.
  • Observability: traces for every request, a cost and latency dashboard, and thumbs feedback linked to traces.
  • Safety: input moderation, injection-aware prompting for retrieved text, and per-user document access if the corpus has private parts.
  • Deployment: a public URL with rate limiting and a simple chat UI.

Stretch goals

Conversation memory, multi-document comparison questions via query decomposition, and a cheaper model route for simple questions.

What to show

A README with an architecture diagram, eval results before and after each major improvement (for example "adding a reranker improved recall at 5 from 0.71 to 0.86"), cost per 1,000 questions, and known limitations.

Good enough to move on

A stranger can use your deployed assistant, get cited answers, and read a README that explains your design decisions with numbers.

Key concepts

  • Choosing a real corpus
  • Incremental ingestion pipeline
  • Hybrid search and reranking
  • Cited streaming answers
  • Golden set and CI evals
  • Tracing and cost dashboard
  • Public deployment with rate limits
  • Query decomposition stretch goal

Mini project

Ship the full RAG assistant described above over a corpus of at least 200 documents, and publish a README with architecture, eval results for three iterations, and cost per 1,000 questions.

Check yourself

Which single change improved your eval scores the most, and how do you know it was that change and not noise?

Free resources