Skip to main content

MKT Link Media

By Mollie Thayer, MKT Link Media

I get some version of this question a lot now: “So there’s a score that decides if my content gets cited — what is it, and how is it calculated?”

The honest answer is that there isn’t one score. There are several, calculated at different stages, by different math, measuring different things. If you’re going to optimize for AI search, I think it’s worth knowing which score you’re actually trying to influence at each step — because the thing that improves a retrieval score isn’t always the thing that improves a reranking score.

Here’s how I break it down.

Stage 1: Getting Into the Candidate Pool

Before anything gets reranked or cited, it first has to be retrieved. Most modern systems retrieve candidates using two different methods in parallel, and each produces its own score.

The Keyword Score: BM25

The older of the two is a sparse retrieval score, and the version almost everyone actually uses is called BM25 (short for “Best Matching 25” — it’s the 25th iteration of a scoring formula developed in information retrieval research).

BM25 is a more sophisticated descendant of straightforward keyword matching. It scores a document against a query based on three main factors:

  • Term frequency — how often the query terms appear in the document (with diminishing returns, so a term appearing 20 times doesn’t score 20x higher than a term appearing once)
  • Inverse document frequency — rare, distinctive terms count for more than common ones. A query term that appears in nearly every document in your index tells the system very little; a term that appears in only a handful of documents is a strong signal.
  • Document length normalization — a term match in a short, focused passage counts for more than the same match buried in a sprawling page, so BM25 doesn’t just reward longer documents for statistically containing more matches.

BM25 doesn’t understand meaning. It doesn’t know that “roof inspection” and “evaluating roof condition” are related concepts. What it’s very good at is precision matching — exact terms, model numbers, specific phrases, error codes, brand names. That’s why it’s still in the mix even in AI-native systems.

The Semantic Score: Cosine Similarity

The second retrieval method is dense retrieval, and the score it produces is usually called a similarity score, most often calculated as cosine similarity between two vector embeddings.

Here’s the mechanism: an embedding model converts your query into a long list of numbers (a vector) representing its meaning in a high-dimensional space. It does the same thing to every chunk of content in the index, ahead of time, so those document vectors are precomputed and stored. At query time, the system compares the query’s vector to each document’s vector and measures the angle between them. A smaller angle (a value closer to 1) means the two are pointing in a more similar semantic direction — the content is conceptually close to the query, even if it doesn’t share exact wording.

This is the mechanism that lets a page about “assessing storm damage on a commercial roof” get retrieved for a query like “roof inspection after a hailstorm,” despite minimal word overlap. It’s also the piece that most directly rewards the semantic coherence I’ve written about before — a chunk that stays tightly focused on one concept produces a cleaner, more distinct vector. A chunk that wanders across five topics produces a blurrier vector that sits in a kind of no-man’s-land between concepts, and matches everything a little and nothing precisely.

Combining the Two: Reciprocal Rank Fusion

BM25 and cosine similarity produce scores on completely different, incompatible scales, so you can’t just average them together. The standard solution is called Reciprocal Rank Fusion (RRF).

Instead of trying to reconcile the two scoring scales, RRF ignores the raw scores entirely and works off of rank position. If your content is the #3 result in the BM25 list and the #7 result in the vector similarity list, RRF combines those two rank positions (using a formula that gives diminishing weight to lower ranks) into a single fused score. A constant — commonly 60 — is added to each rank before inverting it, which softens the impact of any single ranking and keeps one method from dominating the fused result.

The upshot: to score well on fusion, your content generally needs to place reasonably well on both lists, not dominate one and disappear from the other. That’s a good argument for writing pages that are simultaneously exact-match relevant (BM25) and conceptually clear (cosine similarity), rather than optimizing for one at the expense of the other.

Stage 2: Reranking

Fusion produces a shortlist — usually somewhere between 20 and 200 candidates — but that shortlist still hasn’t been evaluated very precisely. Retrieval scores are cheap to compute at scale, which means they’re intentionally approximate. Reranking is the expensive, precise pass that happens on a much smaller set of candidates.

The Reranking Score: A Cross-Encoder Relevance Score

The model that does this is called a cross-encoder, and the score it produces is generally just called a relevance score — typically normalized to a range of 0 to 1, with 1 meaning highly relevant.

The mechanical difference from cosine similarity matters a lot here. In retrieval, the query and the document are embedded separately, ahead of time, and only compared at the end. In reranking, the cross-encoder reads the query and the document together, in a single pass, so the model can directly attend to how specific words and phrases in the query relate to specific words and phrases in the document. Providers describe this as capturing “fine-grained relevance” — it can pick up on subtle interactions between query intent and document content that two independently-computed vectors would miss.

This is also why reranking can’t be precomputed the way vector embeddings can. Every query-document pair requires a fresh comparison, which is precise but computationally expensive — one more reason it’s only run on the shortlist that survives fusion, not the whole index.

What the Cross-Encoder Is Actually Weighing

A cross-encoder isn’t asking “does this document belong to the same general topic as the query.” It’s asking something closer to “if I only had this one passage to answer this one question, how well would it work.” That’s a meaningfully higher bar than topical relevance, and it’s the stage where demonstrated expertise and direct, specific answers tend to separate themselves from generic coverage — a passage with genuine specificity gives the model something concrete to match against the query, where a vague summary doesn’t.

Putting the Whole Pipeline Together

Stage Score name What it measures Computed how
Sparse retrieval BM25 score Keyword/term match strength Term frequency, rarity, doc length
Dense retrieval Cosine similarity Semantic closeness Angle between query and doc vectors
Fusion RRF score Combined rank across both lists Reciprocal of rank + constant
Reranking Relevance score Fine-grained query-document fit Cross-encoder, joint encoding

My Take

None of these scores are things you can directly see or optimize against — you don’t get a BM25 number back from Google or ChatGPT the way you might check a PageSpeed score. But understanding what’s being measured at each stage changes what “optimization” actually means.

It means writing content that’s precise enough to score well on exact terms (BM25), coherent enough to produce a clean semantic signal (cosine similarity), and specific enough to hold up when a model reads it side-by-side against a real question (the reranking score). Those aren’t three separate tasks requiring three different pages. In my experience, they’re mostly satisfied by the same thing: tightly scoped, expertise-driven content that answers one question well instead of many questions vaguely.

The score changes at every stage of the pipeline. What consistently scores well across all of them doesn’t.

References

  1. Pinecone. Rerankers and Two-Stage Retrieval. pinecone.io/learn/series/rag/rerankers
  2. Pinecone. Introducing Pinecone Rerank V0. pinecone.io/blog/pinecone-rerank-v0-announcement
  3. Nogueira, R. & Cho, K. Passage Re-ranking with BERT (cross-encoder scoring, as summarized in ToolRerank: Adaptive and Hierarchy-Aware Reranking for Tool Retrieval). arxiv.org/pdf/2403.06551
  4. TianPan.co. Cross-Encoder Reranking in Practice: What Cosine Similarity Misses. tianpan.co/blog/2026-04-19-cross-encoder-reranking-cosine-similarity