Skip to content

RAGMill

PyPI Python versions License: MIT CI

A lightweight, zero-config local pipeline for AI data ingestion, semantic chunking, embeddings, vector search, and retrieval-augmented chat.

Latest release: v0.4.1

pip install ragmill ships the full CLI, REST API, retrieval-augmented chat, and Pinecone/Qdrant backends. v0.4.0 adds spreadsheets, slides, HTML, CSV, and RTF (via the office extra) plus OCR for images and scanned PDFs (via the ocr extra); v0.4.1 fixes pip install ragmill[all] on clean machines. See the Changelog for everything new.

  • Offline by default

    No API keys, ever. Embeddings and chat run locally on your machine. Cloud backends are strictly opt-in.

  • Zero core dependencies

    pip install ragmill pulls in nothing. Everything else is an opt-in extra you add only when you need it.

  • Any folder → searchable knowledge base

    Point it at a directory of text, Markdown, PDF, DOCX, spreadsheets, slides, HTML, CSV, RTF — even images and scanned PDFs (OCR) — and get semantic search + grounded Q&A.

  • Swappable everything

    Local SQLite or Pinecone/Qdrant in the cloud. Local LLM or Gemini/OpenAI. One env var switches each.

What is RAGMill?

RAGMill turns a folder of documents into a searchable, question-answerable knowledge base. It runs the full Retrieval-Augmented Generation (RAG) pipeline end to end:

flowchart LR
    A[Documents<br/>txt md pdf docx<br/>xlsx pptx html csv rtf<br/>images/scans OCR] --> B[Ingest<br/>+ chunk]
    B --> C[Embed<br/>ONNX MiniLM]
    C --> D[(Vector store<br/>SQLite / Pinecone / Qdrant)]
    E[Question] --> F[Embed query]
    F --> D
    D --> G[Top-k chunks]
    G --> H[LLM answer<br/>local / Gemini / OpenAI]

By default the entire pipeline runs on your machine — a small ONNX embedding model and a local GGUF chat model download once (~1 GB total) to ~/.cache/ragmill/models, then never touch the network again.

30-second taste

pip install "ragmill[all]"
ragmill setup-chat               # one-time: install the local LLM
ragmill sync ./my_documents      # index a folder
ragmill chat                     # ask questions about it, in your terminal

Or from Python:

from ragmill import RAGEngine, SQLiteVectorStore
from ragmill.embeddings import EmbeddingModel
from ragmill.sync import sync_directory

engine, model, store = RAGEngine(), EmbeddingModel(), SQLiteVectorStore("kb.db")
sync_directory("./my_documents", engine, model, store)

qvec = model.embed(["how does chunk overlap work?"])[0]
for hit in store.search(qvec, top_k=3):
    print(round(hit["score"], 3), hit["metadata"]["filename"])

Where to next

License

RAGMill is released under the MIT License.