Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

prompt-audit: See what your prompt change actually means before you ship it.

The diff tool for prompt engineers. Stop flying blind when you tweak system instructions.

Python License

Demo

Why?

"You wouldn't deploy code without reviewing the diff. Why would you deploy a prompt that way? Prompt-audit gives you a changelog for your model's brain."

Installation

# Clone the repository
git clone https://github.com/amanhammadK/prompt-audit.git
cd prompt-audit

# Make it executable (Unix)
chmod +x prompt_audit.py

Usage

# Compare two files
python prompt_audit.py --old v1.txt --new v2.txt

# Compare raw strings
python prompt_audit.py --old "You are a helpful assistant." --new "You are a professional expert."

# Optional: Set your API key for behavioral predictions
export OPENAI_API_KEY='your-key-here'
python prompt_audit.py --old v1.txt --new v2.txt

Features

  • Structural Diff: Highlight exactly what instructions were added, modified, or removed.
  • Impact Scoring: A heuristic score (1-10) that flags high-risk changes (like removing safety constraints).
  • Keyword Analysis: Automatically detects persona shifts, specificity increases, and volume changes.
  • Behavioral Prediction: (Optional) Uses GPT-3.5 to summarize the expected change in model output.

License

MIT

About

The diff tool for prompt engineers. Stop flying blind when you tweak system instructions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages