Skip to main content

No project description provided

Project description

Prompt Learner

Documentation Web App Discord

What is Prompt Learner?

A Modular Approach To Prompting

Prompt Learner is designed to make prompts modular.
This enables easy tuning, quick experimentation, and frictionless maintenance.
A prompt is composed of distinct modules where each module can be optimized & modified both on its own, and as a part of the complete system. Some modules are -

  1. The task type
  2. The task description
  3. A few examples
  4. Custom Prompt Technique specific Instructions
  5. Instructions for output format

See the documentation on "Why Prompt Learner?" to learn more.

Getting started

Watch our quick start guide

You can pip install Prompt Learner:

pip install prompt-learner

[!TIP] See the getting started tutorial for a detailed example of Prompt Learner in action.

How it works

Architecture Prompt-learner runs on the above architecture. Starting from the left, the user has to decide on 4 aspects -

  1. The Task
  2. A Template format for your prompt
  3. A set of Examples
  4. An LLM model to use

A task and examples feed into the template of choice (Claude, Open AI..). The task and examples also interact with selectors which can pick the best n examples for the task using statistical and machine learning techniques. These selected examples slot into the template, along with any custom instructions from any prompting technique( such as adding 'think step by step' for chain of thought prompting) comprise the final prompt. The prompt invokes the LLM through the adapter with any given inference sample to produce the final output.

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

prompt_learner-0.3.3.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompt_learner-0.3.3-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file prompt_learner-0.3.3.tar.gz.

File metadata

  • Download URL: prompt_learner-0.3.3.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for prompt_learner-0.3.3.tar.gz
Algorithm Hash digest
SHA256 9b5b660f6aaaf01af926fd7c71c52c6795adc6f7fb71c3cda064b2fcd83699f2
MD5 5848455af0bf3332c05d3c316b26acf3
BLAKE2b-256 28b2ceed9be7aa23f036599daf65b65361c0c4b0bbbee0e50b821b59a06778ea

See more details on using hashes here.

File details

Details for the file prompt_learner-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: prompt_learner-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for prompt_learner-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5ac992f4d5e6750873da0926044691ab633039bb9e29071095250118b3e41229
MD5 23041cca8e00ec24e20fcfd5d71d7573
BLAKE2b-256 78ff6323fd9514dcef6fb67d970501ee3113ea87a4082b78cd9a346f17ead556

See more details on using hashes here.

Supported by

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