In Web3, we reject single points of failure. Yet daily, millions rely on individual AI responses without cross-validation. What if we applied decentralized thinking to AI interactions?
I built AI Debate - a tool that orchestrates iterative debates between ChatGPT and Claude until they reach consensus. No central authority. No single truth. Just convergent intelligence through structured opposition.
AI Debate implements a simple yet powerful protocol:
// Core consensus mechanism
async function runDebate(question, maxRounds = 5) {
let claudeResponse = await askClaude(question);
let gptResponse = await askGPT(question);
for(let i = 0; i < maxRounds; i++) {
// Cross-pollination of ideas
claudeResponse = await askClaude(`${gptResponse}\n\nYour thoughts?`);
gptResponse = await askGPT(`${claudeResponse}\n\nYour thoughts?`);
// Convergence detection via Jaccard similarity
if(checkConvergence(claudeResponse, gptResponse)) break;
}
return {claudeResponse, gptResponse, rounds: i};
}
Key Observations:
Convergence typically occurs within 3-5 rounds
Final outputs exceed individual model capabilities
Each iteration reveals unique reasoning patterns
Bias reduction through adversarial validation
AI Debate embodies core Web3 principles:
No single AI holds authority. Multiple models validate each other, creating resilient intelligence resistant to individual model failures or biases.
Watch every debate round unfold. No black box - full visibility into the convergence process. Every iteration logged, every exchange traceable.
BYOK (Bring Your Own Keys) architecture. Your keys never leave your browser. No middleman. No data harvesting. No surveillance capitalism.
Completely open source. Fork it. Modify it. Commercialize it. No licenses. No restrictions. True digital commons.
Zero Infrastructure Required:
Pure client-side JavaScript
Single HTML file deployment
No backend dependencies
No build process
No package management hell
Security Model:
API keys stored locally via browser localStorage
All API calls direct from client to provider
No proxy servers collecting data
No analytics or tracking
Convergence Algorithm:
Jaccard similarity coefficient on trigrams
Configurable threshold (default 0.7)
Automatic termination on convergence
Maximum round limit prevents infinite loops
Multiple AIs review contract code simultaneously. Cross-validation identifies vulnerabilities that single-model analysis might miss.
Generate balanced proposals through AI debate. Natural opposition creates more thoughtful, comprehensive governance documents.
Test trading strategies against multiple AI perspectives. Reduce single-model risk in financial decision-making.
Investigate projects, protocols, and technologies through multi-model analysis. Uncover blind spots through systematic opposition.
Generate balanced analyses, technical documentation, and educational content through iterative refinement.
The entire tool fits in a single HTML file. No webpack. No npm. No Docker. Just save and open.
<!DOCTYPE html>
<html>
<head>
<title>AI Debate</title>
</head>
<body>
<!-- Complete implementation available on GitHub -->
<!-- Your API keys, your control -->
</body>
</html>
Current Support:
OpenAI GPT models (3.5, 4, 4-turbo)
Anthropic Claude models (Opus, Sonnet, Haiku)
Planned Additions:
Gemini integration
Llama support via Replicate
Custom model endpoints
IPFS storage for debate histories
On-chain verification of AI outputs
No copyright. No patents. No restrictions. This is a gift to the commons.
GitHub Repository: github.com/vividaphoto/ai-debate
⚠️ IMPORTANT WARNINGS:
Use dedicated API keys with spend limits
Never share API keys or commit them to repositories
Keys are stored in browser localStorage - clear them on shared computers
Consider using separate keys for experimentation
You are responsible for ALL API costs incurred
Both OpenAI and Anthropic charge per token
Debates can consume significant tokens (5 rounds = 10 API calls)
Set hard spending limits on your API accounts
Monitor usage carefully
Users must comply with OpenAI's usage policies
Users must comply with Anthropic's acceptable use policy
Automated interactions between models may have implications
You are solely responsible for compliance
NO WARRANTY: This software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.
LIMITATION OF LIABILITY: In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
USE AT YOUR OWN RISK: The user assumes all responsibility and risk for the use of this software. The authors disclaim all warranties and liabilities. You are solely responsible for:
API costs incurred through usage
Compliance with third-party terms of service
Security of your API keys
Verification of AI-generated content
Any decisions made based on AI outputs
CONTENT VERIFICATION: AI-generated content should never be trusted without human verification. Do not use AI outputs for:
Medical decisions
Legal advice
Financial investments
Safety-critical systems
Any decision with potential for harm
The future of AI isn't monopolistic control - it's collaborative intelligence through structured opposition.
Access AI Debate:
The tool is ready. The models are waiting. What questions deserve adversarial validation? What truths emerge from structured opposition? What consensus awaits discovery?
In a world drowning in single-source AI responses, AI Debate offers something different: intelligence through opposition, truth through iteration, consensus through conflict.
The debates begin now.
Built with curiosity by @VividaPhotoPC
This is experimental software for research and educational purposes. Use at your own risk. Always verify AI outputs independently.
Philosophy Question:
Round 1: Significant divergence on free will
Round 3: Models find common ground on compatibilism
Round 5: Nuanced consensus incorporating both perspectives
Technical Question:
Round 1: Different optimization approaches
Round 2: Each model acknowledges other's valid points
Round 3: Hybrid solution emerges
Creative Writing:
Round 1: Distinct narrative styles
Round 4: Styles blend into unique voice
Round 5: Superior story neither could write alone
The magic isn't in the individual models - it's in the space between them.
This tool is and will remain free forever. If you find value in AI Debate:
Star the GitHub repository
Share your debate results
Contribute code improvements
Build something amazing with it
No donations needed. Your innovations are payment enough.
We stand at the intersection of AI and Web3 philosophy. AI Debate proves that adversarial collaboration produces superior outcomes. No central authority needed. No corporate overlord required.
Just code, keys, and convergence.
Welcome to decentralized intelligence.
For developers interested in the convergence algorithm:
function jaccardSimilarity(text1, text2) {
const trigrams1 = new Set(getTrigrams(text1));
const trigrams2 = new Set(getTrigrams(text2));
const intersection = new Set(
[...trigrams1].filter(x => trigrams2.has(x))
);
const union = new Set([...trigrams1, ...trigrams2]);
return intersection.size / union.size;
}
Threshold of 0.7 empirically determined through testing. Adjust based on your use case.
Remember: With great AI power comes great responsibility. Debate wisely.