Retrieval & knowledge systems

Build a grounded RAG application with citations

Retrieve → rerank → generate grounded answers with citations over a private corpus.

~20 focused hours·intermediate

Tools: LangChain/LlamaIndex, Vector DB (pgvector/Chroma), Reranker (cross-encoder or hosted rerank API), Citation formatting, Claude/GPT for generation

What employers mean

You should be able to…

  1. Build a retrieve → rerank → generate pipeline that answers questions grounded in a private corpus
  2. Return citations/source references alongside generated answers
  3. Handle 'I don't know' gracefully when the corpus doesn't contain an answer, instead of hallucinating
  4. Tune retrieval (top-k, chunk size, reranking) to improve answer quality
  5. Support multi-turn Q&A where follow-up questions still retrieve correctly
  6. Add a reranking step to improve precision after initial vector retrieval
  7. Deploy the RAG system behind an API or simple UI for others to query

Needs first: Generate embeddings and run vector search, Design and version prompts systematically

Learn — free, link-checked

The few resources that matter

Course · intermediate · 90 min · deeplearning.ai

LangChain: Chat with Your Data

End-to-end walkthrough from document loading to a working conversational retrieval chain. — DeepLearning.AI (Harrison Chase, Andrew Ng)
Build from · intermediate · 90 min · github.com

Anthropic Cookbook

Official recipes including contextual retrieval and RAG evaluation patterns tuned specifically for Claude. — Anthropic
Build from · intermediate · 120 min · github.com

RAG From Scratch

Builds every RAG stage (query translation, routing, retrieval, generation) from first principles instead of one black-box chain. — LangChain (langchain-ai)
Read · advanced · 40 min · huggingface.co

Advanced RAG on Hugging Face Documentation using LangChain

Covers reranking and query optimization plus a worked evaluation section, bridging pipeline-building and eval in one place. — Hugging Face
Course · advanced · 90 min · deeplearning.ai

Building and Evaluating Advanced RAG Applications

Pairs advanced retrieval techniques (sentence-window, auto-merging) directly with the eval metrics used to justify them. — DeepLearning.AI (Jerry Liu, Andrew Ng)
Practice

Grounded RAG assistant over Indian HR policy documents

Build a RAG assistant over a corpus of a company's HR policy PDFs or public Indian labour law documents, answering employee questions like 'how many casual leaves am I entitled to?' with cited sources. Implement retrieve → rerank → generate, and make the assistant explicitly refuse to answer when the corpus doesn't cover the question.

Done when
  • Answers include inline citations pointing to the specific source document and section/page
  • A reranking step measurably improves top-result relevance over vector-only retrieval, shown with before/after examples
  • At least 5 out-of-corpus questions are correctly answered with 'not covered' instead of a hallucinated answer
  • A simple API or UI lets a user ask multi-turn follow-up questions that retrieve correctly
Prove it

Evidence a recruiter can check

  • Public GitHub repo with README showing architecture (retrieve→rerank→generate) and example Q&A with citations
  • A before/after example showing reranking improving retrieved chunk relevance
  • At least one documented case of the system correctly refusing an out-of-corpus question
  • A short demo video or hosted link a recruiter can query
  • Eval numbers, even informal (e.g. 8/10 correct-with-citation on a hand-labeled test set)
Interview

Questions you'll get asked

  1. Walk me through the architecture of a RAG pipeline you've built, retrieval to generation.
  2. How do you get an LLM to say 'I don't know' instead of hallucinating when the answer isn't in the retrieved context?
  3. What's the role of a reranker in a RAG pipeline, and when is it worth the added latency?
  4. How do you generate accurate citations that point back to the exact source chunk?
  5. How would you handle a follow-up question in a multi-turn RAG conversation where the retrieval query needs the prior turn's context?
  6. How do you decide top-k for retrieval, and what happens if it's too low or too high?
  7. How would you extend a RAG system to work well over a mix of English and Hindi documents?
See where you stand for AI Engineer