# Capstone: Production RAG Assistant

> Build a deployed, evaluated question-answering assistant over a real document collection, with citations, permissions and monitoring. Free notes, key concepts,...

Canonical: https://www.internhack.in/roadmaps/tracks/ai-engineer/capstone-rag-assistant
Last updated: 2026-11-28

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](https://www.internhack.in/roadmaps/tracks/ai-engineer/reranking), [Citations and Grounded Answers](https://www.internhack.in/roadmaps/tracks/ai-engineer/citations-grounding), [Regression Testing and Evals in CI](https://www.internhack.in/roadmaps/tracks/ai-engineer/eval-driven-development), [Deploying LLM-Powered Services](https://www.internhack.in/roadmaps/tracks/ai-engineer/deploying-ai-services), [Chat and Streaming Interfaces](https://www.internhack.in/roadmaps/tracks/ai-engineer/chat-ui-streaming)

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

- [pgvector on GitHub](https://github.com/pgvector/pgvector) (pgvector)
- [Anthropic docs: citations](https://docs.anthropic.com/en/docs/build-with-claude/citations) (Anthropic)
- [Langfuse documentation](https://langfuse.com/docs) (Langfuse)

Previous: [AI Product Thinking and Metrics](https://www.internhack.in/roadmaps/tracks/ai-engineer/ai-product-thinking) · Next: [Capstone: Tool-Using Agent with MCP](https://www.internhack.in/roadmaps/tracks/ai-engineer/capstone-agent)

## More in Capstone Projects and Portfolio

- [Capstone: Production RAG Assistant](https://www.internhack.in/roadmaps/tracks/ai-engineer/capstone-rag-assistant)
- [Capstone: Tool-Using Agent with MCP](https://www.internhack.in/roadmaps/tracks/ai-engineer/capstone-agent)
- [AI Engineering Portfolio and Interviews](https://www.internhack.in/roadmaps/tracks/ai-engineer/portfolio-career)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [AI Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/ai-engineer)
