Skip to main content

CLI tool for auditing prompts using PromptForest

Project description

PromptForest Ranger

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.

Features

Works Offline

All data stays on your computer. The internet is only required to download models onto your computer.

Accurate and Reliable

Ranger utilises the PromptForest engine, which provides responses that are not only accurate, but also calibrated and reliable.

Fast

Startup latency of ~3s and an average request rate of 24 prompts/s with 3 workers.

Installation

pip install pfranger

Usage

ranger [INPUT_FILE] [OPTIONS]

Examples

Scan a CSV file:

ranger validation_prompts.csv -p text

Scan with custom configuration:

ranger 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
--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

Configuration

Ranger uses the promptforest library configuration. Valid YAML configurations can enable/disable specific models or adjust weights.

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.1.1.tar.gz (12.0 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.1.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pfranger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b56394dd43ffd9cb315c8401b7535b2c8408fd08c37e049ebdeace520b04b84c
MD5 dc66cec4d6b7967d59b8b97fdd8571fa
BLAKE2b-256 f1b731070008ddff46cf92a9804c60369816fc6cb269c9f8ca3cffc9f863b7ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pfranger-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca87597a6e001668a4320fdac4c03dbb786577c861ef804c70ad1fbfa5a78401
MD5 7b3f9c200dda964b7502d94ee09dd73d
BLAKE2b-256 f18a6e6adeec89d1c677bf44de8dce85b76af2df0fb7882869ce7ef11af1bca2

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