RAG systems
This subject covers retrieval-augmented generation for a real-estate software platform whose data is property listings, CRM records (contacts, requests, visits) and documents such as contracts, energy certificates and brochures. The outcome is the ability to design, build, evaluate and ship a production RAG feature that answers agent and customer questions from that data with cited, current, access-controlled facts.
- created
- 28 Aug 2026
- status
- active
- lessons
- 8
- references
- 3
Success looks like
- Draw the full RAG pipeline (ingest, chunk, embed, index, retrieve, rerank, generate, cite) and explain what each stage is for and what breaks when it is skipped
- Choose a chunking and metadata strategy for listings, CRM records and long documents, and defend it with evidence
- Explain dense, sparse and hybrid retrieval, and pick one per query type with reciprocal rank fusion where both are needed
- Combine metadata filters and structured queries with semantic retrieval so "3-bedroom flats under 400k in Ghent" is answered exactly, not approximately
- Build an evaluation set and measure retrieval quality (recall@k, MRR) and answer quality (faithfulness, relevance) before and after each change
- Diagnose a bad answer to one failing stage using a fixed checklist
- Apply row-level access control and prompt-injection defences to retrieved content
- Write a production readiness checklist covering freshness, cost, latency and monitoring
Constraints
- Code shown as framework-agnostic pseudocode; no SDK or vector database is assumed
- Every claim cited to a primary source in RESOURCES.md
- Lessons short, one win each, with retrieval practice at the end
Out of scope
- Fine-tuning embedding or generation models
- Training retrieval models from scratch
- Multi-agent orchestration beyond a single retrieve-then-generate loop
- Vendor comparisons of vector databases
Journey
- 1The pipelineDraw all eight stages and say what breaks when each is skipped12 min
- 2Chunking and metadataChoose a chunking + metadata strategy per data shape, with evidence15 min
- 3Dense, sparse, hybridPick a retriever per query type; fuse lists with RRF15 min
- 4Filters and structureAnswer exact queries exactly: metadata filters + semantic search15 min
- 5Rerank, order, generateDesign two-stage retrieval and assemble a grounded, cited prompt15 min
- 6Measuring qualityBuild a gold set; measure recall@k, MRR, faithfulness18 min
- 7Debugging bad answersTrace any bad answer to one failing stage with a fixed checklist15 min
- 8Security and productionApply access control and injection defences; write the readiness checklist18 min