Buyer's Guide
Same AI Embeddings, Different Neighbors: Name the Metric and Norms
The same embeddings can produce different neighbors when an offer changes the metric or normalization. Inner product includes vector magnitudes; cosine removes them; squared L2 also includes the difference in magnitudes. Even an offer that preserves cosine ranking can report a different score scale. Compare the model and vector revisions, metric, normalization of both sides, ordering and threshold meaning before treating two retrieval returns as equivalent.
01
Start with the quantity the offer ranks
A supplier can return every candidate and calculate each score correctly, yet answer a different numerical question from the one the buyer intended. Candidate coverage does not settle the metric.
For query q and candidate x, inner product adds the products of corresponding components. Squared Euclidean distance adds the squared component differences. Cosine divides the inner product by the product of the two vector lengths. These formulas retain different information: scaling a candidate can change its inner product without changing its direction.
The Faiss project provides a named implementation context. Its v1.12.0 metric header identifies maximum inner-product search and squared-L2 search. Its metric guide explains cosine and normalization. Larger inner products and cosine values rank higher in this comparison; smaller squared-L2 values rank nearer. A field called similarity does not establish which of these quantities an offer returns.
Whether magnitude carries useful information depends on the embedding model and task. Removing it is a change to the numerical representation, rather than a universal improvement. The comparison below holds the supplied vectors fixed so that the metric’s effect is visible.
02
Three metrics choose three orders from the same vectors
Original example MET-23 uses the invented query q = (2, 0) and candidates A = (2, 0), B = (3, 4) and C = (0, 2). Every vector is nonzero and every candidate is scored. The arithmetic is exact; no embedding model, index or application run is represented.
The query length is 2. Candidate lengths are 2, 5 and 2. A points in the query’s direction and matches its magnitude. B has a larger length but a different direction. C is perpendicular to the query. Those differences explain why the orders disagree.
Inner product returns B, A, C: B’s score 6 exceeds A’s 4. Squared L2 returns A, C, B: A matches exactly, C has distance squared 8, and B has 17. Cosine returns A, B, C: the directional scores are 1, 3/5 and 0.
For B, the inner product is 2×3 + 0×4 = 6. Its cosine is 6/(2×5) = 3/5. Its squared L2 is (2−3)² + (0−4)² = 17. Each number is correct for its own definition. B being first under one metric and last under another is not evidence of a broken index.
References: [F1]
| Candidate | Coordinates | Length | Inner product, higher first | Squared L2, lower first | Cosine, higher first | Source |
|---|---|---|---|---|---|---|
| A | (2, 0) | 2 | 4 | 0 | 1 | Planning analysis |
| B | (3, 4) | 5 | 6 | 17 | 3/5 | Planning analysis |
| C | (0, 2) | 2 | 0 | 8 | 0 | Planning analysis |
Invented exact arithmetic. The orders do not establish relevance, model quality, latency or an actual Faiss result.
03
“Normalized” needs to identify both sides
Unit normalization divides a nonzero vector by its own length. In MET-23, the unit query is (1, 0), while the unit candidates are A′ = (1, 0), B′ = (3/5, 4/5) and C′ = (0, 1).
If only the query is normalized, its inner products with the original candidates become 2, 3 and 0. B remains first. For this fixed query direction, removing the query’s positive scale multiplies every candidate score by the same factor; it does not remove the different candidate magnitudes.
If only the candidates are normalized, the original query’s inner products become 2, 6/5 and 0. Their order is A, B, C, matching cosine. Their values are twice the cosine values because this query still has length 2. Equal ranking therefore does not mean equal scores.
If both sides are unit normalized, inner products become 1, 3/5 and 0: the actual cosine values. The Faiss metric guide describes this two-sided mapping. A description that mentions normalized documents but leaves the query path unspecified does not establish that returned inner-product values are cosine scores.
This example excludes zero vectors. Dividing by a zero length is undefined in the mathematical normalization used here. A real application that permits such inputs needs its provider’s explicit handling, rather than an assumption that this formula covers them.
References: [F1]
04
A matching top result can still conceal a threshold mismatch
Now give the fictional buyer a precise numerical requirement: return candidates whose cosine is at least 4/5, or 0.8. Under the stipulated vectors, only A qualifies. B’s cosine is 3/5 and C’s is zero.
Offer P supplies raw inner products and returns B as its highest-scoring candidate. That is a valid maximum-inner-product result, but it does not implement this buyer’s stated cosine comparison.
Offer Q normalizes only the stored candidates. It returns A first, which can make a top-result comparison look reassuring. If Q then applies the number 0.8 directly to its returned inner products, it includes both A and B: their scores are 2 and 6/5. Q agrees with the cosine ranking but not with the stipulated threshold population.
Offer R defines two-sided unit normalization and reports the resulting inner products. Its scores are 1, 3/5 and 0, so applying 0.8 includes A alone in this arithmetic case. R supplies the numerical basis the buyer requested. That conclusion concerns the defined score rule, not the usefulness of A’s text or an observed implementation result.
The conversion also explains how Q’s scale differs. For this query, 2×0.8 = 1.6 is the corresponding document-only inner-product threshold, which excludes B. It is not a universal constant: another query norm changes that multiplier. A threshold’s number and its score definition belong together.
05
Unit-vector L2 can express the same ordering with another scale
For two unit vectors, expanding squared Euclidean distance gives 1 + 1 − 2 times their inner product. Thus squared L2 = 2 − 2×cosine under this two-sided unit-normalization premise.
MET-23’s unit-vector squared distances are therefore 0 for A, 4/5 for B and 2 for C. Their ascending order matches cosine’s descending order. These are distances between the unit vectors, not the raw squared distances 0, 17 and 8 in the earlier table.
The buyer’s cosine requirement of at least 4/5 corresponds to a unit-vector squared distance of at most 2/5. B’s 4/5 distance fails that condition, just as its cosine of 3/5 does. This is a useful equivalence when an offer clearly identifies its normalized inputs and squared-distance output.
It does not make every L2 result equivalent to cosine. The identity’s two unit-length premises are essential. Taking a square root would also change the distance scale, even though it preserves distance ordering. Reusing a numeric cutoff across these scales without its definition changes the requested comparison.
References: [F1]
06
Compare the delivered score rule before judging retrieval quality
For the fictional cosine requirement, R describes a matching numerical return, Q needs its score scale reconciled, and P offers a different ranking objective. The appropriate purchase is the one that implements the task’s intended rule, rather than the one whose headline says highest similarity. A task intentionally designed for maximum inner product could make a different choice.
Have the software provider connect its model revision and actual query/document vectors to the metric, preprocessing on each side, score direction and cutoff semantics. A changed model or document representation can change the ranking before any search approximation occurs. A score from the old representation does not automatically retain the meaning of an old threshold after that change.
Then assess which candidates the actual search considers. MET-23 deliberately scores all three, so it contains no recall loss from omitted candidates. The related exact-versus-approximate retrieval guide addresses that separate question. An approximate search can add candidate-selection loss to a perfectly clear metric contract.
Finally evaluate whether the returned material answers the application’s question with applicable, authorized evidence. The RAG-versus-fine-tuning guide follows source material into the answer path. Agreement with a mathematical ranking does not establish source authority, factual correctness or the quality of the generated answer. No hardware capacity, response time or savings result follows from these three score formulas.
07
Scope physical equipment work only if it is independently needed
If the selected infrastructure also needs servers, storage or switches mounted and connected, Leviathan’s Rack-and-Stack service provides a route to discuss that agreed physical installation. The service covers approved rack positions, included IT cabling, labels and physical handoff records, with actual site authorization and scope.
Use the related service and project inquiry for a nonconfidential equipment list, rack positions, approved connection requirements and receiving-team needs. The appointed software and application owners retain metric selection, vector-database implementation and retrieval acceptance. The metric comparison itself establishes no need for new equipment.
References: [L1]
08Sources
Primary sources
- [F1]Faiss project wiki: MetricType and distancesChecked 2026-10-21. Project metric guide, with the December 3, 2024 edit context checked October 21, 2026. Supports squared-L2 reporting, inner-product norm dependence and the two-sided unit-normalization mapping. The example is exact arithmetic, not an index-performance or recall result.
- [F2]Faiss v1.12.0: MetricType.hChecked 2026-10-21. Historical versioned interface identifies maximum inner product and squared L2. It establishes the named metric labels, not support or behavior of an unspecified installed index.
- [L1]Leviathan Systems: Rack-and-Stack InstallationChecked 2026-10-21. Agreed physical equipment mounting, IT cabling, labels and handoff.
Contact
Have an agreed physical equipment installation to scope?
Share a nonconfidential equipment, rack-position and connection outline to discuss the physical package, handoff and availability.