Skip to main content

Enterprise prompt optimization framework combining DSPy and GRPO approaches

Project description

PromptOpt: Enterprise Prompt Optimization Framework

Python 3.8+ License: MIT

A unified framework for testing, comparing, and hybridizing DSPy and GRPO approaches to prompt optimization, with special focus on enterprise deployment via synthetic data and Colab accessibility.

🌟 Key Features

  • 🤖 Multiple Optimization Strategies: DSPy, GRPO, and hybrid approaches
  • 💰 Cost-Aware Optimization: Built-in budget management and tracking
  • 🏢 Enterprise-Ready: Compliance support, ROI analysis, deployment tools
  • ☁️ Colab-Optimized: Works perfectly in Google Colab (no GPU needed)
  • 📊 Tournament Evaluation: Head-to-head prompt comparison system
  • 🎯 Synthetic Data: Generate realistic business scenarios
  • 🔧 API-Based: Works with OpenAI and Anthropic APIs

Installation

Using Conda (Recommended)

# Create a new conda environment
conda create -n promptopt python=3.9
conda activate promptopt

# Install the package
pip install -e .

# For development
pip install -r requirements-dev.txt

Using pip only

pip install promptopt

For development:

pip install -e ".[dev]"

For Colab environments:

pip install promptopt[colab]

Quick Start

from promptopt import EnterprisePOC
from promptopt.colab import ColabManager

# Set up environment
manager = ColabManager()
manager.setup_enterprise_environment()

# Run a complete POC
poc = EnterprisePOC()
results = poc.run_complete_poc(
    business_scenario="customer_support",
    company_context={"industry": "tech", "size": "enterprise"},
    budget_limit=500.0
)

# View results
print(f"Optimization improvements: {results.optimization_improvements}")
print(f"Projected ROI: {results.roi_projections}")

📚 Documentation

See DOCUMENTATION.md for comprehensive guides and API reference.

🚀 Quick Start in Google Colab

Open In Colab

🧪 Running Tests

conda activate promptopt
pytest tests/

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • DSPy framework for few-shot optimization techniques
  • GRPO methodology for tournament-based optimization
  • OpenAI and Anthropic for LLM APIs

📊 Example Results

Using PromptOpt, teams typically see:

  • 30-40% improvement in response quality
  • 85%+ consistency across team members
  • $2000+/month savings from optimized prompts
  • 2-week ROI for enterprise deployments

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

promptopt-0.1.0.tar.gz (82.9 kB view details)

Uploaded Source

Built Distribution

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

promptopt-0.1.0-py3-none-any.whl (94.0 kB view details)

Uploaded Python 3

File details

Details for the file promptopt-0.1.0.tar.gz.

File metadata

  • Download URL: promptopt-0.1.0.tar.gz
  • Upload date:
  • Size: 82.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for promptopt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b2c26d38bfe95323f0f9b55c29858df7c8c9ee04744ee3d80b21704d9ac25be
MD5 dfd71a75bd410766d8a08c14f85a88a9
BLAKE2b-256 a55a5eb6ac974ab5b653ef1a97f884de3b7ecbff8d3e4a20fde85b13cc6b6c2f

See more details on using hashes here.

File details

Details for the file promptopt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: promptopt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for promptopt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f54595379e33798d9c31a94a54dd1c9ec4eebddbb0ba4408ffa752b823f85df
MD5 cbd24a10d6d9799b2001dbc53b806256
BLAKE2b-256 5ccca8c94921fea4ed41f76433d03475dd8442579d2497b72596201cc9438c26

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