-
Notifications
You must be signed in to change notification settings - Fork 665
[Question] B-2 Neighbor Enrichment: Confirm direction before implementation #538
Description
B-2 Option: Full Retrieval Neighbor Enrichment — Seeking Confirmation
References: Issue #445 (B-2 Proposal), PR #529 (CLOSED), Issue #513
Context
Following the closure of PR #529 (BM25 neighbor expansion for reflection slices), we submitted a B-2 proposal on Issue #445 outlining a different architecture for neighbor enrichment.
This issue is to confirm the B-2 direction before any implementation work begins.
B-2 Proposal Summary
Instead of enriching reflection slices at load time, B-2 proposes enriching recall results at retrieval time:
hybridRetrieval()
→ vectorSearch + bm25Search
→ RRF fusion → noise filter → rerank
→ applyRecencyBoost → applyImportanceBoost
→ applyMMRDiversity
→ [INSERT: enrich recalled results with their BM25 neighbors]
→ return top-K results
Key advantages over B-1:
- Works for ALL queries, including fresh sessions (query text is always available)
- Architecture is simpler and more intuitive
- Doesn't depend on derived reflection slices existing
Open Questions for B-2
-
BM25 vs Vector search: Should B-2 use
bm25SearchorvectorSearchto find neighbors? Each has different tradeoffs. -
Insertion point: MMR diversity (after
applyMMRDiversity) vs. before MMR. Does the order matter for diversity vs. relevance? -
Gating mechanism: Should B-2 be gated behind a config flag, or always enabled?
-
Sharing code with B-1: B-1 and B-2 are different mechanisms. Should we share any code, or keep them fully separate?
Relationship to B-1
B-1 (PR #529) enriches derived reflection slices at load time. B-2 enriches recall results at retrieval time. They are complementary but not dependent.
Questions:
- Should we merge B-1 first, then build B-2 on top?
- Or should we focus only on B-2 and close B-1 as superseded?
Proposed Next Steps
- Maintainer confirms B-2 direction
- Maintainer answers the 4 open questions above
- Contributor submits implementation PR for B-2
We will not implement until we have confirmed direction from the maintainer team.