Skip to main content

InstructPrompt 📝🔍

⚡ A Python package for storing, retrieving, and dynamically creating prompts for GPT models ⚡

Our goal with InstructPrompt is to make it easier to tame large language models and make improving your LLM in production simpler to do. This package allows users to store instructions, which can be retrieved to dynamically create prompts giving gpt instructions on how to respond to a specific user's query.

Getting Started

To get started with InstructPrompt, you will need to first install the library by running the following command:

pip install instructprompt

Once installed, you can import it into your python project by running the following:

import instructprompt

Using InstructPrompt

InstructPrompt provides 3 main functions: add(), list(), and query().

add()

The add() function takes in an instruction as a string and adds it to the collection. It uses ChromaDB to store the instruction and assigns it a unique id. It returns a confirmation message once the instruction is successfully added.

import instructprompt

instruction = "Please provide the customer's name and order number."

instructprompt.add(instruction)

list()

The list() function returns a list of all the stored instructions in the collection.

import instructprompt

instructions = instructprompt.list()
print(instructions) # Outputs a list of all the stored instructions

query()

The query() function takes in a query as a string and returns a list of instructions that match the query. It uses ChromaDB to perform the query and returns up to 5 matching instructions.

import instructprompt

query = "How do I reset my password?"

instructions = instructprompt.query(query)
print(instructions) # Outputs a list of instructions that match the query

Version

The current version of InstructPrompt is 0.1.0.

Contributing

We welcome contributions to InstructPrompt! Feel free to create issues/PR's/or DM us (👋 Hi I'm Krrish - +17708783106)

License

InstructPrompt is released under the MIT License.

Release files for instructprompt 0.1.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 instructprompt 0.1.5
File Size Uploaded
instructprompt-0.1.5.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for instructprompt 0.1.5
File Interpreter ABI Platform
instructprompt-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / instructprompt-0.1.5.tar.gz

Download URL instructprompt-0.1.5.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5cc0aad4babcdcc85b5269d8446b22a3dd9fe1424189cf8df23f745949537dcb
BLAKE2b-256 checksum
How to use checksums
10929e3da1772a3e649601c4a6deb58b44d4f0caf7f46dc2e9aabcb0f5ac44d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0

Release files / instructprompt-0.1.5-py3-none-any.whl

Download URL instructprompt-0.1.5-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ade5c0d17f1b1340692904587414dd47fdf9d597509600e88f98a88f170933
BLAKE2b-256 checksum
How to use checksums
a04c374720bf1abff0d66045e4de74658d90eb2a2f08d8a1862db1cbc3729a74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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