GLOSSARY

ANN Index (Approximate Nearest Neighbor)

An ANN index finds near neighbors quickly in large vector spaces. It’s essential for low-latency semantic search.

What is an ANN Index?

An ANN index is a data structure (e.g., HNSW, IVF-PQ, ScaNN) that speeds up nearest-neighbor lookups by trading tiny accuracy for big performance.

How It Works (quick)

  • Build: Quantize/graph or cluster vectors.
  • Search: Probe a subset then refine.
  • Tune: Control recall-latency via parameters (ef, nprobe).
  • Persist: Memory/disk layout with replicas.

Why It Matters in E-commerce

  • Enables sub-100ms vector retrieval at scale.
  • Keeps UX responsive during spikes.

Best Practices

  • Choose structure by catalog size and latency SLOs.
  • Warm caches; pin hot vectors.
  • Validate recall with golden sets.

Summary

ANN is the engine of fast vector search. Tune parameters to your latency/quality goals.