Skip to content

[Question] B-2 Neighbor Enrichment: Confirm direction before implementation #538

@jlin53882

Description

@jlin53882

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

  1. BM25 vs Vector search: Should B-2 use bm25Search or vectorSearch to find neighbors? Each has different tradeoffs.

  2. Insertion point: MMR diversity (after applyMMRDiversity) vs. before MMR. Does the order matter for diversity vs. relevance?

  3. Gating mechanism: Should B-2 be gated behind a config flag, or always enabled?

  4. 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

  1. Maintainer confirms B-2 direction
  2. Maintainer answers the 4 open questions above
  3. Contributor submits implementation PR for B-2

We will not implement until we have confirmed direction from the maintainer team.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions