ENGINEERING · June 6, 2026 · 8 min read

Inside the WDBX Hybrid Ranker: Four Factors, One Score

Semantic similarity is only the first of four factors. Here is the exact score WDBX uses to rank retrieval candidates — and why every factor is bounded to [0,1].

By MLAI Research · WDBX Core

Plain top-k vector search answers one question: what is closest to the query in embedding space? That is a fine question, and a poor stopping point. A record can be a near-perfect semantic match and still be the wrong thing to retrieve — because it is two years stale, because it sits far from the query in the causal graph, or because the active persona should not be weighting it heavily.

The WDBX hybrid ranker, which companions our paper on the weighted-backtrace store, answers the harder question by combining four independent factors into a single bounded score. This note walks through that score the way you would read it during an incident review.

The four factors

Every candidate j is ranked by the product of four terms, each living in the unit interval. Because they multiply, any one factor collapsing toward zero pulls the whole score down — there is no averaging away a fatal weakness:

  • σ — semantic similarity (cosine distance between query and candidate, via a SIMD path with a deterministic CPU fallback).
  • τ — temporal weight (exponential recency decay).
  • γ — causal weight (proximity along the backtrace graph).
  • π — persona weight, supplied by the router for the active profile.
s_{ij} \;=\; \sigma_j \,\cdot\, \tau_j \,\cdot\, \gamma_j \,\cdot\, \pi_j

Recency and relatedness, written down

Recency is an exponential half-life decay: a record's temporal weight halves every t½, clamped so future-dated records cannot exceed one. Causal weight decays with the number of graph hops h between the query focus and the candidate, but bottoms out at a floor so unrelated records are down-weighted, not erased:

\tau_j \;=\; \max\!\Big(0,\ \min\!\big(1,\ 2^{-(t_0 - t_j)/t_{1/2}}\big)\Big)
\gamma_j \;=\; \max\!\big(c_{\mathrm{floor}},\ c_{\mathrm{decay}}^{\,h_j}\big), \qquad c_{\mathrm{decay}} = 0.6,\ c_{\mathrm{floor}} = 0.25

Why a product beats a weighted sum

A weighted sum lets a high score on one axis paper over a near-zero on another — exactly the failure that produces confident, stale, off-topic retrievals. The product makes each factor a veto: low semantic support, ancient timestamps, or distant causal paths each independently sink the rank. That is the behaviour you want from a store whose whole point is to be defensible after the fact.

And because the factors are stored alongside the rank, the ranker is its own explanation. You never have to reconstruct why a record surfaced — the four numbers that decided it are right there in the trace.