A distance metric defines what “near” means. pgvector supports L2 (<->), negative inner product (<#>), cosine (<=>), L1 (<+>), Hamming (<~>), and Jaccard (<%>) operators for compatible types. Use the metric your embedding or feature design expects, then build the matching operator-class index and evaluate it on your task.
<#> is negative because PostgreSQL index scans order ascending. Do not sort it descending to “fix” the sign; use ascending distance for nearest-neighbor index access and negate only the displayed score.
For normalized vectors a and b, ||a-b||² = 2 - 2(a·b), so L2, cosine, and inner-product rankings are closely related. Do not assume normalization unless you verify it.
For bit vectors, Hamming counts differing bit positions. Jaccard compares the intersection and union of set bits. Binary quantization can make storage and first-stage search smaller or faster, but it discards information. Rerank binary candidates with the original continuous vectors when quality requires it.
The cosine query must use <=> to use vector_cosine_ops; L2 uses <-> with vector_l2_ops. Indexing each metric consumes space and write work. Build only metrics your application actually uses.
Predict first. Then use EXPLAIN (ANALYZE, BUFFERS) on an indexed, non-trivial table and confirm the intended index and ordering operator.
Given this embedding model documentation [paste excerpt] and these query/index definitions [paste SQL], identify the intended metric, pgvector operator, type-specific operator class, sort direction, and displayed score conversion. State every assumption and create a five-query verification matrix.
Verification contract: Confirm the answer against the model's primary documentation and an EXPLAIN plan; do not accept a metric chosen only because it is popular.