Skip to main content

Package: PromptVerse

Description

The PromptVerse package is designed to enhance the capabilities of developers in writing prompts, logging them, and providing a prompt registry. It offers a comprehensive list of prompt templates, allowing developers to provide input parameters and queries to generate prompts effortlessly. The package also includes offline storage in JSON format and provides features for logging, organizing, evaluating, and experimenting with prompts. With the ability to iterate through multiple prompt iterations, developers can compare experiments and metrics. Additionally, the package emphasizes minimal code requirements and provides a built-in UI display for all prompts created during a session.

Features

Prompt Registry

The PromptVerse package includes a prompt registry feature that acts as a centralized repository for storing and managing prompts. Developers can register prompts, assign relevant metadata, and easily access prompts from a single location. The prompt registry facilitates prompt discovery, version control, and promotes reusability among developers.

Complete List of Prompt Templates

The package provides a comprehensive list of prompt templates that cover a wide range of use cases. Developers only need to provide input parameters and queries to generate prompts using these templates. This feature streamlines the prompt writing process, saving developers time and effort.

Offline Storage in JSON Format

PromptVerse offers offline storage capabilities using JSON format. Developers can store prompts and related data locally, enabling easy retrieval and manipulation without an internet connection. The JSON format ensures a structured representation of prompt information.

Logging

The package includes a logging feature that enables developers to log prompts and associated actions. Logging helps track the execution flow, identify errors, and monitor the performance of prompts. The logged information can be used for debugging and analysis purposes.

Organize and Evaluate Prompts

Developers can efficiently organize and evaluate prompts using the PromptVerse package. It provides functionalities to categorize prompts based on different criteria such as tags, topics, or complexity levels. This organization helps in better management and retrieval of prompts. Additionally, developers can evaluate prompt effectiveness and performance by conducting experiments and comparing the results.

Iterative Prompt Development and Comparison

The PromptVerse package allows developers to iterate through multiple prompt iterations. Developers can experiment with different prompt formulations, configurations, or parameters. They can compare the results of these experiments, along with associated metrics, to determine the most effective prompt for a given scenario.

Minimal Code

The PromptVerse package emphasizes minimal code requirements. It provides a set of pre-defined functions and utilities that abstract complex operations, reducing the amount of code developers need to write. This allows developers to focus on the prompt logic and functionality rather than dealing with implementation details.

UI Display of Prompt Session

The package includes a built-in UI display that shows all the prompts created during a session. This feature provides a convenient way for developers to review and interact with prompts, ensuring a seamless prompt development experience.

Getting Started

Usage

import os
from prompt_verse import prompt_verse


if __name__ == "__main__":
    os.environ["OPENAI_API_KEY"] = "" # provide your openai key here
    sp=prompt_verse.PromptVerse()

    sp.create_session(name="BlueAngel",description="New Session for BlueAngel Use case",offline_storage_location="storage/")
    prompt_id_1=sp.create_new_prompt(name="GreetUser",description="greeting user at begining of conversation")

    input_parameters={}
    input_parameters["persona"]="Nurse ChatBot"
    input_parameters["audience"]="Patient"
    input_parameters["query"]="Greet the person"
    input_parameters["max_length"]="10"

    generated_prompt=sp.generate_prompt_query(prompt_template="ZeroShotPrompt",prompt_input_parameters=input_parameters)

    llm_response=sp.execute_prompt()

    
    input_parameters={}
    input_parameters["persona"]="Nurse ChatBot"
    input_parameters["audience"]="Patient"
    input_parameters["query"]="Greet John"
    input_parameters["max_length"]="10"

    updated_prompt_id1=sp.update_exisitng_prompt()
    generated_prompt=sp.generate_prompt_query(prompt_template="ZeroShotPrompt",prompt_input_parameters=input_parameters)
    sp.update_input_prompt_query("Greet John Ryan")
    llm_response=sp.execute_prompt()
    
    #------------------------------------------------------------------------------------------------------------------
    
    prompt_id_2=sp.create_new_prompt(name="User Needs",description="asking user is doing today")

    input_parameters={}
    input_parameters["persona"]="Nurse ChatBot"
    input_parameters["audience"]="Patient"
    input_parameters["query"]="ask user how he is doing today and what can we do to help him"
    input_parameters["max_length"]="20"

    generated_prompt=sp.generate_prompt_query(prompt_template="ZeroShotPrompt",prompt_input_parameters=input_parameters)

    llm_response=sp.execute_prompt()

    print(sp.save_prompt())
    sp.view_report()
     


Support and Feedback

If you have any questions, issues, or feedback regarding the PromptVerse package, please reach out to our support team at [support email or forum link]. We value your input and strive to provide timely assistance.

Metadata

Release files for prompt-verse 1.0.1

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

Source distribution (sdist)

Source distribution for prompt-verse 1.0.1
File Size Uploaded
prompt_verse-1.0.1.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prompt-verse 1.0.1
File Interpreter ABI Platform
prompt_verse-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / prompt_verse-1.0.1.tar.gz

Download URL prompt_verse-1.0.1.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
879578d4a22aa75e62effb856c1fca125fd802ec8e5d7fa282b46981f803d642
BLAKE2b-256 checksum
How to use checksums
a60a5359ff44f2b4693ae05dabb244731d56c409412f359b2b061147658d89f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Windows/10

Release files / prompt_verse-1.0.1-py3-none-any.whl

Download URL prompt_verse-1.0.1-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
651ae918c976728ab1857a0d8ff5c33f79b50190fbf2d3373ae1004400cf36f4
BLAKE2b-256 checksum
How to use checksums
6816a41ccf3a692dec799612078cfc29a732134bb7cf9a1913a4ad4d5b55ea10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Windows/10

Release history Release notifications | RSS feed

This release

1.0.1 This release

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