diff --git a/.env.example b/.env.example index b8e833e..4a15e41 100644 --- a/.env.example +++ b/.env.example @@ -14,9 +14,9 @@ OLLAMA_BASE_URL=http://192.168.10.10:11435 # Retrieval defaults TOP_K=5 -# Neighbor Expansion for fixed_size only (ADR-0023); 0 = off -NEIGHBOR_PREV=0 -NEIGHBOR_NEXT=0 +# Neighbor Expansion for fixed_size only (ADR-0023); 3/3 = stabilized default after benchmark +NEIGHBOR_PREV=3 +NEIGHBOR_NEXT=3 # LLM generation parameters TEMPERATURE=0.0 diff --git a/CONTEXT.md b/CONTEXT.md index 988cedb..ca9490d 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -87,7 +87,7 @@ The configured catalog of Embedding Models the operator may assign to Boundary o _Avoid_: Model list, provider catalog, available embeddings **Neighbor Expansion**: -Query-time widening of retrieved context for the `fixed_size` Strategy only: for every top-k hit, also include a configurable number of previous and next chunks in document order within the same document. Neighbors are added on top of the top-k set (context may grow beyond k). The same chunk id appears at most once in the LLM context. Final LLM context is sorted by document order (`chunk_index`). Neighbors are not re-ranked as independent hits. Counts (`neighbor_prev` / `neighbor_next`) are set per Query or Experiment like `top_k`; defaults are `0`/`0` (off). Missing neighbors at document edges are skipped. Knobs are ignored for non-`fixed_size` Strategies. Dashboard labels Experiments with a compact `±P/N` badge (tooltip explains prev/next; muted when `fixed_size` was not in the run). Experiments list and Compare show these knobs; Compare warns when selected Experiments differ on Neighbor Expansion, Corpus Embedding Model, or Boundary Embedding Model (when recorded) so operators do not misread cross-run rankings. Distinct from how a Strategy cuts text at process time. +Query-time widening of retrieved context for the `fixed_size` Strategy only: for every top-k hit, also include a configurable number of previous and next chunks in document order within the same document. Neighbors are added on top of the top-k set (context may grow beyond k). The same chunk id appears at most once in the LLM context. Final LLM context is sorted by document order (`chunk_index`). Neighbors are not re-ranked as independent hits. Counts (`neighbor_prev` / `neighbor_next`) are set per Query or Experiment like `top_k`; benchmarker defaults are `3`/`3` (symmetric ±3 after Strategy finalization); `0`/`0` turns expansion off. Missing neighbors at document edges are skipped. Knobs are ignored for non-`fixed_size` Strategies. Dashboard labels Experiments with a compact `±P/N` badge (tooltip explains prev/next; muted when `fixed_size` was not in the run). Experiments list and Compare show these knobs; Compare warns when selected Experiments differ on Neighbor Expansion, Corpus Embedding Model, or Boundary Embedding Model (when recorded) so operators do not misread cross-run rankings. Distinct from how a Strategy cuts text at process time. _Avoid_: Context windowing, chunk padding, sliding window retrieval, adjacent chunk merge **Expansion Tree**: