Skip to content

Memory overhaul: Qdrant vector store + fully-optimized nomic (256-dim MRL, prefixes, 8K-sized chunks) #161

Description

@jdmanring

Summary

Semantic memory has been running degraded (keyword fallback) on every platform
except macOS, because the ChromaDB service was only ever started by
start-macos.sh — Linux/Windows/FreeBSD had no vector store, and on FreeBSD
Chroma can't run at all (onnxruntime, no Docker). Fix it at the root by moving
the vector store to Qdrant and running nomic fully optimized.

Vector store: ChromaDB -> Qdrant (all platforms)

  • Single Rust binary; packaged on FreeBSD (qdrant + py312-qdrant-client); no
    onnxruntime, no Docker. fastembed is Qdrant's own embedding lib (matched stack).
  • Uniform lifecycle: the app starts/stops the Qdrant binary on ALL platforms.
  • Binary: download+pin latest for Linux/Win/mac; pkg on FreeBSD.
  • chromadb-client removed (hard); a thin VectorStore interface + QdrantVectorStore.
  • No data migration (nothing was being persisted).

Optimized nomic

  • Matryoshka truncation to 256-dim (from 768) in both backends (fastembed +
    llama.cpp), re-normalized. Qdrant collections are 256-dim. EMBEDDING_TRUNCATE_DIM.
  • Asymmetric prefixes search_query: / search_document: at the two encode
    call sites, applied identically by both backends.
  • Chunk size 2048 chars / 300 overlap (~512 tokens) — sized for nomic instead
    of all-MiniLM's 256-token fossil.

Validation

End-to-end on host (fastembed) and FreeBSD (llama.cpp): embed -> upsert -> search
-> recall; 256-dim quality vs 768; existing memory/RAG tests green.

Architecture: docs/dev/memory-architecture.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions