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

GitHub Action

Run eval suites in CI with one line. View on Marketplace.

# .github/workflows/eval.yml
name: Eval
on: [push]
jobs:
  eval:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: bihanikeshav/promptry@v0.5.0
        with:
          suite: rag-regression
          module: evals
          compare: prod  # optional — compare against baseline
Input Required Default Description
suite Yes Eval suite name
module Yes Python module containing the suite
compare No Baseline tag to compare against
python-version No 3.12 Python version
extras No semantic pip extras to install

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.6 — 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.6.0.tar.gz (264.9 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.6.0-py3-none-any.whl (244.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for promptry-0.6.0.tar.gz
Algorithm Hash digest
SHA256 7eda9d5d908e48b7d1e2d699adc5ce2b59d436f8f84a0a5d14ec72a56df4833c
MD5 f631646e5c21825b1f631f0f655ed47a
BLAKE2b-256 4eefe6abb623a8504299bd5de12fa8ffaa13fbbd77071ba075e034462687fc19

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptry-0.6.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.6.0-py3-none-any.whl.

File metadata

  • Download URL: promptry-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 244.4 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38a10ca1bf14fbf0d16de00ef1dd4977f29efd6221a02f19ec6d14246ebeb113
MD5 a2a65517b1cc1960e3863e295aff2f7c
BLAKE2b-256 f4c0d029c625de0f579869ad53ab9844cbbbbc9594e9d76899ced9bb28ef8da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptry-0.6.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