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 git+https://github.com/hellerphilipp/prompt-zen.git

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.0.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.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompt-zen-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b7af22d5fd875f865d146b950c8d46fa5e3857557d04d7eea80d85debdef49a8
MD5 0fc0109d206fcba703b9e0e621028a48
BLAKE2b-256 55f25a791ac726e903ac065e0d3cf90c2a406726b1775e4333bc06bec27ade6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prompt_zen-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 671bed70b32413d4412c46e25c536ea203292124e25127b506da3cacf8fc9efd
MD5 6209e2a1cacb6a91a6b73345bf831d9d
BLAKE2b-256 254fcc0a7c43cae94910558cf3165b2fbb21db4de1368985cde6f49c457ad3bb

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