Skip to main content

Intelligent versioning system for LLM prompts with Git integration

Project description

Prompt Versioner Logo

A comprehensive Python library for managing and versioning LLM prompts, with built-in A/B testing, metric tracking, and performance monitoring capabilities.

Python 3.11+ License MIT Code Style: Black


🎯 Why Prompt Versioner?

Prompt Versioner provides enterprise-grade prompt management with:

  • 🔄 Version Control: Full versioning of prompts
  • 📊 Performance Tracking: Metrics and regression detection
  • 🧪 A/B Testing: Built-in statistical framework
  • ⚡ Real-time Monitoring: Alerts and dashboards
  • 👥 Team Collaboration: Annotations and reviews
  • 🎨 Modern UI: Responsive web dashboard

✨ Features

🔧 Core Functionality

  • Automatic MAJOR/MINOR/PATCH versioning
  • Metrics tracking: tokens, latency, quality, cost
  • Export & share prompt history
  • Optional Git integration

🧪 Advanced Testing & Monitoring

  • A/B Testing framework
  • Automated regression detection
  • Live metrics dashboards
  • Custom alert thresholds

👥 Collaboration & Management

  • Team annotations and feedback
  • Version comparison & visual diff
  • Search & filtering by metadata, performance, and tags

🎨 Modern Web Interface

  • Interactive dashboard with responsive layout
  • Dark/Light themes
  • Tab navigation for Prompts, Testing, Comparison, Alerts
  • Real-time updates

Dashboard Overview


📦 Installation

Prerequisites

  • Python 3.11+
  • Poetry (recommended) or pip
  • Git (optional)

Using Poetry

poetry add git+https://github.com/pepes97/prompt-versioner.git

Using pip

pip install git+https://github.com/pepes97/prompt-versioner.git

🚀 Quick Start

from prompt_versioner import PromptVersioner, VersionBump

pv = PromptVersioner(project_name="my-first-project", enable_git=False)
pv.save_version(
    name="assistant",
    system_prompt="You are a helpful assistant.",
    user_prompt="Please answer the following question: {question}",
    bump_type=VersionBump.MAJOR
)

print("✅ Created first prompt version 1.0.0!")

🎨 Web Dashboard

Core Features

📋 Prompts Management

  • Version history with visual diff
  • Semantic search
  • Bulk operations
  • Live preview

Prompts Management

📊 Metrics & Analytics

  • Token usage, latency, cost analysis
  • Quality score tracking

Metrics Dashboard

🧪 A/B Testing

  • Split testing
  • Real-time results

AB Testing Interface

🔍 Version Comparison

  • Side-by-side visual diff
  • Metadata & performance delta
  • Smart annotations

Version Comparison

⚠️ Smart Alerts

  • Automatic detection of regressions
  • Cost and error monitoring
  • Custom metrics & thresholds

Alerts System


💻 CLI Interface

pv init
pv list
pv versions <prompt>
pv show <prompt> <version>
pv diff <prompt> <v1> <v2>
pv compare <prompt> <v1> <v2>
pv delete <prompt> <version>
pv rollback <prompt> <version>
pv dashboard --port 5000

📖 Examples

Examples in examples/ are fully functional:

File Description
basic_usage.py Getting started
version_management.py Advanced version control
metrics_tracking.py Metrics logging
ab_testing.py Statistical testing
performance_monitoring.py Automated monitoring
summarization_example.py Real-world summarization
run_dashboard.py Launch dashboard
clear_db.py Reset database

🌟 Contributing

See CONTRIBUTING.md for contribution guidelines.


📄 License

MIT License - LICENSE


📞 Support


Build by Sveva Pepe, NLP Engineer
⭐ Star this project if it helps you build better AI applications!

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

prompt_versioner-0.1.3.tar.gz (87.0 kB view details)

Uploaded Source

Built Distribution

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

prompt_versioner-0.1.3-py3-none-any.whl (125.9 kB view details)

Uploaded Python 3

File details

Details for the file prompt_versioner-0.1.3.tar.gz.

File metadata

  • Download URL: prompt_versioner-0.1.3.tar.gz
  • Upload date:
  • Size: 87.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.11.9 Windows/10

File hashes

Hashes for prompt_versioner-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f1fc3918035b69d4e6e380eb004729a27ffbd7c6be85c2104282a83e5ef189f7
MD5 8e4ffcdbf8614e0dea3cefab7fd348b0
BLAKE2b-256 bb06c3f2d0424fb8b3f9042992b94a90ce27186e27d04f3f66542624e116f74f

See more details on using hashes here.

File details

Details for the file prompt_versioner-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: prompt_versioner-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 125.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.11.9 Windows/10

File hashes

Hashes for prompt_versioner-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12c88f6dcea6ef04005cbc5e17d598bc711325e06ee63f1ed3e7c295437ae5fd
MD5 3509a3f0ad1e47197e2442843b1a8309
BLAKE2b-256 017dca121726708b6f3c17af469c360d761c54c3bfe0b57977f2607e208a98fc

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