Git-like version control for RAG vector databases
Project description
Clamp - Version Control for RAG
Git-like versioning for vector databases. Rollback your knowledge base without losing data.
Install
pip install clamp-rag
Quick Start (CLI)
# Initialize Clamp
clamp init
# Track document versions
clamp ingest docs my_group "Added initial docs"
# View commit history
clamp history my_group
# Check current version
clamp status my_group
# Rollback to previous commit
clamp rollback my_group abc123
# List all tracked groups
clamp groups
Connection options:
clamp status my_group --host localhost --port 6333 --collection docs --db-path ~/.clamp/db.sqlite
Python API
from qdrant_client import QdrantClient
from clamp import ClampClient
qdrant = QdrantClient("localhost", port=6333)
clamp_client = ClampClient(qdrant)
# Ingest with versioning
commit = clamp_client.ingest(
collection="docs",
group="my_group",
documents=[{"text": "...", "vector": [...]}],
message="Initial version"
)
# Rollback
clamp_client.rollback(collection="docs", group="my_group", commit_hash=commit)
# View history
clamp_client.history(group="my_group")
How It Works
- Versions stored as separate points in Qdrant
- Metadata tracks commit hashes and active state
- Rollback = flip active flags (instant, no data movement)
- Local SQLite stores commit history
Status
⚠️ Early alpha. Qdrant only. Expect bugs.
Requirements
- Qdrant (local or cloud)
- Python 3.10+
License
MIT - see LICENSE for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clamp_rag-1.1.0.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
clamp_rag-1.1.0-py3-none-any.whl
(16.3 kB
view details)
File details
Details for the file clamp_rag-1.1.0.tar.gz.
File metadata
- Download URL: clamp_rag-1.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1df04128cee6f2e77a685a0c0f299d3b5a5f094fe711856255063371d2c538ef
|
|
| MD5 |
6a0c5305713053e1db7b6053b69228e4
|
|
| BLAKE2b-256 |
bffe7c1e64fcc6d833cda10819307e5be7d0901e3eb365d3ca8b5bb847536566
|
File details
Details for the file clamp_rag-1.1.0-py3-none-any.whl.
File metadata
- Download URL: clamp_rag-1.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fb88a62b26a3d41d42235cffc6a732e477a769caaee633bef1da5b1bd617423
|
|
| MD5 |
99392c0c910cd4c27fa76c9a6711db4f
|
|
| BLAKE2b-256 |
19e7b5ad0cc58ec5ec778724baf23558f8ff006f78bb32ecbd09cade8fd46a00
|