Commit cb47694
refactor(rag): reduce retrieval to a vanilla vector baseline
Split the PR so this branch carries only what a working RAG needs: on-demand
embedding model, source schema + legacy/incompatibility migration, attach →
chunk → embed, vector-only retrieval (top-K by cosine + per-file cap +
neighbor expansion), context assembly, answer-time citation attribution and
the sources UI.
Everything that improves retrieval quality moves to a stacked follow-up
branch: keyword (FTS5/BM25) indexing, RRF fusion, MMR, adaptive-k, term
coverage, and Polish no-answer detection. hybridRetrieval/rankFusion/
keywordIndex and their tests are removed here; messageSources now calls the
vanilla retrieve().
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 661e289 commit cb47694
16 files changed
Lines changed: 49 additions & 1373 deletions
File tree
- __tests__
- constants
- context
- database
- store
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
| |||
0 commit comments