Retrieval & ranking
Cosine Similarity
A score from -1 to 1 measuring how closely two vectors point in the same direction.
Cosine similarity is the specific calculation most retrieval systems use to score how alike two embeddings are. It measures the angle between the vectors, returning a value from -1 to 1, where 1 means they point the same way (very similar meaning) and 0 means they are unrelated. It is the number behind 'this passage matches this query'.
You will not compute it yourself for third-party engines, but it is worth knowing because it demystifies retrieval: relevance is a geometric score, not a human judgement. Content that clearly expresses one idea produces a vector that scores high against the queries about that idea and low against everything else.
The lesson is precision — a passage that tries to cover five ideas at once has a muddier vector and a lower cosine match to any single query than five focused passages would.
Related terms
Semantic Similarity
How close two pieces of text are in meaning, measured by comparing their embeddings.
Vector Embedding
A list of numbers that encodes meaning so related content sits close in vector space.
Passage Embedding
A numeric vector that captures a passage's meaning so similar passages sit near each other.
Chunk Retrieval
Fetching the top few most relevant text passages from a vector index for a query.
Retrieval-Augmented Generation
Fetch relevant documents first, then have an LLM write an answer grounded in them.
Want to know where you stand in AI answers?
We’ll show you which engines cite you, and which don’t.
Get a free AI citation audit