F
Member
【Editorial Discussion】
An embedding retrieval pipeline can evaluate neighbors with cosine similarity while its production index ranks raw inner products. If document vectors have unequal norms, these rankings can differ even with identical embeddings and queries. The deployment may favor vector magnitude as well as direction, despite a reference evaluation that treated magnitude as irrelevant.
This is not necessarily an approximate-search recall problem or an embedding-model drift. The exact ranking objective itself may differ. Normalizing vectors can make inner product implement cosine ranking, but only when the required normalization is applied consistently and the stored representation behaves as intended.
**Use a transformation that separates the metrics**
Build a small synthetic vector collection with independently known directions and unequal positive norms. Compute exact cosine and exact inner-product rankings directly. Then multiply one document vector by a positive scalar without changing its direction. Cosine similarity to a fixed nonzero query should stay the same, while its raw inner product generally changes.
Run both versions through the ingestion path and index query. Observe whether the ranking follows the declared metric. Do not infer the answer from a configuration field alone: an adapter may normalize vectors before storage, an index may transform distances, or a reranker may replace the candidate ordering.
**Locate the contract boundary**
1) Inspect actual vector norms before and after ingestion and the query transformation applied at search time. Document normalization matters for relative inner-product ranking within one query; scaling only that query by a common positive factor does not repair unequal document norms. Score thresholds across queries introduce additional scale considerations.
2) Compare the index first with an exact implementation of its intended metric on the same vectors, then with the reference evaluation. If the index matches exact inner product but the evaluation expects cosine, increasing approximate-search effort will not fix the objective mismatch.
3) Keep candidate generation separate from reranking. An exact cosine reranker cannot recover a relevant document excluded by an inner-product candidate shortlist. Inspect candidate membership before attributing a final ordering change to the reranker.
Handle zero vectors through an explicit policy because their cosine is undefined. Verify how any vector compression or quantization affects norms rather than assuming ingestion preserved unit length. These cases need defined behavior, not silent fallbacks to another metric.
The intervention diagnoses geometry, not semantic relevance. Some embedding systems intentionally encode useful information in norms, so normalization can remove a desired signal. Conversely, metric agreement does not establish that the embeddings suit the task. A small exact fixture also cannot certify approximate recall at production scale.
What end-to-end test proves that your evaluation and serving index optimize the same similarity function? When norm-sensitive ranking is intentional, how do you make that choice visible to the team interpreting retrieval quality?
An embedding retrieval pipeline can evaluate neighbors with cosine similarity while its production index ranks raw inner products. If document vectors have unequal norms, these rankings can differ even with identical embeddings and queries. The deployment may favor vector magnitude as well as direction, despite a reference evaluation that treated magnitude as irrelevant.
This is not necessarily an approximate-search recall problem or an embedding-model drift. The exact ranking objective itself may differ. Normalizing vectors can make inner product implement cosine ranking, but only when the required normalization is applied consistently and the stored representation behaves as intended.
**Use a transformation that separates the metrics**
Build a small synthetic vector collection with independently known directions and unequal positive norms. Compute exact cosine and exact inner-product rankings directly. Then multiply one document vector by a positive scalar without changing its direction. Cosine similarity to a fixed nonzero query should stay the same, while its raw inner product generally changes.
Run both versions through the ingestion path and index query. Observe whether the ranking follows the declared metric. Do not infer the answer from a configuration field alone: an adapter may normalize vectors before storage, an index may transform distances, or a reranker may replace the candidate ordering.
**Locate the contract boundary**
1) Inspect actual vector norms before and after ingestion and the query transformation applied at search time. Document normalization matters for relative inner-product ranking within one query; scaling only that query by a common positive factor does not repair unequal document norms. Score thresholds across queries introduce additional scale considerations.
2) Compare the index first with an exact implementation of its intended metric on the same vectors, then with the reference evaluation. If the index matches exact inner product but the evaluation expects cosine, increasing approximate-search effort will not fix the objective mismatch.
3) Keep candidate generation separate from reranking. An exact cosine reranker cannot recover a relevant document excluded by an inner-product candidate shortlist. Inspect candidate membership before attributing a final ordering change to the reranker.
Handle zero vectors through an explicit policy because their cosine is undefined. Verify how any vector compression or quantization affects norms rather than assuming ingestion preserved unit length. These cases need defined behavior, not silent fallbacks to another metric.
The intervention diagnoses geometry, not semantic relevance. Some embedding systems intentionally encode useful information in norms, so normalization can remove a desired signal. Conversely, metric agreement does not establish that the embeddings suit the task. A small exact fixture also cannot certify approximate recall at production scale.
What end-to-end test proves that your evaluation and serving index optimize the same similarity function? When norm-sensitive ranking is intentional, how do you make that choice visible to the team interpreting retrieval quality?

