🚀 Introduction
pilot-onpremise-rag is a CLI tool that implements a knowledge-based RAG (Retrieval-Augmented Generation) system with LLM. It provides powerful document retrieval and generation capabilities while ensuring data privacy.
🔧 Setup
Install pirag from PyPI
pip install pirag
Install pirag from source
git clone https://github.com/jyje/pilot-onpremise-rag
cd pilot-onpremise-rag
pip install --upgrade -e .
(Optional) Setup External Dependencies
git clone https://github.com/jyje/pilot-onpremise-rag
cd pilot-onpremise-rag
docker compose -f docker/compose.yaml up
📚 Usage
Basic Commands
# View help
pirag --help
# Train documents
pirag train --source ./documents
# Ask a question
pirag ask "Give me a joke for Cat-holic."
🏗️ Project Structure
pilot-onpremise-rag/
├── app/ # Main application directory
│ ├── main.py # CLI main entry point
│ ├── setup.py # Package setup configuration
│ ├── pyproject.toml # PEP 517/518 build configuration
│ ├── requirements.txt # Dependencies
│ ├── logs/ # Application logs
│ └── rag/ # RAG implementation
│ ├── config.py # Configuration settings
│ ├── agent.py # Agent implementation
│ ├── ask/ # Query handling module
│ ├── train/ # Document training module
│ ├── test/ # Testing module
│ └── doctor/ # Diagnostic tools
├── VERSION # Project version
├── docker/ # Docker configuration
├── assets/ # Static assets (Files are not included)
└── LICENSE # License information
🔄 How It Works
- Document Training: Process local documents and store in vector database
- Search Engine: Find document chunks related to user queries
- Context Generation: Create LLM prompts from retrieved documents
- Response Generation: Provide accurate responses via local LLM
💡 Key Features
- Privacy Guaranteed: All data and processing occurs locally
- Multiple Document Support: Support for PDF, Markdown, TXT, DOCX, and other formats
- Custom LLM: Compatible with various local LLM models
- Vector Database: Vector DB integration for efficient document retrieval
🧪 Performance Optimization
| Configuration | Memory Usage | Response Speed | Suitable Use Cases |
|---|---|---|---|
| Light Model | 4-6GB | Fast | Simple queries, low-spec hardware |
| Medium Model | 8-12GB | Medium | General use, most queries |
| Large Model | 16GB+ | Slow | Complex document analysis, expert answers |
🔗 References
Contributing
Any contributions are welcome!
Current Maintainers
Metadata
Release files for pirag 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pirag-0.2.2.tar.gz | 14.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pirag-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.9 kB
Release files / pirag-0.2.2.tar.gz
| Download URL | pirag-0.2.2.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69a07a2359549243c7d826c4828e32de449774ccae40a1e5877f10f4b319f58c
|
|
BLAKE2b-256 checksum How to use checksums |
1413efd62cdee4172f76c9057eda381bdef4267795be843d87e3713d60ef3bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2025.
Transparency logRelease files / pirag-0.2.2-py3-none-any.whl
| Download URL | pirag-0.2.2-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a031f055ed32cbff9236388e79446f4962f6bbbf871fedb7e8fe8bcbcfe1ca4e
|
|
BLAKE2b-256 checksum How to use checksums |
30f0c885764e59613cf119f3459cd8989377dd916a78aa9fa970a40c99d549e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2025.
Transparency logSecurity for pirag 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pirag-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.