Skip to main content

Local private RAG pipeline — LangChain + Ollama + ChromaDB + NFS support

Project description

ZettaBrain RAG

Local private RAG pipeline — your documents, your hardware, zero cloud.


Install

pip install zettabrain-rag

Requires Python 3.10+ and Ollama.


One-time setup

1. Install Ollama and pull models

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b
ollama pull nomic-embed-text

2. Mount NFS share and build vector store

sudo zettabrain-setup

Prompts for NFS server IP and export path, mounts at /mnt/Rag-data, then builds the vector store automatically.

3. Start chatting

zettabrain-chat

Commands

Command What it does
sudo zettabrain-setup NFS mount wizard + auto vector store build
zettabrain-chat Start interactive RAG chat
zettabrain-chat --rebuild Rebuild vector store then chat
zettabrain-chat --debug Show retrieved chunks on every query
zettabrain-ingest Ingest documents without starting chat
zettabrain-ingest --file /path/to/file.pdf Ingest a single file
zettabrain-ingest --stats Show what's in the vector store
zettabrain-ingest --clear Wipe the vector store
zettabrain-status Show install paths and store statistics

Directory structure after install

/zettabrain/
├── nfs_setup.sh              ← NFS mount wizard (run via sudo zettabrain-setup)
└── src/
    ├── 03_langchain_rag.py   ← main RAG pipeline
    ├── 05_ingest_documents.py← ingestion utility
    ├── 01_chromadb_setup.py  ← diagnostic: verify ChromaDB
    ├── 02_embeddings_test.py ← diagnostic: verify embeddings
    └── zettabrain_vectorstore/  ← auto-generated, do not commit

Configuration via environment variables

export ZETTABRAIN_DOCS=/mnt/Rag-data          # documents folder (NFS mount)
export ZETTABRAIN_CHROMA=./zettabrain_vectorstore
export ZETTABRAIN_LLM_MODEL=llama3.1:8b
export ZETTABRAIN_EMBED_MODEL=nomic-embed-text
export ZETTABRAIN_CHUNK_SIZE=1500
export OLLAMA_HOST=http://localhost:11434

Supported document formats

.pdf .txt .md .docx


Hardware guide

RAM Model Notes
8GB llama3.2:3b Basic
16GB llama3.1:8b Recommended
32GB mistral-nemo:12b Better reasoning
Apple M3/M4 llama3.1:70b-q4 Excellent

License

MIT — © ZettaBrain

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zettabrain_rag-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zettabrain_rag-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file zettabrain_rag-0.1.0.tar.gz.

File metadata

  • Download URL: zettabrain_rag-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zettabrain_rag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea3d20e915e3299b426c077df2852380364b1215042c4fbc969eb8b207678b46
MD5 0e4dd60e3611827a386ccee282d5986c
BLAKE2b-256 557e5839f6cffcaf4e4004d8547facaa6e403a38afc745a4326a3d91ac774519

See more details on using hashes here.

File details

Details for the file zettabrain_rag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zettabrain_rag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zettabrain_rag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 687378e10195150c53caea089f559b574d2c96bd9c42addd2d12f5a65a579438
MD5 09dcf5ab5db0fccde24b9ae4d17bc0f0
BLAKE2b-256 fd1e21a3987cd6d9c1261df252a2dffdd925b75a96b2db13d22bfdde5a1ea615

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page