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, mitigating the problem of high-certainty false positives.
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
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 pfranger-0.5.0.tar.gz.
File metadata
- Download URL: pfranger-0.5.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3003f256a8e92e6566a54da6cb8f20641e5fda38eb63a8dd7842fba48b4c7d17
|
|
| MD5 |
82dfe52cb1a63d7e0056b1bea9de5872
|
|
| BLAKE2b-256 |
ec68003f749eb2bee90d6326a4f4f14dc8ba69928861678e7f13eb47207c0ce0
|
File details
Details for the file pfranger-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pfranger-0.5.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5885059c59a4446aec2aa1339efc3be260016be14962c077c71a3fa3a6b0be18
|
|
| MD5 |
c3323000ba8f08c2344957626309de73
|
|
| BLAKE2b-256 |
f820291c8acc93b0ea477c79ff467e90cf446825ae9fa8b31691e5f98e14d781
|