Skip to content

Implement embedded vector search fallback via SQLite BLOB storage #741

@bug-ops

Description

@bug-ops

Parent: #740 (P0)

Problem

External vector database dependency complicates single-binary and edge deployment. When unavailable, system falls back to keyword-only search losing semantic capability entirely.

Solution

Implement in-process cosine similarity over SQLite BLOB storage as an alternative VectorStore backend:

  • Store embeddings as little-endian f32 BLOB arrays in SQLite
  • Compute cosine similarity in Rust at query time
  • Implement VectorStore trait for the new backend
  • Select backend via config: memory.vector_backend = "qdrant" | "sqlite"
  • Qdrant remains the production-grade option; SQLite-embedded enables zero-dependency mode

Affected crates

  • zeph-memory (new SqliteVectorStore implementing VectorStore trait)

Acceptance criteria

  • SqliteVectorStore passes all existing VectorStore trait tests
  • Hybrid search works identically with both backends
  • Config toggle between backends
  • Documentation updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions