GenAI-powered System for Privacy incident Analysis and Recovery
Project description
GASPAR
GenAI-powered System for Privacy incident Analysis and Recovery
GASPAR is a comprehensive system designed to:
- Extract privacy-related fields from assessment documents
- Model data distributions and sample input data based on extracted fields
- Detect anomalous values in sampled data batches
- Create code filters to exclude anomalous data
- Safely deploy filters to quarantine problematic data
Features
- Privacy rule extraction from IPA documents
- Adaptive data sampling based on distribution modeling
- Statistical and distribution-based anomaly detection
- Automatic filter generation for anomalous data
- Safe deployment with monitoring capabilities
- Support for multiple LLM providers (OpenAI, Anthropic, Mistral)
- Azure integration for cloud deployment
Installation
Local installation can be done using uv:
$ uv python install 3.10
$ uv python pin 3.10
$ uv venv -p python3.10
$ source .venv/bin/activate
$ uv pip install -e .
For development mode:
$ pip install -e ".[dev]"
For Databricks deployment
pip install -e ".[databricks]"
Usage
Basic Usage
from gaspar.config import load_config
from gaspar.pipeline.executor import PipelineExecutor
import asyncio
async def main():
# Load configuration from file
config = load_config("config.yaml")
# Initialize pipeline
executor = PipelineExecutor(config)
# Process IPA document
result = await executor.execute("documents/privacy_assessment.txt")
if result.success:
print("Privacy rules extracted successfully")
print(f"Generated {len(result.outputs['filters'])} filters")
if __name__ == "__main__":
asyncio.run(main())
Command Line Usage
After installation, the gaspar command-line tool is available:
$ gaspar document.txt
# Process IPA document and start monitoring
$ gaspar -c config.yaml document.txt
# Use custom configuration
$ gaspar -v document.txt
# Enable verbose logging
Configuration
GASPAR can be configured via YAML files. Example configuration:
# LLM Model Configuration
model:
provider: "openai"
model_name: "gpt-4"
api_key: ${OPENAI_API_KEY}
# Storage Configuration
storage:
type: "local"
local_path: "./data"
# Pipeline Configuration
pipeline:
batch_size: 100
max_retries: 3
temp_directory: "./temp"
Note
For the configuration to be used in the repo, it was adapted to use a locally deployed version of GPT-4 To use Openai API or any other LLM API provider, update openai_model.py or create a new one
Development
Testing
Running the tests can be done using tox:
$ tox -p
Building Packages
Building the packages:
$ tox -e packages
$ ls dist/
License
MIT
Project details
Release history Release notifications | RSS feed
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 amadeus_os_gaspar-0.0.1.tar.gz.
File metadata
- Download URL: amadeus_os_gaspar-0.0.1.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ff22f9de0c43a208c4b9c2658b60efa36ad74f465541aab423ff05e589d25d
|
|
| MD5 |
99f4b8d0dff8e1af222a95a20b1dd761
|
|
| BLAKE2b-256 |
9a9511f2299cf2666887f053f3ab25cda81e53b382c2f96ed0acea1d7ba08d04
|
Provenance
The following attestation bundles were made for amadeus_os_gaspar-0.0.1.tar.gz:
Publisher:
release-pypi.yml on AmadeusITGroup/GASPAR
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amadeus_os_gaspar-0.0.1.tar.gz -
Subject digest:
f4ff22f9de0c43a208c4b9c2658b60efa36ad74f465541aab423ff05e589d25d - Sigstore transparency entry: 197525674
- Sigstore integration time:
-
Permalink:
AmadeusITGroup/GASPAR@d62f0c64931bd504c154d1f91c31e0e333fae8fa -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/AmadeusITGroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d62f0c64931bd504c154d1f91c31e0e333fae8fa -
Trigger Event:
push
-
Statement type:
File details
Details for the file amadeus_os_gaspar-0.0.1-py3-none-any.whl.
File metadata
- Download URL: amadeus_os_gaspar-0.0.1-py3-none-any.whl
- Upload date:
- Size: 52.0 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 |
bd66485bf3abe215bd5d370a98d8b5c504813c3d3895b350485202f7c6519b3d
|
|
| MD5 |
4d8d14f2fe414e709fd2f21938bbcd2b
|
|
| BLAKE2b-256 |
28d5b4d45f7fc6f040d0f00a46fc0984f943dd60bc30a391f9cbc5dcef971d96
|
Provenance
The following attestation bundles were made for amadeus_os_gaspar-0.0.1-py3-none-any.whl:
Publisher:
release-pypi.yml on AmadeusITGroup/GASPAR
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amadeus_os_gaspar-0.0.1-py3-none-any.whl -
Subject digest:
bd66485bf3abe215bd5d370a98d8b5c504813c3d3895b350485202f7c6519b3d - Sigstore transparency entry: 197525677
- Sigstore integration time:
-
Permalink:
AmadeusITGroup/GASPAR@d62f0c64931bd504c154d1f91c31e0e333fae8fa -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/AmadeusITGroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d62f0c64931bd504c154d1f91c31e0e333fae8fa -
Trigger Event:
push
-
Statement type: