Skip to main content

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 OpenAI, Microsoft, et al.

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

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

quality-prompts-0.0.4.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

quality_prompts-0.0.4-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file quality-prompts-0.0.4.tar.gz.

File metadata

  • Download URL: quality-prompts-0.0.4.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.9

File hashes

Hashes for quality-prompts-0.0.4.tar.gz
Algorithm Hash digest
SHA256 94baf3cf051ddab2c0731b0e1f78db616b2b28a4f9de0aff52c79df984c98f56
MD5 e9433d9f16f4d1da409ba9e6a7394713
BLAKE2b-256 e8cec7387ba6cad0c5df60b2d754f0d3bdcb983a42ec63117abb0686ce17ccd4

See more details on using hashes here.

File details

Details for the file quality_prompts-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for quality_prompts-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f18ba33c6a0e95048cc6f5105a0d9654a3728f48d06589fa6e5462f8a7483974
MD5 ce16c72de0c56bc52d0171f1edb10602
BLAKE2b-256 09990871a9286f073cd4939492cab837b63acdb58302aceb5e9f6f1b35ef1ad2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page