Finding
The reranker's cost is strongly document-length dependent, measured in two places with the
same default configuration (jinaai/jina-reranker-v1-tiny-en, reranker_candidates=20,
reranker_max_document_chars=0 = unbounded):
- Short notes (golden ranking corpus,
test-int/semantic/test_reranker_latency.py):
~90 ms P50 overhead — comfortably interactive.
- Long conversation chunks (full LoCoMo run, 1,986 queries, basic-memory-benchmarks
main-rerank-off-long-r1 vs main-rerank-on-long-r1, 2026-08-11): p95 latency rose
from 420 ms to ~2.1 s — a ~5x p95 regression when documents are long transcript chunks
and the full ~100-candidate pool is scored.
Quality gain at those settings is real (#951 comment: overall R@5 +5.0pp, single_hop
+9.3pp), so this is about cost, not value.
Proposed work
- Sweep
reranker_max_document_chars (e.g. 0 / 1000 / 2000 / 4000) on the LoCoMo corpus:
measure quality (R@5/MRR per category) vs p95 latency per setting. The body-leads
document construction (build_rerank_document) means a modest cap should keep most of
the signal — verify that claim with data.
- If the sweep supports it, change the default from 0 (unbounded) to the best
quality-preserving cap, and document the tradeoff in docs/semantic-search.md.
- Optionally probe
reranker_candidates (20 vs 10) at the chosen cap for the
latency-sensitive path.
The measurement tooling already exists: the latency benchmark in test-int/semantic/ for
short-note numbers and basic-memory-benchmarks (run-rerank-comparison.sh pattern) for
the long-document corpus.
Acceptance
Refs: #1231 (harness + baseline numbers), #951 (quality results), #1143 (feature).
Finding
The reranker's cost is strongly document-length dependent, measured in two places with the
same default configuration (
jinaai/jina-reranker-v1-tiny-en,reranker_candidates=20,reranker_max_document_chars=0= unbounded):test-int/semantic/test_reranker_latency.py):~90 ms P50 overhead — comfortably interactive.
main-rerank-off-long-r1vsmain-rerank-on-long-r1, 2026-08-11): p95 latency rosefrom 420 ms to ~2.1 s — a ~5x p95 regression when documents are long transcript chunks
and the full ~100-candidate pool is scored.
Quality gain at those settings is real (#951 comment: overall R@5 +5.0pp, single_hop
+9.3pp), so this is about cost, not value.
Proposed work
reranker_max_document_chars(e.g. 0 / 1000 / 2000 / 4000) on the LoCoMo corpus:measure quality (R@5/MRR per category) vs p95 latency per setting. The body-leads
document construction (
build_rerank_document) means a modest cap should keep most ofthe signal — verify that claim with data.
quality-preserving cap, and document the tradeoff in docs/semantic-search.md.
reranker_candidates(20 vs 10) at the chosen cap for thelatency-sensitive path.
The measurement tooling already exists: the latency benchmark in
test-int/semantic/forshort-note numbers and
basic-memory-benchmarks(run-rerank-comparison.shpattern) forthe long-document corpus.
Acceptance
reranker_max_document_charschanged only if quality loss is negligible; thedecision and numbers documented either way
Refs: #1231 (harness + baseline numbers), #951 (quality results), #1143 (feature).