Skip to main content

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.

Quality Prompts

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.

Star History Chart

Metadata

Release files for quality-prompts 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quality-prompts 0.0.5
File Size Uploaded Provenance Actions
quality-prompts-0.0.5.tar.gz 9.3 kB Without provenance Details for quality-prompts-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quality-prompts 0.0.5
File Interpreter ABI Platform Actions
quality_prompts-0.0.5-py3-none-any.whl Python 3 none any Details for quality_prompts-0.0.5-py3-none-any.whl

Total release size: 20.1 kB

Release files / quality-prompts-0.0.5.tar.gz

Download URL quality-prompts-0.0.5.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9480d08a03670564e69d7528555199a180b7134c7b86c6981eaaa5a47883c1eb
BLAKE2b-256 checksum
How to use checksums
13dc4d9ce3eedb53c33a7c475b0504a0605344c1d86ec9968c8a90ac4b5d94d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.9

Release files / quality_prompts-0.0.5-py3-none-any.whl

Download URL quality_prompts-0.0.5-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccb14c08091bc58eb6495a1070e8ba81dd6e870601182a3b1d442ec20eb6e1aa
BLAKE2b-256 checksum
How to use checksums
f1453dbd2e893eefe95d79c8fe0138f6d5b6d34026700c748ff2c4532828d842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.9

Security for quality-prompts 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page