2023-08-23 19:37:05 -07:00
2023-08-23 16:13:21 -07:00
2023-08-23 19:37:05 -07:00
2023-08-12 23:50:31 -07:00
2023-08-23 19:37:05 -07:00
2023-08-23 16:13:21 -07:00
2023-08-21 13:54:23 -07:00
2023-08-18 13:01:01 -07:00

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.

demo

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

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

  1. Install Postgresql.
  2. Install NodeJS 20 (earlier versions will very likely work but aren't tested).
  3. Install pnpm: npm i -g pnpm
  4. Clone this repository: git clone https://github.com/openpipe/openpipe
  5. Install the dependencies: cd openpipe && pnpm install
  6. Create a .env file (cp .env.example .env) and enter your OPENAI_API_KEY.
  7. Update DATABASE_URL if necessary to point to your Postgres instance and run pnpm prisma migrate dev to create the database.
  8. Create a GitHub OAuth App and update the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET values. (Note: a PR to make auth optional when running locally would be a great contribution!)
  9. Start the app: pnpm dev.
  10. Navigate to http://localhost:3000

Testing Locally

  1. Copy your .env file to .env.test.
  2. Update the DATABASE_URL to have a different database name than your development one
  3. Run DATABASE_URL=[your new datatase url] pnpm prisma migrate dev --skip-seed --skip-generate
  4. Run pnpm test
Description
Turn expensive prompts into cheap fine-tuned models
Readme Apache-2.0 5 MiB
Languages
TypeScript 88.9%
Python 8.9%
JavaScript 1.3%
PLpgSQL 0.4%
Shell 0.3%
Other 0.2%