CoolFace
Apppublic

NetaHa/LLM-debate-arena

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
App README

Debate Bots App

A Gradio-based web application that facilitates AI-powered debates between different language models. Two AI models (affirmative and negative sides) engage in a structured debate on a given topic, with a third AI model serving as the judge to evaluate and score the debate, according to pre-defined scoring criteria.

Tech Stack

Python | OpenAI Client | Prompt Engineering | State management for multi-turn conversations | Gradio

Features

  • Multi-Model Support: Supports OpenAI, Anthropic Claude, and Grok models
  • Structured Debate Format: 6-turn debate with constructive speeches, rebuttals, and closing statements
  • Real-time Streaming: Watch debates unfold in real-time with streaming responses
  • AI Judge: Automated evaluation by an AI judge that scores both teams on multiple criteria
  • Interactive UI: Built with Gradio for an intuitive web interface
  • Pre-configured Examples: Try out example debates with different model combinations

Debate Structure

The debate follows a structured format with 6 turns:

  1. 1.Affirmative - Constructive Speech
  2. 2.Negative - Constructive Speech
  3. 3.Affirmative - Rebuttal
  4. 4.Negative - Rebuttal
  5. 5.Affirmative - Closing Speech
  6. 6.Negative - Closing Speech

After all turns are complete, a judge model evaluates the debate and scores each team on:

  • Organization and Clarity (1-4)
  • Use of arguments (1-4)
  • Use of examples and facts (1-4)
  • Use of rebuttal (1-4)
  • Presentation style (1-4)

How it works?

  1. 1.Choose a debate topic (or use one of the pre-configured examples)
  2. 2.Select model for each role: affirmative, negative, and judge (GPT, Claude, or Grok)
  3. 3.Click "Start Debate" to start the first speech, and then "Next Turn" to proceed through the debate
  4. 4.Watch as the models debate in real-time, with responses streaming in as they're generated
  5. 5.After all 6 turns are complete, the final click on "Next Turn" will call the judge to evaluate the debate and declare a winner

Supported Models

Currently for cost reasons the supported models are:

  • GPT: gpt-5-nano (OpenAI)
  • Claude: claude-haiku-4-5 (Anthropic)
  • Grok: grok-4-fast-reasoning (xAI)

but any models compatible with the OpenAI client can be easily added.

Dependencies

  • openai>=1.30.0 - OpenAI Python client library
  • gradio>=4.0.0 - Web UI framework
  • python-dotenv>=1.0.0 - Environment variable management

Notes

  • The application uses streaming to provide real-time updates, with a 50ms delay per chunk for better readability
  • The debate format can be customized by modifying the turns and speeches arrays in the code