PERMISSION-AWARE
RAG PLATFORM

Ask anything ........... See only what you're allowed to
[ VIEW ON GITHUB ]
SYS.MSG 0x01
The Problem: Generic RAG pipelines often leak sensitive enterprise data by post-filtering results or caching answers without strict tenant/user segregation. This platform solves the enterprise knowledge search problem by ensuring that Access Control Lists (ACL) are enforced at query time before retrieval. It fails closed by design.

Core Features

FEAT_01
Fail-Closed ACL Filtering
Access controls are applied deep in the index structure before any vector similarity search.
FEAT_02
Hybrid Retrieval
Combines BM25 lexical search with dense vector embeddings using Reciprocal Rank Fusion (RRF).
FEAT_03
Query Routing
Intelligently routes queries to direct retrieval, conversational paths, or decomposes complex multi-hop queries.
FEAT_04
Incremental Ingestion
Hash-based document versioning ensures efficient pipeline processing and reliable cache invalidation.
FEAT_05
Scope-Segregated Cache
Caches answers using strict access-scope fingerprints. Impossible for User A to see User B's cached hit.
FEAT_06
Citation Grounding
Enforces strict evidence validation. If the LLM hallucinates a citation missing from authorized retrieved chunks, it safely abstains.

Interactive Multi-Tenant Live Demo

DEMO_CONSOLE // ZERO-TRUST ACL ENFORCEMENT LIVE ENGINE

Select a demonstration identity and test query to observe pre-retrieval ACL filtering, cross-tenant isolation, and fail-closed security in real-time.

Full access to AlphaCorp public wikis and confidential engineering roadmap.

Quickstart & Usage

$ pip install -e .
Successfully installed gi-0.1.0 prag-cli
$ prag login --user alice --tenant acme-corp
Successfully logged in as user 'alice' for tenant 'acme-corp'
$ prag ask "What is our refund policy?"
╭─ Answer (grounded) ───────────────╮ │ The refund policy allows returns │ │ within 30 days. │ ╰───────────────────────────────────╯ Sources: chunk_987 Latency: 450ms
$ prag login --user bob_intern --tenant acme-corp
Successfully logged in as user 'bob_intern' for tenant 'acme-corp'
$ prag ask "What is the CEO's salary?"
Access denied: Unauthorized or missing valid credentials (403)

Architecture

%%{init: {'theme': 'dark', 'themeVariables': { 'fontFamily': 'IBM Plex Mono', 'fontSize': '18px' }}}%% flowchart TD classDef uiBox fill:#2a2a28,stroke:#444,stroke-width:2px,color:#f0f0f0,rx:12px,padding:25px; classDef accentBox fill:#d19e66,stroke:#fff,stroke-width:2px,color:#111,rx:12px,padding:25px; Client([Client Query]):::accentBox subgraph Engine [Permission-Aware Engine] direction TB API[1. Auth & Routing]:::uiBox Ret[2. ACL-Filtered Retrieval]:::uiBox Gen[3. Grounded Generation]:::uiBox API --> Ret Ret --> Gen end Client --> API Gen -.-> Ans([Validated Answer]):::accentBox

Tech Stack

Component Technology
Core API FastAPI, Python 3.12, Pydantic v2
CLI Client Typer, Rich
Lexical Search rank-bm25
Vector Search sentence-transformers
Dependency Mgmt uv

Evaluation Metrics

Metric Score
Recall@5 0.89
MRR 0.76
Faithfulness 0.95
Citation Accuracy 0.92
Latency (p50) 450ms
Latency (p95) 1200ms