Online course · AI

Retrieval-Augmented Generation (RAG) & Vector Databases

Build grounded, cited, measured document Q&A with pgvector and hybrid search

Created by TrainSkool Trainer

Retrieval-Augmented Generation (RAG) & Vector Databases course cover

Coming soon Launch price ₹2,499

This course is not open for enrolment yet.

About this course

For developers who have built a first AI agent or chatbot and now need answers grounded in their own documents: AI engineers, backend developers, freelancers and product teams in Indian companies. You follow one running example, Thendral Sahayak, a support assistant for a fictional Coimbatore appliance maker, from raw PDFs to a measured, production-ready system. You will chunk documents (including Tamil and Hindi), choose embeddings, build with pgvector, combine BM25 and vectors with rank fusion and re-ranking, validate citations in code, abstain honestly, resist prompt injection, handle personal data with the DPDP Act in mind, evaluate with golden sets, recall@k and regression gates, and model cost in rupees and p95 latency. Prerequisites: comfortable Python and the AI Agents & Agentic AI course or equivalent experience calling an LLM API. Included: 28 text lessons with runnable examples, slides and quick checks in every lesson, an auto-checked Python exercise per lesson, seven chapter projects, chapter quizzes, a rubric-graded capstone, a 20-question final exam and a certificate of completion. Lessons are text and slides; trainer videos are coming later. Products named, such as pgvector or Pinecone, are referenced descriptively; TrainSkool is not affiliated with or endorsed by them. What you will be able to do: - You will be able to decide with numbers when retrieval beats long-context prompting or fine-tuning. - You will be able to ingest, clean and chunk real documents, including Tamil and Hindi text, with stable citable chunk ids. - You will be able to choose an embedding model and similarity metric, and build a filtered, multi-tenant index with pgvector. - You will be able to combine BM25 and vector search with reciprocal rank fusion, re-ranking, MMR and query routing. - You will be able to write grounded prompts whose citations are validated in code, with honest abstention and version handling. - You will be able to defend a RAG system against prompt injection and handle personal data in line with the DPDP Act at a high level. - You will be able to evaluate retrieval and answers with golden sets, recall@k, MRR, nDCG and a regression gate. - You will be able to model per-question cost in rupees and p95 latency, and apply caching and right-sizing safely.

What you'll learn

  • Decide with numbers when retrieval beats long-context prompting or fine-tuning
  • Ingest, clean and chunk real documents, including Tamil and Hindi text, with stable citable chunk ids
  • Choose an embedding model and similarity metric, and build a filtered, multi-tenant index with pgvector
  • Combine BM25 and vector search with reciprocal rank fusion, re-ranking, MMR and query routing
  • Write grounded prompts whose citations are validated in code, with honest abstention and version handling
  • Defend a RAG system against prompt injection and handle personal data in line with the DPDP Act at a high level
  • Evaluate retrieval and answers with golden sets, recall@k, MRR, nDCG and a regression gate
  • Model per-question cost in rupees and p95 latency, and apply caching and right-sizing safely

Course content

Chapter 1 · Module 1: Why RAG — Context Windows, Fine-Tuning and Retrieval

  • Code lab: What RAG Solves: Private Knowledge, Freshness and ProofOn 1 April 2026, Thendral Home Appliances changed its warranty. Mixer grinder motors went from 2 years to 5 years, and the RO membrane in the TH-WP12 purifier stopped being covered.10 topics · 26 min
  • Code lab: Long Context, Fine-Tuning or Retrieval: Choosing With NumbersWhen Thendral's managing director heard about the support assistant, she asked a fair question: "Context windows are huge now.13 topics · 26 min
  • Code lab: The RAG Pipeline End to End: A Minimal Working SystemMost RAG tutorials start with a framework and a hosted vector database, and twenty lines later something answers questions.17 topics · 30 min

Chapter 2 · Module 2: Chunking and Embeddings Strategy

  • Code lab: Ingestion and Cleaning: PDFs, HTML, Tables and Indian-Language TextThendral's knowledge does not live in tidy text files.12 topics · 26 min
  • Code lab: Chunking Strategies: Fixed, Recursive, Structure-Aware and OverlapA chunk is the unit your system retrieves, the unit it pays for in the prompt, and the unit it cites.10 topics · 28 min
  • Code lab: Embeddings: What the Vector Means and How to Choose a ModelArjun's team sees the same complaint written a dozen ways: "mixie not working", "mixer grinder stopped suddenly", "motor band ho gaya", "TH-MG750 red light, no power".11 topics · 26 min
  • Code lab: Similarity, Normalisation and Multilingual QueriesWhen Priya configured the vector index, the database asked her to pick a distance: cosine, inner product or Euclidean (L2).18 topics · 26 min

Chapter 3 · Module 3: Vector Databases — Compare, Then Build With pgvector

  • Code lab: How Vector Indexes Work: Exact Search, IVF, HNSW and Quantisation3 compared the question with every chunk. For 28 chunks that takes microseconds.14 topics · 28 min
  • Code lab: The Vector Database Landscape: Choosing for an Indian TeamSearch "best vector database" and you will find dozens of products, each with a benchmark showing it is the fastest.11 topics · 24 min
  • Code lab: Building With pgvector: Schema, Loading and QueriesThendral already runs PostgreSQL for orders and service tickets on a server in its Coimbatore office's cloud account.11 topics · 30 min
  • Code lab: Metadata Filters, Updates, Deletes and Multi-TenancyThree incidents from Thendral Sahayak's first month of testing, all caused by things around the vectors rather than the vectors themselves.16 topics · 28 min

Chapter 4 · Module 4: Retrieval Quality — Hybrid Search and Re-Ranking

  • Code lab: Keyword Search and BM25: Why Vectors Alone Miss Part NumbersTechnicians at Thendral's Madurai service centre do not type full sentences.10 topics · 28 min
  • Code lab: Hybrid Search and Reciprocal Rank FusionThendral's chat logs contain two kinds of questions in roughly equal measure.10 topics · 26 min
  • Code lab: Re-Ranking With Cross-Encoders and Diversity With MMRAfter hybrid fusion, Thendral Sahayak usually has the right chunk somewhere in its top 20.10 topics · 26 min
  • Code lab: Query Transformation: Rewriting, Multi-Query and RoutingReal chat messages are poor search queries. ".16 topics · 26 min

Chapter 5 · Module 5: Grounding and Citations

  • Code lab: Assembling the Grounded Prompt: Context Budget and OrderingChapters 2 to 4 were about finding the right chunks. This chapter is about what happens next, when those chunks meet the language model.11 topics · 26 min
  • Code lab: Citations You Can Check in CodeA citation is a claim: "this sentence is supported by that source". Models produce citations fluently, and they sometimes produce them wrongly.11 topics · 26 min
  • Code lab: Abstention, Conflicting and Superseded SourcesTwo of the most damaging answers a support assistant can give are a confident answer to a question it cannot answer, and the right answer from the wrong version of a policy.11 topics · 28 min
  • Code lab: Untrusted Context: Injection, Permissions and Personal DataThendral's knowledge base includes a community forum post, FORUM-0912, from a customer whose fan hummed at low speed.17 topics · 30 min

Chapter 6 · Module 6: Evaluating RAG Systems

  • Code lab: Building a Golden Evaluation SetEvery chapter so far ended with a version of the same sentence: "measure it on your golden set".11 topics · 26 min
  • Code lab: Retrieval Metrics: Precision@k, Recall@k, MRR and nDCGWith a golden set in hand, Priya can finally ask the question every earlier chapter postponed: is retrieval good, and is it getting better?10 topics · 28 min
  • Code lab: Answer Quality: Faithfulness, LLM-as-Judge and Regression GatesRetrieval metrics say whether the evidence reached the prompt. They say nothing about what the model did with it.17 topics · 28 min

Chapter 7 · Module 7: Cost and Latency Trade-Offs

  • Code lab: Where the Rupees Go: Pricing an Index and a Query" A RAG system's cost is spread across stages that are easy to forget: embedding the corpus once and again whenever the model changes, embedding every query, the LLM's input tokens (instructions…11 topics · 26 min
  • Code lab: Latency Budgets: Measuring p50/p95 Stage by Stage5 seconds. At 8 pm on a weekday, with 900 questions an hour arriving from phones on patchy mobile data, that target is hard.11 topics · 26 min
  • Code lab: Caching, Quantisation and Right-Sizing for ProductionThendral's chat logs are repetitive in a way every support desk recognises.17 topics · 26 min

Chapter 8 · Module 8: Capstone — A Document Q&A System Over a Real Dataset

  • Code lab: Capstone Brief, Dataset Options and ArchitectureEverything in this course has been building one system, a stage at a time: clean ingestion, sensible chunks, a deliberately chosen embedding model, a real vector database with safe filters and…10 topics · 30 min
  • Code lab: Build Milestones and Acceptance ChecksCapstones fail in a predictable way.10 topics · 30 min
  • Code lab: Deliverables, Grading Rubric and Final ReviewA capstone is judged on what a reviewer can see and verify in limited time.10 topics · 25 min

Assessments and certificate

  • Module 1 quiz: Why RAG — Context Windows, Fine-Tuning and Retrieval7 questions · 15 min · pass mark 70%
  • Module 2 quiz: Chunking and Embeddings Strategy7 questions · 15 min · pass mark 70%
  • Module 3 quiz: Vector Databases — Compare, Then Build With pgvector7 questions · 15 min · pass mark 70%
  • Module 4 quiz: Retrieval Quality — Hybrid Search and Re-Ranking7 questions · 15 min · pass mark 70%
  • Module 5 quiz: Grounding and Citations7 questions · 15 min · pass mark 70%
  • Module 6 quiz: Evaluating RAG Systems7 questions · 15 min · pass mark 70%
  • Module 7 quiz: Cost and Latency Trade-Offs7 questions · 15 min · pass mark 70%
  • Retrieval-Augmented Generation (RAG) & Vector Databases — final assessment20 questions · 40 min · pass mark 70%

Related courses

Frequently asked questions

Can I get a refund for Retrieval-Augmented Generation (RAG) & Vector Databases?

Yes. You can request a full refund within 7 days of purchase, provided you have completed no more than 25% of the lessons, not started the final exam and not been issued a certificate. Pre-orders of a course that has not launched yet can be refunded in full any time before launch. Email refunds@trainskool.com with your order reference; approved refunds go back to your original payment method.

How long do I have access to the course?

Lifetime access. A one-time payment of ₹2,499 keeps the course in your TrainSkool learning dashboard, on the web and in the TrainSkool apps, with no subscription to cancel.

Do I get a certificate?

Yes. TrainSkool issues a certificate when you meet the course requirements, including passing its 8 graded assessments. Every certificate has a public verification link that employers can check.

Are there any prerequisites?

No other course is required. The course level is intermediate, so check the curriculum to confirm it matches your experience.

How is the course delivered?

Online and self-paced: 8 modules and 28 lessons, about 12h 39m of study, with graded assessments. Learn in your browser or the TrainSkool Android and Windows apps.