Skip to main content

Enterprise AI Compliance Toolkit with PII Detection and Secure RAG

Project description

Aifoundary

Enterprise AI Compliance Toolkit with PII Detection and Secure RAG Guardrails

<<<<<<< HEAD Development Bashpip install -e .[dev] pytest

Deterministic RAG Governance

Aifoundary enforces Retrieval-Augmented Generation using policy-as-code.

Features

  • Prompt injection blocking
  • PII detection & redaction
  • Multi-context grounding checks
  • Explainable coverage failures
  • Auto-rewrite + guarded retry
  • Signed audit logs
  • CI/CD gateable decisions

Quick demo

aifoundary rag-check --json prompt.txt context.txt || exit 1


In `pyproject.toml`:

```toml
version = "1.0.1"
=======
Aifoundary is a production-ready Python library designed to help teams deploy AI systems safely in regulated environments. It focuses on **data protection, decision transparency, and retrieval-augmented generation (RAG) safety**.

The library is framework-agnostic and can be integrated into existing AI pipelines without replacing your models or infrastructure.

---

## Key Capabilities

- **PII Detection**
  - Hybrid detection using deterministic rules and ML-based entity recognition
  - Designed for logs, prompts, documents, and model inputs

- **Secure RAG Validation**
  - Guards against unsafe context injection
  - Ensures retrieved documents comply with policy constraints
  - Prevents accidental data leakage in generation flows

- **Audit-First Design**
  - Deterministic behavior
  - Clear failure modes
  - Designed to integrate with enterprise audit and governance systems

- **Minimal, Explicit API**
  - No hidden side effects
  - No model hosting
  - No vendor lock-in

---

## Installation

```bash
pip install aifoundary
Optional FAISS Support (Linux recommended)
bash
Copy code
pip install "aifoundary[faiss]"
Note: FAISS requires native compilation and may not install on macOS.

Command Line Interface
Aifoundary includes a lightweight CLI for validation and diagnostics.

bash
Copy code
aifoundary doctor
aifoundary scan sample.txt
aifoundary rag-check prompt.txt context.txt
Intended Use Cases
AI compliance and governance teams

Regulated industries (fintech, healthcare, enterprise SaaS)

Secure RAG pipelines

Internal AI platform teams

Author
Chandan Galani
Email: galanichandan@gmail.com
Phone: +91-9326176427

License
Apache 2.0
>>>>>>> 152c6d9 (v1.0.1: policy-as-code, explainable RAG, audit chain, simulation mode)

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

aifoundary-1.0.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

aifoundary-1.0.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file aifoundary-1.0.2.tar.gz.

File metadata

  • Download URL: aifoundary-1.0.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.4

File hashes

Hashes for aifoundary-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f5e6fd730d13a3c0db74b93ee3e76cc6d549f3bab25ad2fb88d78514acdeba99
MD5 6c0a7a468f33c7d0e040a075f4c21e41
BLAKE2b-256 aac6876387f7a1d15b9ebf46ef1e3a41b3a47a02124af50f0d62c8511aa0f88d

See more details on using hashes here.

File details

Details for the file aifoundary-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: aifoundary-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.4

File hashes

Hashes for aifoundary-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8a06ff3b6a7e238d21abd844e4d6cfab48e5161bde6fb2c8305a72e012e264
MD5 4a0582b61857c29e44e14b5370945938
BLAKE2b-256 7648b4fef9064d94a39033d33eb20e09b92800eca1558903c8ee85460ced2c33

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