No project description provided
Project description
Quality Prompts
Use and evaluate prompting techniques quickly.
Quality Prompts implements 58 prompting techniques explained in this survey from the University of Maryland in collaboration with researchers from Learn Prompting, OpenAI, Microsoft, etc.
1. Install Quality Prompts:
pip install quality-prompts
2. Write the components of your prompt
from quality_prompts.prompt import QualityPrompt
directive = "You are given a document and your task..."
additional_information = "In the knowledge graph, ..."
output_formatting = "You will respond with a ..."
prompt = QualityPrompt(
directive,
additional_information,
output_formatting,
exemplar_store
)
3. Quality Prompts searches and uses only the few-shot examples that are relevant to the user's query
input_text = "list the disorders included in cvd"
prompt.few_shot(input_text=input_text, n_shots=1)
4. Simply call one of several prompting techniques to your prompt
System2Attention
Helps clarify the given context as an additinoal step before it's used to answer the question
prompt.system2attention(input_text)
Tabular Chain of Thought
Prompts the LLM to think step by step and write the step, process and result of each step in a markdown table. Significantly boosts accuracy in solving math problems.
prompt.tabular_chain_of_thought_prompting(input_text)
6. Upcoming: Easily evaluate different prompting techniques
Star History
To stay updated on the latest evaluation features and prompting techniques added to the library, you can star this repo.
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
File details
Details for the file quality-prompts-0.0.5.tar.gz
.
File metadata
- Download URL: quality-prompts-0.0.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9480d08a03670564e69d7528555199a180b7134c7b86c6981eaaa5a47883c1eb |
|
MD5 | c42380fb27fff285e1acfc0f62610330 |
|
BLAKE2b-256 | 13dc4d9ce3eedb53c33a7c475b0504a0605344c1d86ec9968c8a90ac4b5d94d2 |
File details
Details for the file quality_prompts-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: quality_prompts-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccb14c08091bc58eb6495a1070e8ba81dd6e870601182a3b1d442ec20eb6e1aa |
|
MD5 | 3123544b76cdbcdaf82df72285d115b0 |
|
BLAKE2b-256 | f1453dbd2e893eefe95d79c8fe0138f6d5b6d34026700c748ff2c4532828d842 |