WhollySoftware
Back to blogAI

AI-Powered Search Ranking: Blending Relevance with Recency

Wholly Software TeamMay 30, 20256 min read
AI-Powered Search Ranking: Blending Relevance with Recency

For a media client's internal search over their content archive, we started with a straightforward semantic search: embed the query, retrieve nearest neighbors by cosine similarity, return the top results. Relevance was good in isolation, but editors complained that outdated articles on evergreen-sounding topics kept outranking more recent, more accurate pieces, because semantic similarity has no concept of time.

We added a recency component to the ranking score, but our first version — a flat exponential decay applied uniformly to every query — caused the opposite problem: breaking news queries worked great, but searches for genuinely evergreen reference material started burying the authoritative older piece under thinner recent content that happened to mention the topic. Time relevance isn't uniform across query types.

The fix was query-dependent decay. We trained a lightweight classifier on query embeddings to estimate how time-sensitive a query likely was, using signals like whether the query matched patterns typical of breaking-news searches versus reference lookups, and used that score to set the decay rate per query rather than globally. Time-sensitive queries got aggressive recency weighting; reference queries got almost none.

We also had to tune the blend separately per content type, not just per query. A press release from two years ago is often just stale, but a two-year-old technical explainer can still be the best answer. We added a content-type multiplier on top of the query-level decay, calibrated against about 300 manually judged query-result pairs the client's editorial team labeled for us.

Final ranking score ended up being a weighted combination of semantic similarity, query-dependent recency decay, and content-type multiplier, re-tuned against the labeled set whenever we changed any component. Editor-reported relevance complaints dropped by roughly half in the following quarter. The lesson: recency isn't a single global knob, it's a function of what the query is actually asking for.

SearchRankingEmbeddingsAI
AI-Powered Search Ranking: Blending Relevance with Recency — Wholly Software