Krionis Pipeline - multimodal RAG pipeline for low-compute, local, real-world deployment
Project description
Krionis Pipeline 1.0
Krionis Pipeline is a local-first Retrieval-Augmented Generation platform for controlled, auditable AI workflows. It is designed for secure and airgapped environments where teams need API-driven retrieval, human review controls, traceability, and a practical operator experience without depending on cloud infrastructure.
Backward compatibility is preserved:
import rag_llm_api_pipelinestill worksrag-clistill workskrionis-cliis available as the branded CLI entry point
What Is New In 1.0
- Mandatory HITL gating for flagged outputs
- Review queue persistence with original and final responses stored separately
- Append-only audit tracing across query, retrieval, generation, and signoff
- SQLite-backed result metadata for
GoodandBadfeedback plus review outcomes - API-driven index visibility and manual cache rebuild operations
- Split operator UX for control, telemetry, runtime, configuration, records, and review
- CPU-friendly quantized default model profile for local deployment
- Isolated generation worker to keep the API responsive during model load or failure
- Docker packaging for integrated platform deployment
- Expanded API documentation for custom frontend development
Core Capabilities
🔍 Retrieval-Augmented Generation (RAG)
- FAISS/HNSW vector indices
- SentenceTransformers embeddings
🧠 Flexible LLM Integration
- HuggingFace open-source models (Qwen, Mistral, LLaMA, etc.)
- Mixed precision: fp32, fp16, bfloat16
- Dynamic model/device/precision switching via YAML
🔧 1-line YAML Configuration
- System-specific documents
- Embedding & generation model selection
- CPU/GPU inference toggle
- Index rebuilding, token limits, chunking
📂 Multimodal Input Support
- PDFs
- Plain text
- Images (OCR via Tesseract)
- Audio (.wav)
- Video (.mp4)
💻 Multiple Interfaces
- CLI (
rag-cli/krionis-cli) for single-line querying - FastAPI-powered REST API for local serving
- Lightweight HTML Web UI for interactive search
Quickstart
Required Setup
Before starting the platform, make sure your working directory contains:
config/system.yamldata/manuals/
Install:
pip install krionis-pipeline
Build the retrieval index and start the API:
krionis-cli build-index --system TestSystem
uvicorn rag_llm_api_pipeline.api.server:app --host 127.0.0.1 --port 8000
Open:
http://127.0.0.1:8000/for the operator consolehttp://127.0.0.1:8000/api/docsfor the API referencehttp://127.0.0.1:8000/ui/reviewsfor the review queue
Installation
pip install krionis-pipeline
🛠️ Setup Instructions (Windows + Anaconda)
1. Create Python Environment
conda create -n rag_env python=3.10
conda activate rag_env
2. Install Dependencies
Via Conda (system-level tools):
conda install -c conda-forge ffmpeg pytesseract pyaudio
Via Pip (Python packages):
pip install -r requirements.txt
Ensure Tesseract is installed and in your system PATH. You can get it from https://github.com/tesseract-ocr/tesseract.
🚀 Usage
Please review the quickstart guide.
🐧 Setup Instructions (Linux)
1. Create Python Environment
python3 -m venv rag_env
source rag_env/bin/activate
Or with conda:
conda create -n rag_env python=3.10
conda activate rag_env
2. Install System Dependencies
sudo apt update
sudo apt install -y ffmpeg tesseract-ocr libpulse-dev portaudio19-dev
Optional: install language packs for OCR (e.g.,
tesseract-ocr-eng).
3. Install Python Packages
pip install -r requirements.txt
🔁 Running the Application on Linux
CLI
python cli/main.py --system TestSystem --question "What is the restart sequence for this machine?"
API Server
uvicorn rag_llm_api_pipeline.api.server:app --host 0.0.0.0 --port 8000
cURL Query
bash
curl -X POST http://localhost:8000/query
-H "Content-Type: application/json"
-d '{"system": "TestSystem", "question": "What does error E204 indicate?"}'
## 📚 How it Works
1. **Index Building**:
- Files are parsed using `loader.py`.
- Text chunks are embedded with MiniLM.
- FAISS index stores embeddings for fast similarity search.
2. **Query Execution**:
- User provides a natural language question.
- Relevant text chunks are retrieved from the index.
- LLM generates an answer based on retrieved context.
---
## 🧠 Model Info
- All models are open-source and run offline.
> You can replace with any local-compatible Hugging Face model.
---
## 🔐 Security & Offline Use
- No cloud or external dependencies required after initial setup.
- Ideal for OT environments.
- All processing is local: embeddings, LLM inference, and data storage.
---
## 📜 License
MIT License
---
## 📧 Contact
For issues, improvements, or contributions, please open an issue or PR.
## Documentation
The repository includes a documentation portal scaffold for developers building on top of the Krionis API.
- Interactive API docs: `/api/docs`
- ReDoc reference: `/api/reference`
- Static docs source: `docs/`
- Docs build config: `mkdocs.yml`
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
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 krionis_pipeline-1.0.0.tar.gz.
File metadata
- Download URL: krionis_pipeline-1.0.0.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a4f9584a7ab056c086e937e8c24f1e4ebb210567d0ee277c4834cde766cbf5
|
|
| MD5 |
3dd604b2060f2b8a4a58328b48c65004
|
|
| BLAKE2b-256 |
09d2bc891c7738e4f1464bd424ed2bfef00769e7c2ff4f1b89fa97699f07284d
|
File details
Details for the file krionis_pipeline-1.0.0-py3-none-any.whl.
File metadata
- Download URL: krionis_pipeline-1.0.0-py3-none-any.whl
- Upload date:
- Size: 69.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3e16a0e6ab8b870073e4bdc0aacee3cea1bb7fdd1ef5c5325e5213eea79abd0
|
|
| MD5 |
138a6e29cb6c3b0f36f8526eb4d7f68f
|
|
| BLAKE2b-256 |
9bb10871ab81af8f65ed523888673fc3d45de03b826f319f19dfabdfbe1b8f1a
|