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
  • Code Setup - New Environment
  • Step 5: Run your code!
  1. Getting Started
  2. Quickstart

Quickstart - Archive

Empromptu is an AI Accuracy Platform that helps you optimize your AI responses by refining the prompts that drive them. 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, and help you understand how to use our features to improve your AI application's performance.

Code Setup – Existing Environment

To add Empromptu to an existing codebase:

Install the Empromptu Library:

pip install http://impromptu-packages.s3-website-us-west-2.amazonaws.com/impromptu-0.4.21-py3-none-any.whl
  1. Integrate into Your Code:

    1. Import the Empromptu library in your project.

    2. Follow our integration guide in the demo script (demo_prompt_manifolds.py) as a template:

      • Add hooks where you call your LLM, ensuring that the prompt, input data, and LLM input/output are logged.

  2. Configure Your Environment:

Make sure your environment has the OpenAI API key set:

export OPENAI_API_KEY=<your_openai_api_key_here>

Code Setup - New Environment

If you want to experiment with Empromptu in a new or demo environment, setting up that environment is easy:

  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

  1. Install the Empromptu library:

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

  1. Add the OpenAI credential to your environment (assuming you're using OpenAI, our demos are currently written using this system):

export OPENAI_API_KEY=<api_key_goes_here>

  1. Now have a look at the examples and run one, e.g.:

python demo_prompt_manifolds.py

  1. Add your new Empromptu API key into the appropriate line

Step 5: Run your code!

  1. Define the function that runs your code with Empromptu optimizer to get back better results

// Some code
// Some code
// Some code

  1. Run your code

  2. Return to Empromptu's UI to see if Empromptu is optimizing your data!

PreviousQuickstartNextAdvanced Configuration

Last updated 1 month ago

This should send all the prompts and events to the server. Then log onto as before and have a look!

http://analytics.empromptu.ai:8501/