Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amadeus_os_gaspar-0.0.1.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

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

amadeus_os_gaspar-0.0.1-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

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

Hashes for amadeus_os_gaspar-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f4ff22f9de0c43a208c4b9c2658b60efa36ad74f465541aab423ff05e589d25d
MD5 99f4b8d0dff8e1af222a95a20b1dd761
BLAKE2b-256 9a9511f2299cf2666887f053f3ab25cda81e53b382c2f96ed0acea1d7ba08d04

See more details on using hashes here.

Provenance

The following attestation bundles were made for amadeus_os_gaspar-0.0.1.tar.gz:

Publisher: release-pypi.yml on AmadeusITGroup/GASPAR

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file amadeus_os_gaspar-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for amadeus_os_gaspar-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd66485bf3abe215bd5d370a98d8b5c504813c3d3895b350485202f7c6519b3d
MD5 4d8d14f2fe414e709fd2f21938bbcd2b
BLAKE2b-256 28d5b4d45f7fc6f040d0f00a46fc0984f943dd60bc30a391f9cbc5dcef971d96

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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