Rafael Arias Calles
  • About me
  • Articles
GitHubContact

Projects

Built by Rafael

rusty-brainAll projects
About meArticles
GitHubContact
Rafael Arias Calles

MLOps, inference systems, and Rust notes.

Explore

ProjectsArticlesAbout me

Connect

Contactrusty-brain

Elsewhere

GitHubLinkedIn

© 2026 Rafael Arias Calles. All rights reserved.

Articles/Architecture

Hybrid Recall: Vectors, FTS5 and Rank Fusion

Rafael Arias CallesRafael Arias CallesDecember 1, 2026
Hybrid Recall: Vectors, FTS5 and Rank Fusion

Table of content

  • Why ranks instead of scores

Share article

Vector search finds text with a similar meaning. Keyword search finds exact terms such as a function name or an error code. Agent memory benefits from both.

rusty-brain runs a cosine top-k search and an FTS5 search, then merges them with reciprocal rank fusion (RRF).

Why ranks instead of scores

A cosine similarity and a BM25 score are not on the same scale, so adding them needs calibration. RRF ignores raw scores. Each result earns 1 / (k + rank) from every list it appears in, and the sum decides the order:

score(doc) = sum over lists of 1 / (k + rank_in_list)

A memory that ranks well in both lists rises. One that appears in a single list can still surface. rusty-brain returns results in a deterministic order, with provenance.

Want to see what I’m building with Rust?

Explore the products, open-source tools, and engineering work behind these articles.

Explore my projects