OpenPipe
OpenPipe is a flexible playground for comparing and optimizing LLM prompts. It lets you quickly generate, test and compare candidate prompts, and can automatically translate those prompts between models.
You can use our hosted version of OpenPipe at https://openpipe.ai. You can also clone this repository and run it locally.
Sample Experiments
These are simple experiments users have created that show how OpenPipe works. Feel free to fork them and start experimenting yourself.
Supported Models
- All models available through the OpenAI chat completion API
- Llama2 7b chat, 13b chat, 70b chat.
- Anthropic's Claude 1 Instant and Claude 2
Features
🔍 Visualize Responses
Inspect prompt completions side-by-side.
🧪 Bulk-Test
OpenPipe lets you template a prompt. Use the templating feature to run the prompts you're testing against many potential inputs for broad coverage of your problem space.
📟 Translate between Model APIs
Write your prompt in one format and automatically convert it to work with any other model.
🛠️ Refine Your Prompts Automatically
Use a growing database of best-practice refinements to improve your prompts automatically.
🪄 Auto-generate Test Scenarios
OpenPipe includes a tool to generate new test scenarios based on your existing prompts and scenarios. Just click "Autogenerate Scenario" to try it out!
Running Locally
- Install Postgresql.
- Install NodeJS 20 (earlier versions will very likely work but aren't tested).
- Install
pnpm:npm i -g pnpm - Clone this repository:
git clone https://github.com/openpipe/openpipe - Install the dependencies:
cd openpipe && pnpm install - Create a
.envfile (cp .env.example .env) and enter yourOPENAI_API_KEY. - Update
DATABASE_URLif necessary to point to your Postgres instance and runpnpm prisma migrate devto create the database. - Create a GitHub OAuth App and update the
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETvalues. (Note: a PR to make auth optional when running locally would be a great contribution!) - Start the app:
pnpm dev. - Navigate to http://localhost:3000
Testing Locally
- Copy your
.envfile to.env.test. - Update the
DATABASE_URLto have a different database name than your development one - Run
DATABASE_URL=[your new datatase url] pnpm prisma migrate dev --skip-seed --skip-generate - Run
pnpm test