turbopuffer

@turbopuffer.bsky.social

{vector, full-text} search engine built on object storage. fast, cheap, trillion scale. powers Anthropic, Harvey, Notion, Cognition, and more

Mem0 migrated 400M+ agent memories from pgvector to turbopuffer, solving a semi-selective filtering problem that spiked tail latencies in Postgres → 150k+ isolated search indexes → 70ms p90 hybrid retrieval latency → 97% vector recall@10 tpuf.link/mem0

Mem0 migrates 400M+ agent memories from pgvector to turbopuffer

Postgres didn't scale for Mem0's agent memory platform. They migrated hundreds of millions of memories to turbopuffer, reducing end-to-end latency by 70x.

tpuf.link

autoscaling is deceptively hard our indexer fleet scales nodes on job queue time. if a queue suddenly went quiet, we'd scale down too hard & new jobs could queue up waiting for nodes to claim them we tweaked the HPA signal to prevent underprovisioning → ~2x shorter queue time

Bild

tpuf quantizes vectors to improve perf (RaBitQ) the algo randomly rotates vectors, and we were using matmul at O(d²) space & time, brutal at high dims. 10k = 400MB in RAM! we rebuilt the rotation using FWHT at O(d) space & O(d log d) time. ~no recall loss, 10k = only 5kB in RAM

Bild

filtered counts on tpuf just got much faster our ANN index may replicate docs across clusters for better recall, so we had to dedupe matching IDs (slow) now, we store a bitmap of replica positions so the query plan is pure bitmap ops: (filter_bitmap - replica_bitmap).popcnt()

Bild

BM25 efficiently scores text, but relevance often depends on more than text (recency, popularity, PageRank) we score non-text attributes as clauses in the same MAXSCORE plan that evaluates BM25 → better first-stage relevance, still scales to 100M+ tpuf.link/rank-by-attr

Mixing non-text attributes into text search for better first-stage relevance

turbopuffer now allows you to combine attribute values into the scoring function of text queries. Ranking by attribute helps achieve better relevance in the first-stage with the same scalability characteristics as BM25.

tpuf.link

stemming is what makes a text search for "run" match documents containing "running" or "runs" we just shipped a small stem cache so repeated terms skip the stemmer → ~2x tokenization throughput when stemming is enabled

Bild