NilsBriggen
|
fc24c0875d
|
feat(phase1): on-device semantic recall — embeddings, vector search, hybrid ranking
CI / test (push) Successful in 17s
CI / build-apk (push) Has been skipped
CI / deploy-web (push) Successful in 27s
Exam-time search over your own lectures, 100% on-device (vectors never leave it):
- EmbeddingEngine (transformers.js feature-extraction via the CDN loader,
multilingual-e5-small 384-dim, e5 query/passage prefixes); native stub.
- Vector store in StorageRepo (Dexie v3 + native v3 segvecs): upsertVectors,
brute-force cosine searchVectors (course-scoped), clearVectors, unembeddedIds.
Cascades: re-embed on segment edit, reassign updates vector courseId, deletes cascade.
- Hybrid search: semantic candidates + lexical rank fused via reciprocal-rank-fusion
(pure, tested); searchLectures() returns segment hits tagged semantic/lexical/both.
- embeddingStore: build-index/backfill with progress + embed-on-save (fire-and-forget).
- Search screen: query -> segment hits (snippet · course · time) -> tap jumps the
transcript to that timestamp (seek + scroll-into-view). Per-course stats on Courses.
25 repo tests (incl. cosine ranking + course scoping), 13 search tests, 170 total green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-14 14:48:03 +02:00 |
|