CourseAI Engineering · 0321 minPremium
Retrieval (RAG)
Give the model your product's knowledge at question time: chunk by structure, embed with context, store in Postgres with pgvector, search by meaning and by keyword in parallel, fuse with RRF, rerank, fence the passages as data, and check every citation.
Premium
Part of the AI Engineering course, on the Premium plan
Readers with Lifetime Access read it in full. Already bought it? Sign in from the top bar.
What’s inside
- 1. Two pipelines
- 2. Chunking: split by structure, not by size
- 3. Embeddings
- 4. Storage: one table, two indexes
- 5. Ingestion that is safe to run any time
- 6. Hybrid search
- 7. Reranking: cheap recall, expensive precision
- 8. Degrade, don't die
- 9. Handing passages to the model
- 10. Debug retrieval on its own
- What breaks in production
- Exercises
- Check yourself