PolyThink-Alpha / README.md
KuberMehta's picture
Upload 3 files
0bfdd2a verified

A newer version of the Gradio SDK is available: 5.25.2

Upgrade
metadata
title: PolyThink-YC
emoji: 💭
colorFrom: gray
colorTo: gray
sdk: gradio
sdk_version: 5.11.0
app_file: App.py
pinned: true

PolyThink Multi-Agent Problem Solver

A multi-agent system that uses multiple AI models to solve problems collaboratively through a consensus-based approach.

Architecture

PolyThink uses a multi-agent architecture with three specialized AI models:

  1. Solver Agents:

    • Cohere Command R: A powerful reasoning model that generates concise solutions
    • Llama 3.2 3B: A Meta AI model that provides alternative perspectives
  2. Judge Agent:

    • Gemini 2.0 Flash Thinking: Evaluates solutions from solver agents and determines if they agree

The system works through multiple rounds of solution refinement until consensus is reached or the maximum number of rounds is completed.

Setup

  1. Clone this repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Set up your API keys:

Usage

Run the application:

python App.py

The application will launch a Gradio interface where you can:

  1. Enter your API keys for each service
  2. Input a problem or question
  3. Choose the number of rounds for solution refinement (1-3)
  4. Watch as multiple AI agents collaborate to solve the problem in real-time

Process Flow

  1. Two solver agents generate initial solutions independently
  2. The judge agent evaluates if the solutions agree
  3. If solutions disagree, solver agents refine their answers based on feedback
  4. Process repeats until agreement is reached or max rounds completed
  5. A final report is generated showing the problem-solving process

Dependencies

  • gradio: Web interface framework
  • huggingface_hub: Access to Hugging Face models
  • cohere: Access to Cohere models
  • google-genai: Access to Google's Gemini models

Note

This application requires valid API keys for Hugging Face, Cohere, and Google Gemini. Make sure you have sufficient API credits for your usage.