Repository navigation
Add Valkey as a vector store backend (using valkey-glide) #2519
MatthiasHowellYopp
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
I’d like to propose adding Valkey as a vector store backend for DocsGPT, using the official valkey-glide client and the Valkey Search module for vector similarity search.
Motivation
DocsGPT already has a clean, pluggable
BaseVectorStoreabstraction with several backends (Elasticsearch, MongoDB, LanceDB, FAISS, Qdrant, Milvus, pgvector). Valkey fits naturally into this pattern and offers a compelling option for users who want:Proposed approach
A new
ValkeyVectorStoreclass extendingBaseVectorStore, registered inVectorCreatoras"valkey".The implementation would:
valkey-glideas the client (the officially supported async-first client)FT.CREATEto define a vector index with HNSW or FLAT algorithm on aVECTORfield in a Hashsearch()viaFT.SEARCHwith KNN vector similarity, filtered bysource_idusing a TAG fieldadd_texts()using pipelinedHSETcalls for batch insertiondelete_index(),get_chunks(),add_chunk(),delete_chunk()following the same patterns as the MongoDB and Elasticsearch storesvalkey-glide(consistent with how other stores handle optional deps likepymongo)Configuration would follow the existing settings pattern — a
VALKEY_URLsetting (defaulting toredis://localhost:6379) and optional index name / algorithm settings.Prerequisites / notes
valkey/valkey-bundle(Docker) or a build with the search module. I’d document this clearly.tests/vectorstore/(using a mock/fake client, consistent with the existing test suite).Question for maintainers
Is there appetite for adding another vector store backend at this time?
Happy to submit a PR if this direction looks good. Let me know if you’d like me to scope it differently.
All reactions