Week 10 • Day 7Week 10

Day 7:Week 10, Day 7 (Mini-Project): Quantized RBAC-Filtered Vector Database Engine

Battle-tested daily lesson note • 100% runnable code, interview Q&A, test suite & interactive quiz

Week 10, Day 7 (Mini-Project): Quantized RBAC-Filtered Vector Database Engine


1. Architecture Overview

In this Week 10 capstone mini-project, we combine Days 1–6 into a complete, self-contained Production Vector Database Engine (QuantizedRBACVectorStore):

  • Atomic Document Upserts & Tombstone Soft-Deletes (Day 6)
  • Inverted Metadata & RBAC Bitmask Pre-Filtering (Day 5) preventing the Zero-Results Cliff and enforcing tenant/role security
  • Scalar Quantization (SQ8 / INT8 — 4x compression) & Two-Stage Oversampled Rescoring (Day 4)
  • Root .env Configuration via load_root_dotenv().

In Simple English: Week 10 Mini-Project Walkthrough

Open Tab 2 (Codes) and Tab 4 (Test & Troubleshooting) to run a complete Quantized, RBAC Pre-Filtered Vector Engine directly in your browser using pure Python + NumPy:

  1. Compress float32 embeddings into SQ8 (int8) and 1-Bit binary codes.
  2. Run Pre-Filtered Search enforcing tenant_id isolation so Tenant A never leaks into Tenant B.
  3. Rescore top candidates for near-lossless Top-K recall!