A user found that the default memory handling in the local Claude Code setup significantly underperformed when answering questions about their personal work. By implementing a custom recall hook that selectively attaches only relevant memory snippets (up to 2,400 characters) to each prompt, accuracy improved from 7 out of 45 correct answers to 32 out of 45. This hook utilizes a local embedding model (BGE M3-Embedding) and keyword search for better context retrieval, outperforming the default index which primarily links to files rather than providing direct facts. AI
IMPACT Demonstrates how improved memory retrieval can significantly boost the performance of local LLM setups for specific tasks.
RANK_REASON User-developed tool/hack improving an existing local LLM setup.
- BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation
- Claude Code
- Mac
- MacBook
- MEMORY.md
- MLX
- Ollama
- Opus
- Sonnet
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →