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
- Planting the Seed: Starting with a simple base prompt that describes the goal of the task.
- Growing and reaping the fruits: Using an execution model to run the prompt and generate its initial response.
- Pruning and Shaping: Using an iteration model to provide feedback and measure how well the response aligns with the desired outcome.
- Iterative Growth: Refining the prompt across multiple generations, incorporating lessons learned from top-performing and underperforming results to optimize the output.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7af22d5fd875f865d146b950c8d46fa5e3857557d04d7eea80d85debdef49a8
|
|
| MD5 |
0fc0109d206fcba703b9e0e621028a48
|
|
| BLAKE2b-256 |
55f25a791ac726e903ac065e0d3cf90c2a406726b1775e4333bc06bec27ade6d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671bed70b32413d4412c46e25c536ea203292124e25127b506da3cacf8fc9efd
|
|
| MD5 |
6209e2a1cacb6a91a6b73345bf831d9d
|
|
| BLAKE2b-256 |
254fcc0a7c43cae94910558cf3165b2fbb21db4de1368985cde6f49c457ad3bb
|