Skip to content
Research

How does one find top k embedding vectors such that they are similar to one particular vector and dissimilar to another?

AI Stack ExchangeAnalysis or commentary·
AI brief

A question on AI Stack Exchange asks how to find the top k embedding vectors that are similar to one vector A and dissimilar to another vector B, proposing a scoring function that subtracts the cosine similarity to B from the cosine similarity to A.

Written by AI from AI Stack Exchange's published text.

Source

“Given vector A and vector B, which would be the better approach for getting top k embedding vectors such that they are similar to embedding vector A and dissimilar to vector B.”
AI Stack Exchange, 15 Sept 2026, 22:08.

Interpretation or community commentary rather than straight reporting.

Read original story ↗