Skip to content

Commit cb47694

Browse files
kfaracikclaude
andcommitted
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

__tests__/VectorStoreContext.test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jest.mock('../utils/embeddingModelMigration', () => ({
3232
migrateEmbeddingModelIfNeeded: jest.fn().mockResolvedValue(undefined),
3333
}));
3434

35-
jest.mock('../database/keywordIndex', () => ({
36-
ensureKeywordIndex: jest.fn().mockResolvedValue(undefined),
37-
}));
38-
3935
jest.mock('../utils/embeddingModel', () => ({
4036
isEmbeddingModelDownloaded: jest.fn().mockResolvedValue(true),
4137
}));

0 commit comments

Comments
 (0)