← All topics

Ecosystem & Advanced Topics · Topic 192

Time-weighted vector search (Recency bias)

Time-weighted (or recency-biased) vector search blends similarity with a time factor so that newer items are favored when relevance is comparable. Useful for news, feeds, and any domain where “fresh” content matters as much as semantic match.

Summary

  • Time-weighted (recency-biased) vector search blends similarity with a time factor so newer items are favored when relevance is comparable. Useful for news, feeds, and domains where “fresh” content matters. See sorting by metadata and vector query lifecycle.
  • Implementation: metadata filter + sort; score fusion (e.g. α * similarity + (1−α) * recency_score); two-phase (retrieve more, then re-rank with time). Store timestamp in payload/metadata. Trade-off: strong recency can hide older relevant items; tune α and decay per product. Pipeline: vector search → (optional filter by time) → fuse with recency score or re-rank. Practical tip: start with score fusion; tune α on a labeled set.

Implementation options

Implementation options: (1) Metadata filter + sort—run vector search, then sort by timestamp or filter by a time range and re-rank. (2) Score fusion—compute a combined score, e.g. α * similarity + (1−α) * recency_score, where recency_score decays with age (exponential or linear). (3) Two-phase—retrieve more candidates by vector, then re-rank with a model or formula that includes time. The VDB stores a timestamp (or TTL) in payload/metadata; scoring happens at query time or in a separate re-ranker.

Trade-offs

Trade-offs: strong recency bias can hide older but highly relevant items; too little bias may surface stale content. Tuning the weight (α) and the decay curve depends on the product. Some systems expose “recency boost” or “time decay” as a query parameter so clients can control the bias without changing the underlying vector query.

Pipeline: vector search → (optional filter by time) → fuse with recency score or re-rank. Practical tip: start with score fusion; tune α on a labeled set.

Frequently Asked Questions

What is time-weighted (recency-biased) vector search?

Blending similarity with a time factor so that newer items are favored when relevance is comparable. Useful for news, feeds, and any domain where “fresh” content matters as much as semantic match. See sorting by metadata and vector query lifecycle.

How do I implement recency bias?

Options: (1) Run vector search, then sort by timestamp or filter by time range and re-rank. (2) Score fusion: e.g. α * similarity + (1−α) * recency_score (decay with age). (3) Two-phase: retrieve more candidates by vector, then re-rank with a model or formula that includes time. Store timestamp in payload/metadata. See re-ranking.

What are the trade-offs?

Strong recency bias can hide older but highly relevant items; too little bias may surface stale content. Tuning the weight (α) and decay curve depends on the product. Some systems expose “recency boost” or “time decay” as a query parameter. See long-term memory and autonomous agents for agent use cases.

When is time-weighted search useful?

News, feeds, dashboards, and agent memory where recent events should rank higher. Combined with metadata filtering (e.g. date range) and re-ranking for full control. See RRF if merging multiple result lists.