Flash Cards · Vector stores

Flash Card: The Silent Distance-Metric Bug

July 15, 2026 · 1 min read

Generative AI Development · part of The Exam Room

Q. Retrieval quality is poor even though the embeddings look fine. What silent config is worth checking?

A. The index distance metric must match how the embedding model was trained (cosine, Euclidean/L2, or dot product). A mismatch quietly wrecks ranking, and the vector dimensions must match the model too.

Why? Dimension and distance-metric mismatches produce plausible-but-wrong retrieval, a classic trap.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.