A package to evaluate prompts using OpenAI and google models
Project description
Prompt Evaluator
prompt-evaluator is a Python package that evaluates prompts using OpenAI and google models based on criteria like clarity, specificity, relevance, and more.
It can do below tasks.
- prompt evaluation
from prompt-evaluator import PromptEvaluator
evaluator = PromptEvaluator(openai_api_key="your_api_key",model="model_name")
evaluator.evaluate_prompt(model="model_name",prompt=prompt)
- Finding the number of tokens in prompt.
from prompt-evaluator import PromptEvaluator
evaluator = PromptEvaluator(openai_api_key="your_api_key",model="model_name")
evaluator.token_length(prompt,model="model_name")
- Prompt enhancement as per the use-case - In dev.
- Prompt token reducer to lower the prompt tokens - In dev.
Installation
pip install prompt-evaluator
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
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_evaluator-0.1.8.tar.gz.
File metadata
- Download URL: prompt_evaluator-0.1.8.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ff4251daac156b505fe526e6236174d6087799c8966869848e2f77cbdb0271
|
|
| MD5 |
1509343f02588a0fae5563f08cc5fd6e
|
|
| BLAKE2b-256 |
c46811174e7fc3e070d56c43082a50980cb0a9233b63e4cebdd739204dbb0244
|
File details
Details for the file prompt_evaluator-0.1.8-py3-none-any.whl.
File metadata
- Download URL: prompt_evaluator-0.1.8-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58bd99ccfef1b2c15b2ddda1f3a477e26ff5911d1622b43af34f7f77f69c4cb9
|
|
| MD5 |
d565bb7473a60c2cf60099cc09327fa8
|
|
| BLAKE2b-256 |
3971b9f8954db098417ee709ad2636e48196c5e43f01eb0daeee5611c7e27bac
|