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.1.tar.gz (8.9 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.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aifoundary-1.0.1.tar.gz
  • Upload date:
  • Size: 8.9 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.1.tar.gz
Algorithm Hash digest
SHA256 e264d8f88aff208c74cd1336c4caa150520e13c3459370251c3b7580a71b11a4
MD5 4bd1888142f6d2024389d18699df1635
BLAKE2b-256 bf274196a64d175d7ac45a5888dd8e00f902f359202d53e4c5f950e06ac8302c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aifoundary-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65591bfbfb0221f1fad8c75c7f043d9c8822534ff792c0f3388a1429ad2bf7e7
MD5 1af5197389e886a693ca34f052b8490f
BLAKE2b-256 1f0f827b477f4d2d4e2e1c705ec823eec31bbb44d2304cb41055490cf3345d3e

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