14 · Serve whole AI applications

Deep systems understanding · Study map 67 of 85

Retrieval at scale: search has its own budget

Suggested preparation: Multi-tenancy: share the model, isolate the users

Picture it

Imagine exploring a massive galaxy where every document is a star, and similar ideas form tight, glowing constellations. When a user asks a question, they aren't searching for a literal keyword; they are throwing a dart into this geometric space to see which stars they land near. Fast approximate indexes allow us to instantly warp to the right neighborhood, but we still need strict gravitational borders to ensure we don't accidentally retrieve stars that belong in someone else's private universe.

What to understand

  • HNSW/IVF/PQ intuition, recall-latency tradeoffs, hybrid retrieval
  • Chunk/version IDs, incremental indexing, deletes, ACL filtering, and reranking

Follow the references

  1. 1 · Documentation

    Meta · Faiss similarity search ↗

    Use index selection and the comparison of index types. Track memory, recall, and query time.

  2. 2 · Paper

    Lewis et al. · Retrieval-Augmented Generation ↗

    Separate retrieval quality from generation quality in the pipeline.

Make it concrete

Build a small labeled query set with allowed documents. Sweep retrieval depth and reranking; report recall, authorization correctness, stage latency, and final grounded-answer quality.

You understand it when…

Why can a good answer benchmark hide a serious document-permission failure?

This is a study map. Follow the reference for the full explanation; use the question to test your mental model. Browse the reference shelf.