Skip to main content

A framework for iterative prompt refinement and optimization.

Project description

prompt-zen

Prompt-Zen is a python framework for cultivating and nurturing LLM-prompts, much like tending to a zen garden.

Features

  • Automatic prompt refinement: Refine prompts using LangChain-compatible LLMs and feedback.
  • Custom Evaluation: Incorporate your own scoring and feedback logic for flexible evaluation.
  • Context Sharing: Share insights from prior generations to inform future iterations.
  • Human-Readable Summaries: Summarize prompt performance and results in a structured DataFrame.

Process

  1. Planting the Seed: Starting with a simple base prompt that describes the goal of the task.
  2. Growing and reaping the fruits: Using an execution model to run the prompt and generate its initial response.
  3. Pruning and Shaping: Using an iteration model to provide feedback and measure how well the response aligns with the desired outcome.
  4. Iterative Growth: Refining the prompt across multiple generations, incorporating lessons learned from top-performing and underperforming results to optimize the output.
  5. Achieving Harmony: Presenting a clear, effective summary of prompt-performance and a prompt that consistently achieves the desired result—a balanced, well-cultivated interaction.

Installation

To install prompt-zen directly from GitHub, use:

pip install prompt-zen

Usage

Use prompt-zen in Jupyter notebooks or Python projects to optimize and refine LLM prompts.


License

This project is licensed under the BSD-3-Clause License. See the LICENSE file for details.


Contributing

Contributions are welcome! Feel free to open issues, suggest features, or submit pull requests.


Acknowledgments

This project leverages LangChain for seamless integration with language models.

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-zen-1.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

prompt_zen-1.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file prompt-zen-1.0.1.tar.gz.

File metadata

  • Download URL: prompt-zen-1.0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for prompt-zen-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5e459ee23421aa5695aad1d1d19ad4fede44cb4d0e58ff2889b701d902dce22e
MD5 b83cb4b8d8ae9ae8264f874034948b6a
BLAKE2b-256 292e885d5a248971a18854074fb5cd3d2bb9e6ddcc5542f8f38e1c6d514c7e7d

See more details on using hashes here.

File details

Details for the file prompt_zen-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: prompt_zen-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for prompt_zen-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6acd39378edb136884243e31984dcfdae144499712c751d0f7bbfb90c83967
MD5 13d32629d8102af8dea1781c182826a2
BLAKE2b-256 b6e6073750635ccc336ab4a43dc09ee767a09f6d8d415b38739ad3a73d2b019f

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