Skip to main content

Regression protection for LLM pipelines

Project description

promptry

PyPI npm CI Python 3.10+ License: MIT

Sentry for prompts. Local-first regression testing for LLM pipelines — track prompt versions, run eval suites, catch regressions before your users do.

from promptry import track

prompt = track(system_prompt, "rag-qa")
# promptry automatically versions prompts, runs evals, and flags regressions

When something regresses, promptry tells you what changed, when, and whether it caused it:

Overall score: 0.910 -> 0.720  REGRESSION

Probable cause:
  -> Prompt changed (v3 -> v4)

Install

pip install promptry                       # core
pip install promptry[semantic]             # + semantic assertions (sentence-transformers)
pip install promptry[dashboard]            # + web dashboard
pip install promptry[semantic,dashboard]   # everything

Quick start

promptry init                              # scaffold project + starter eval
promptry run smoke-test --module evals     # run it
PASS test_basic_quality (142ms)
  semantic (0.891) ok

Overall: PASS  score: 0.891

Features

Feature What it does
Prompt versioning Content-hashed, automatic dedup
Eval suites Semantic, schema, LLM-as-judge, JSON, regex, grounding assertions
Regression detection Compare against baselines, get root cause hints
Drift detection Catch slow quality degradation over time
Model comparison Statistical comparison against historical baseline (not just snapshots)
Cost tracking Token usage and cost per prompt, aggregated reports
Safety templates 25+ built-in jailbreak / injection / PII tests
MCP server Expose everything as tools for Claude, Cursor, VS Code, etc.
Dashboard Web UI for eval history, prompt diffs, model comparison, cost
JS/TS client Ship prompt events from frontend/Node apps

Dashboard

pip install promptry[dashboard]
promptry dashboard

Overview Suite Detail Prompts Models Cost

How it differs

Promptfoo LangSmith RAGAS promptry
Approach External YAML + CLI Hosted platform Metrics library Python-native, instruments your code
Production tracking No Yes No Yes (track())
Drift detection No No No Yes
Root cause hints No No No Yes
Model comparison Snapshot (A vs B now) No No Historical (statistical)
Local-first Yes No (SaaS) Yes Yes (SQLite)
Cost Free Paid Free Free

MCP server

claude mcp add promptry -- promptry mcp    # Claude Code

Works with Claude Desktop, Cursor, Windsurf, VS Code. See full setup.

Documentation

The full guide covers all assertions, cost tracking, model comparison, safety templates, notifications, storage modes, JS client, CLI reference, MCP setup, and config options.

Known limitations

  • No auto-instrumentation. You add track() calls manually. Explicit > magic.
  • Local-first. No hosted multi-user UI. For that, look at LangSmith or Arize.
  • Early-stage. v0.5 — API is stable but the project is young. Issues welcome.

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

promptry-0.5.0.tar.gz (247.1 kB view details)

Uploaded Source

Built Distribution

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

promptry-0.5.0-py3-none-any.whl (231.0 kB view details)

Uploaded Python 3

File details

Details for the file promptry-0.5.0.tar.gz.

File metadata

  • Download URL: promptry-0.5.0.tar.gz
  • Upload date:
  • Size: 247.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for promptry-0.5.0.tar.gz
Algorithm Hash digest
SHA256 19a1d1efa51e9ab3d0663fe138f64d5e89447cb8a3f4c274c63e75bf080e59cd
MD5 0134b3573e4864d0b5eb1cf64f77f1e1
BLAKE2b-256 8e820a0cc66dfc10e3e04e32d889ed84bc7670e327369c593000ce3bdee37a76

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptry-0.5.0.tar.gz:

Publisher: publish-pypi.yml on bihanikeshav/promptry

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

File details

Details for the file promptry-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: promptry-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 231.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for promptry-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47a709d19dfe261f7f24e5764c0ec376a137ac54e8bb2a0ef0935cb0b0f6ff62
MD5 f18220d78c2d3416a93e37e6ada23f03
BLAKE2b-256 c0579e8ba78fe2b5f39a1388a13545ae9b5420dd7bc2c6affcbe6819483d50e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptry-0.5.0-py3-none-any.whl:

Publisher: publish-pypi.yml on bihanikeshav/promptry

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