Skip to content

perf(search): BM25 hop latency gating/caching (pending #431 eval measurement) #439

Description

@HumanBean17

Open question #3 follow-on from #431 (fork B). Design ref: docs/superpowers/specs/active/2026-07-12-hybrid-bm25-rrf-design.md.

Why

#431 ships the BM25 hop as always-on (unconditional) and measures its latency in the eval rather than pre-emptively gating. If that measurement shows material per-search cost, this issue tracks the mitigation.

Scope (pick only if measurement warrants)

  • Query-shape gating: skip the BM25 hop for pure-natural-language prose queries unlikely to benefit.
  • BM25-result caching for repeated/identical queries.
  • Re-measure after mitigation.

Why deferred from #431

#431 measures first; we do not add complexity before the eval justifies it. The QUERY_FTS_INDEX hop is a DB-side indexed query comparable to the existing graph-expand hop, expected to be cheap.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions