CLI Projects of On-Premise RAG. You can use your own LLM and vector DB. Or just add remote LLM servers and vector DB.
Project description
๐ 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
(Optional) Setup External Dependencies
git clone https://github.com/jyje/pilot-onpremise-rag
cd pilot-onpremise-rag
docker compose -f docker/compose.yaml up
Install pirag from source
git clone https://github.com/jyje/pilot-onpremise-rag
cd pilot-onpremise-rag
pip install --upgrade -e .
Install pirag from PyPI
pip install --upgrade pirag
๐ 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
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 pirag-0.1.5.tar.gz.
File metadata
- Download URL: pirag-0.1.5.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5109693946a6c49798ba421a0444239cc23d81c4917cf96faf23f8cedaeb0eb2
|
|
| MD5 |
ab535a756a8962a730d6697ee85d6d63
|
|
| BLAKE2b-256 |
a855a9de231cfa4862ad24a7c512fd10c488a83251e3cfb1dcef968b714e2838
|
Provenance
The following attestation bundles were made for pirag-0.1.5.tar.gz:
Publisher:
build-and-publish.yml on jyje/pilot-onpremise-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pirag-0.1.5.tar.gz -
Subject digest:
5109693946a6c49798ba421a0444239cc23d81c4917cf96faf23f8cedaeb0eb2 - Sigstore transparency entry: 199641527
- Sigstore integration time:
-
Permalink:
jyje/pilot-onpremise-rag@0234166d3e47961228fef3784bb12684c99d0583 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/jyje
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@0234166d3e47961228fef3784bb12684c99d0583 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pirag-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pirag-0.1.5-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6c6f824667c30b190e2ede254c0a6ded444beaf35d5e31078aa7e2256dd1ecc
|
|
| MD5 |
d7a694b58fd5dbed703cfabecb60be97
|
|
| BLAKE2b-256 |
79bf35187865c4c232e105c5286d63c3f65016afc4005c532ad2e9face19bb87
|
Provenance
The following attestation bundles were made for pirag-0.1.5-py3-none-any.whl:
Publisher:
build-and-publish.yml on jyje/pilot-onpremise-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pirag-0.1.5-py3-none-any.whl -
Subject digest:
d6c6f824667c30b190e2ede254c0a6ded444beaf35d5e31078aa7e2256dd1ecc - Sigstore transparency entry: 199641528
- Sigstore integration time:
-
Permalink:
jyje/pilot-onpremise-rag@0234166d3e47961228fef3784bb12684c99d0583 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/jyje
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@0234166d3e47961228fef3784bb12684c99d0583 -
Trigger Event:
push
-
Statement type: