Esfis

Blog · August 26, 2026 · 2 min read

Cascade retrieval, or why we run four searches instead of one

Vector search alone loses exact names and dates. Keyword search alone loses paraphrase. We run both, expand through the graph, and rerank. Here is what each stage buys.

The first version of Esfis recall was a single vector search. It was fast, it demoed well, and it failed on the questions people actually ask: when did Alex move, which supplier did we drop, what was the name of that restaurant.

Embeddings are good at meaning and bad at specifics. Names, dates, invoice numbers and street addresses all collapse into nearly the same region of the space. So we added stages.

The four stages

StageWhat it catchesTypical time
KeywordExact names, dates, identifiers3 ms
MeaningParaphrase, intent, related topics12 ms
GraphFacts one hop away through shared entities and time8 ms
RerankOrders the union and trims to the token budget20 ms

Each stage is deterministic given the store, and each one is inspectable with esfis recall --explain. You can see which stage surfaced each fact and why it ranked where it did.

Why the graph stage matters

Ask what should I cook for Friday and nothing in the question mentions Laura. But the calendar fact for Friday mentions Laura, and Laura has a fact about going gluten-free. The graph stage walks from the Friday fact to Laura to her diet in one hop, and the reranker keeps it because it is relevant to cooking.

Without that hop, the answer is a generic recipe. With it, it is the right recipe.

What the reranker does

The union of the first three stages is usually thirty to eighty candidates. A small cross-encoder scores each against the query, and we take the top results until the token budget is spent. The default budget is 800 tokens, which is enough for eight to twelve facts with their dates.

We tried skipping the reranker to save 20 ms. Recall on LongMemEval dropped nine points. It stays.

Numbers

On the four benchmarks we track, the cascade beats the raw context window on every one, using between 0.1 and 3 percent of the tokens. Full table on the research page. The failures are mostly temporal: questions about a fact that was superseded twice. That is the next thing we are working on.

Get new posts by email

One email a month. No tracking pixels.