Skip to content

SAGAR-TAMANG/prompt-duel-main

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

PromptDuel

The Open Source A/B Testing Arena for LLMs.
View Live Demo »

Report Bug · Request Feature

Interface

App Screenshot
Table of Contents
  1. About The Project
  2. Getting Started
  3. Key Features
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

"Stop guessing which prompt is better. Duel them and let the data decide."

When developing AI Agents, small semantic changes in a prompt can lead to drastically different outputs. Tracking this in spreadsheets is messy. You need a way to blind test these outputs against each other to get clean, unbiased data.

PromptDuel is a lightweight tool designed for AI Engineers and Prompt Designers. It solves the "vibe check" problem by providing a structured, data-driven environment to evaluate LLM outputs side-by-side.

(back to top)

Built With

  • Next
  • React
  • Tailwind
  • Supabase
  • Shadcn/UI
  • Recharts
  • @dnd-kit

(back to top)

Getting Started

To run this code locally and start your own duel arena, follow these steps.

Prerequisites

  • Node.js (v18+)
  • npm or pnpm

Installation

  1. Clone the repo

    git clone https://github.com/SAGAR-TAMANG/prompt-duel-main.git
  2. Install dependencies

npm install
  1. Environment Setup Create a .env.local file in the root directory and add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. Database Migration Run the SQL scripts provided in supabase/migrations (or the SQL editor) to set up the duels and votes tables.
  2. Run the development server
npm run dev

(back to top)

Features

  • ⚖️ Side-by-Side Arena: A clean, split-screen interface for comparing two text outputs (supports Markdown).
  • 🫣 Blind Testing Mode: Model names are hidden from voters to ensure unbiased feedback.
  • 🔗 Instant Sharing: Generate public, read-only links for clients or team members to cast votes.
  • 📊 Analytics Dashboard: Track vote velocity and win rates visually.
  • 🔐 Secure: Row Level Security (RLS) via Supabase ensures data integrity.

(back to top)

Roadmap

  • Design & Develop the Arena UI
  • Implement Drag & Drop Duel Management
  • Integrate Recharts for Vote Velocity
  • Supabase Integration for Real-time Voting
  • Elo Rating System: Calculate Elo scores for prompts across multiple duels.
  • API Integration: Auto-fetch outputs from OpenAI/Anthropic directly.
  • Export Data: Download vote results as CSV/JSON.

See the open issues for a full list...

(back to top)

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Sagar Tamang - LinkedIn

Project Link: https://github.com/SAGAR-TAMANG/prompt-duel-main

(back to top)

Acknowledgments

(back to top)

About

PromptDuel - Stop guessing which prompt is better. Duel them and let the data decide.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors