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:
Integrate into Your Code:
Import the Empromptu library in your project.
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.
Configure Your Environment:
Make sure your environment has the OpenAI API key set:
Code Setup - New Environment
If you want to experiment with Empromptu in a new or demo environment, setting up that environment is easy:
First, install python 3.11 or higher::
sudo apt install python3.11 --upgrade
Start a new virtualenv (or whatever system you prefer):
virtualenv -p python3.11 venv && source venv/bin/activate
Install the Empromptu library:
pip install http://impromptu-packages.s3-website-us-west-2.amazonaws.com/impromptu-0.4.21-py3-none-any.whl
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>
Now have a look at the examples and run one, e.g.:
python demo_prompt_manifolds.py
Add your new Empromptu API key into the appropriate line
Step 5: Run your code!
Define the function that runs your code with Empromptu optimizer to get back better results
Run your code
Return to Empromptu's UI to see if Empromptu is optimizing your data!
Last updated