Conditional writes shipped

Hybrid Search

┌─{search.py,search.ts}────────┐
│ ┌──────────┐                 │
│ │   User   │                 │
│ │  Query   │                 │
│ └─────┬────┘                 │
│       ▼                      │
│ ┌─turbopuffer queries──┐     │
│ │ ┌────────────────┐   │     │
│ ├▶│ Vector Query 1 │───┤     │
│ │ └────────────────┘   │     │
│ │ ┌────────────────┐   │     │
│ ├▶│ Vector Query 2 │───┤     │
│ │ └────────────────┘   │     │
│ │ ┌────────────────┐   │     │
│ ├▶│  Text Query 1  │───┤     │
│ │ └────────────────┘   │     │
│ └──────────┬───────────┘     │
│            ▼                 │
│    ┌────────────┐            │
│    │ Rank Fuse  │            │
│    └─────┬──────┘            │
│          ▼                   │
│    ┌────────────┐            │
│    │  Re-Rank   │            │
│    └────────────┘            │
└──────────────────────────────┘

To improve search quality, multiple strategies can be used together. This is commonly referred to as hybrid search.

turbopuffer supports vector search and BM25 full-text search. Combining them produces semantically relevant search results (vectors), as well as results matching specific words or strings (i.e. product SKUs, email addresses, weighing exact keywords highly).

Keep search logic in {search.py, search.ts}. Use turbopuffer for initial retrieval to narrow millions of results to dozens for rank fusion and re-ranking.

To improve search results further, we suggest:

Follow
Blog