Skip to content

v1.3.41

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Jun 15:14
· 38 commits to main since this release
0c8132a
Add neighbor expansion for contiguous RAG context (X19 Stage 3) (#324)

Pulls chunks adjacent to each retrieval hit into the RAG context for contiguous reading.

- VectorIndex.ExpandNeighbors: chunk_index ± radius within the same file, bounded to the hit's section (else page), clamped at file edges, merged into contiguous runs ordered by hit rank. Neighbors hydrate from stored text (no embedding, no reindex).
- RetrievalResult.IsNeighbor flags context chunks (no score, excluded from topK).
- RagPromptBuilder budgets hit-first: matched chunks claim the budget before neighbors, which stay adjacent and are never shown alone.
- PortableConfig.RetrievalNeighborRadius (default 1, 0 = off); ChatService expands after retrieval.

Eval stays retrieval-only (expansion is context delivery, not ranking), so the 0.90 baseline is unaffected; expansion is covered by unit tests.

PR2 of X19; completes the hybrid retrieval overhaul.