Empromptu Docs
  • Welcome
  • Getting Started
    • Take a Tour of Empromptu
    • How do you define Accuracy?
    • Quickstart
      • Quickstart - Archive
  • Advanced Configuration
  • No App, Use Prompt Optimizer
  • Examples
  • Basics
    • Projects and Tasks
    • Prompts Overview
      • Manual Optimization
      • Automatic Optimization
    • Input Optimization
    • Edge Case Optimizer
    • Evaluations
    • Models
    • Data Generator
    • Core Concepts
    • Usage Guide
      • Data Viewer
      • Performance Over Time
      • Prompt Explorer
      • Show Input Space
      • Prompt Performance
      • Prompt Playground
    • Best Practices
    • FAQ
    • Troubleshooting
Powered by GitBook
On this page
  • Use this guide if you have an AI application
  • Step 0: Code Setup - New Environment
  • Step 1: Install Empromptu's Library
  • Step 2: Create an Empromptu account to generate your API Key
  • Step 3: Import Empromptu's Library
  • Step 4: Update your application code to use Empromptu’s library
  • Step 5: Run your code!
  • What's Next
  1. Getting Started

Quickstart

PreviousHow do you define Accuracy?NextQuickstart - Archive

Last updated 1 month ago

Empromptu is an AI Accuracy Platform that helps you create and optimize your AI application to deliver 98% accuracy and reliability automatically.

We start optimizing your AI responses by refining the prompts that drive them. Instead of writing your prompts in plain text and tinkering with them, we use agents and AI to send your prompt to our prompt registry where we will send you a fully optimized prompt back in real-time with low latency.

Our goal is to ensure that for every user input into your system, you achieve at least 98% accurate outputs. This guide is designed to get you up and running quickly no matter if you are a hobbyist developer to the most sophisticated AI team.

Use this guide if you have an AI application

.

Step 0: Code Setup - New Environment

If you want to experiment with Empromptu in a new or demo environment, setting up that environment is easy. If you already have an application to install Empromptu's library you can skip to step 1.

  1. First, install python 3.11 or higher::

sudo apt install python3.11 --upgrade

  1. Start a new virtualenv (or whatever system you prefer):

virtualenv -p python3.11 venv && source venv/bin/activate

Step 1: Install Empromptu's Library

  1. In your terminal:

pip install http://impromptu-packages.s3-website-us-west-2.amazonaws.com/impromptu-0.5.11-py3-none-any.whl

Step 2: Create an Empromptu account to generate your API Key

  1. Go to the Empromptu Sign-Up Page → [Insert Sign-Up Link] and register using your email and create a password.

  2. Head to the Settings page.

  3. Copy your API key.

Step 3: Import Empromptu's Library

  1. Using a code editor open the application where you want to use Empromptu

  2. Find where you call your LLM

  3. Import Empromptu’s Library and the debugger library by pasting the following lines at the top of the file.

    1. (Note: You can always turn off the debugger later)

from impromptu.prompt_tools import prompt_registry
from impromptu.model_utils import ModelUtils
import logging
  1. Paste the debugger lines and your Empromptu API key at the top of the file.

logger = logging.getLogger("impromptu")
logger.setLevel(level=logging.INFO)
prompt_registry.set_api_key("xxxxxxxxxxxx")
logger = logging.getLogger("impromptu")
logger.setLevel(level=logging.INFO)
from dotenv import load_dotenv
import os
load_dotenv()
empromptu_api_key = os.getenv("EMPROMPTU_API_KEY")

Step 4: Update your application code to use Empromptu’s library

This is the most important step of Empromptu. We are going to replace where you define your prompts with an optimized prompt from Empromptu's prompt library.

Using our UI

  1. Grab your custom Integration Code Snippet.

  2. Find where you send your prompt to your LLMs.

  3. Paste Empromptu’s Prompt Registry, Auto Scorer, and Auto Logger in the place where you call your prompts.

Without using our UI

  1. Find where you send your prompt to your LLMs.

  2. Paste the following code snippet, Empromptu’s Prompt Registry, Auto Scorer, and Auto Logger in the place where you call your prompts

prompt_context = prompt_registry.get_prompt(prompt_family_name,input_data)
prompt_registry.set_autolog()
ModelUtils.score_and_log(prompt_family_name,prompt_context)

Step 5: Run your code!

  1. Once you run your code. You should see data show up on the dashboard and on the inputs page.

What's Next

Lets review what you have accomplished:

You have installed Empromptu's library which includes, your new prompt registry, an auto-logger, our custom models to score all of your prompts to ensure that you are getting the most accurate and reliable prompts in real time with low latency.

  • Create new prompts using

    • Empromptu's UI

    • In your code

  • Define or upload your evaluations

  • Optimize your input data

  • Optimize your edge cases.

If you are setting up a new environment, check out our .

If you get stuck on this step, please do not hesitate to chat with a .

Go to our UI and create a that describes your AI Flow

Want to get fancy? You can discover and configure all of your options by visiting our

Are you stuck? We're on standby to help. Talk to a technical expert

If you don't have an AI app and want to use our No-code UI, no problem, go here
example code library here
technical expert here
Project and a Task
config guide here.
here.