Skip to main content

CLI tool for auditing prompts using PromptForest

Project description

PromptForest Ranger

PyPI Downloads Apache License

PromptForest Ranger (or PFRanger) is a CLI tool for auditing LLM prompts for injection attacks and jailbreaks. It leverages the PromptForest ensemble engine to scan datasets and generate comprehensive and accurate HTML reports, mitigating the problem of high-certainty false positives.

PFRanger Report Preview

Features

Works Offline

All data stays on your computer.

Accurate and Reliable

PFRanger utilises the PromptForest engine, which provides responses that are not only accurate, but also calibrated and reliable. PromptForest uses a strategically selected ensemble of small models using soft weighted model voting. Read more about PromptForest here

Fast

Startup latency of ~3s and an average request rate of 27 prompts/s on a consumer GPU with optimal parallelization.

Informative

Supports a large number of input and output file types. Also outputs a shareable HTML file to help you analyse the data.

Downloading Models

PromptForest automatically handles all model downloading on first run. Downloading takes around 3GB disk space and around a minute to download on consumer network download speeds.

Installation

pip install pfranger

Usage

pfranger [INPUT_FILE] [OPTIONS]

Examples

Scan a CSV file:

pfranger validation_prompts.csv -p text

Scan with custom configuration:

pfranger prompts.jsonl -c my_config.yaml

Arguments

Argument Description Default
input Path to the file containing prompts Required
--output, -o Output path for HTML report report.html
--input-format, -f Force input format (csv, json, jsonl, txt) Auto-detect
--output-format Add additional output format alongside HTML None
--prompt-col, -p Column name for prompts (CSV/JSON) prompt
--timestamp-col, -t Column name for timestamp None
--workers, -w Number of parallel worker threads 4
--config, -c Path to PromptForest YAML configuration file Benchmark Defaults

License

See LICENSE.

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

pfranger-0.7.5.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

pfranger-0.7.5-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pfranger-0.7.5.tar.gz.

File metadata

  • Download URL: pfranger-0.7.5.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pfranger-0.7.5.tar.gz
Algorithm Hash digest
SHA256 1c4e68f8def9e5922aee7ad806e14e7044035430ed9351c181df37833b2bbe03
MD5 27c9387cad1691154fa17f7ec087a5e7
BLAKE2b-256 69e3c381c44118cbdee592ef384da4d8ba875d2b86771905e4ceb52ca222bffb

See more details on using hashes here.

File details

Details for the file pfranger-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: pfranger-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pfranger-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6539421435d9c4a2194502ba7d6d1c03eff08714626ab7a31d9e67a06c2ac9
MD5 62f5f964670b8db2673aa8a4d925c2b8
BLAKE2b-256 80a1ddbf2804b7217fee82da82894d35af14ee1c3eaf5a7406325c33d0d832ab

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