A lightweight, zero-config local pipeline engine for AI data ingestion, semantic chunking, embeddings, and vector search.
Project description
RAGMill
A lightweight, zero-config local pipeline engine for AI data ingestion, semantic chunking, embeddings, and vector search.
Install
pip install ragmill[all] # includes PDF + DOCX + embeddings support
# or
pip install ragmill # core only (txt/md), zero dependencies
Developing locally instead? Clone the repo and use an editable install:
pip install -e ".[dev]"
pytest tests/ -v
Usage
Ingest + chunk
from ragmill import RAGEngine
engine = RAGEngine(chunk_size=500, overlap=50)
chunks = engine.execute_pipeline("./my_documents")
for chunk in chunks:
print(chunk["metadata"]["filename"], chunk["content"][:80])
Supports .txt, .md, .log, .rst, .pdf, and .docx out of the box.
Embed + search locally
Requires the embeddings extra (pip install -e ".[embeddings]"). The model
(a quantized MiniLM ONNX export, ~23MB) downloads once to
~/.cache/ragmill/models and runs fully offline after that.
from ragmill import RAGEngine
from ragmill.embeddings import EmbeddingModel
from ragmill.vector_store import VectorStore
chunks = RAGEngine().execute_pipeline("./my_documents")
model = EmbeddingModel()
vectors = model.embed([c["content"] for c in chunks])
store = VectorStore("my_documents.db") # or VectorStore() for in-memory
store.add(chunks, vectors)
query_vector = model.embed(["how does the overlap window work?"])[0]
for result in store.search(query_vector, top_k=3):
print(round(result["score"], 3), result["metadata"]["filename"], "->", result["content"][:80])
Filter a search to a specific file or a time window:
store.search(query_vector, top_k=3, filename="report.pdf")
store.search(query_vector, top_k=3, modified_after=1704067200.0) # since 2024-01-01
Keep a store in sync with a folder
Re-embedding every file on every run is wasteful once a folder is large.
sync_directory tracks a content hash per file and only touches what
actually changed:
from ragmill.sync import sync_directory
result = sync_directory("./my_documents", engine, model, store)
print(result) # {"added": 2, "updated": 1, "skipped": 40, "deleted": 1}
Unchanged files are skipped without re-embedding. A changed file has its old chunks replaced with new ones. A file removed from disk has its chunks removed from the store on the next sync.
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
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
File details
Details for the file ragmill-0.2.0.tar.gz.
File metadata
- Download URL: ragmill-0.2.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40ad83fd70ce60c5223261cad7515f4ff497f754720ad14477a8333ee4e4cb26
|
|
| MD5 |
e702e195bbefd4bcaf758d26fcd49bd0
|
|
| BLAKE2b-256 |
1557073d0d81b0fca09032c043ce9ca445b096cca04fc33714a70602a457fcbe
|
Provenance
The following attestation bundles were made for ragmill-0.2.0.tar.gz:
Publisher:
publish.yml on Abdullahbinaqeel/RAGMill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragmill-0.2.0.tar.gz -
Subject digest:
40ad83fd70ce60c5223261cad7515f4ff497f754720ad14477a8333ee4e4cb26 - Sigstore transparency entry: 2084277149
- Sigstore integration time:
-
Permalink:
Abdullahbinaqeel/RAGMill@ab342c0ce0875ca5159a01da66e3cbc9d1b1f231 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Abdullahbinaqeel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab342c0ce0875ca5159a01da66e3cbc9d1b1f231 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ragmill-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ragmill-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e21821a28d2d8e5d848baa4938d0daec15693220726a8e24e95ed9ce90897dc
|
|
| MD5 |
26029f193adf66c2f0bab7566fb12642
|
|
| BLAKE2b-256 |
e4df2118e422a50ad100d9eb20576103847bf45132e1fe65bc4b690f9fe79631
|
Provenance
The following attestation bundles were made for ragmill-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Abdullahbinaqeel/RAGMill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragmill-0.2.0-py3-none-any.whl -
Subject digest:
8e21821a28d2d8e5d848baa4938d0daec15693220726a8e24e95ed9ce90897dc - Sigstore transparency entry: 2084277153
- Sigstore integration time:
-
Permalink:
Abdullahbinaqeel/RAGMill@ab342c0ce0875ca5159a01da66e3cbc9d1b1f231 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Abdullahbinaqeel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab342c0ce0875ca5159a01da66e3cbc9d1b1f231 -
Trigger Event:
release
-
Statement type: