Dev.to
8/4/2026

Testing four retrieval strategies for a 312-doc personal knowledge DB in Claude Code
Original: Claude Code + 300 Docs: I Built a Personal Knowledge DB With 4 Retrieval Layers. 3 Broke.
Short summary
The author built a personal knowledge DB of 312 docs and tested four retrieval strategies with Claude Code. Pure vector search broke at 200 docs because short, topically dense documents produce degenerate embedding neighborhoods. BM25/FTS5 broke at 300 docs due to polysemy and imprecise queries. The winning approach combined keyword and vector search inside a Claude Code Skill, letting the tool handle retrieval while the LLM handles reasoning.
- •Vector search fails on short, topically dense docs — everything looks 0.78 similar
- •BM25 fails when queries are imprecise or terms are polysemous
- •Combined keyword+vector search inside a Claude Code Skill won, returning ranked candidates for the LLM to reason over
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



