Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The reranker

A cross-encoder can re-score the top results by reading the query and each passage together. memo-mcp ships one as an opt-in experiment:

SettingValue
Modelcross-encoder/ms-marco-MiniLM-L6-v2 (Apache-2.0, ~91 MB), id ms-marco-minilm
EnableMEMO_RERANK=1 (server and UI), or search --rerank (CLI)
Choose anotherMEMO_RERANKER=<id>
Used byProfiles with rerank on: precise, which re-scores the top 30

Why it is off by default

It failed its promotion gate. In the bake-off it lowered nDCG@10 by about 0.2 and added 0.7 to 4 seconds per query:

EmbedderCorpusdefault nDCG@10precise + rerank nDCG@10p50 ms
minilmnotes0.9770.732806
minilmkb0.8820.7242,333
granite-small-r2notes0.9780.6763,987

The pure-Go pipeline cannot pass sentence-pair segment ids, so the model’s scores are compressed near zero. Details: spike S8.

If you try it

MEMO_RERANK=1 MEMO_PROFILE=precise memo-mcp ui

Watch memo_search_rerank_duration_seconds and the trace’s rerank{model, top_n, latency_ms}. If the reranker fails to load, the server continues without it. Search then reports degraded with reason reranker_failed.