No description
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| debates/open-weights-regulation | ||
| src | ||
| topics | ||
| .env.example | ||
| .gitignore | ||
| models.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
AI Debates
AI models steelman each side of a proposition. Then a neutral model writes a synthesis: the strongest case for each side, common ground, and the cruxes the disagreement turns on. The goal is getting closer to the truth, not comparing models.
Run a debate
npm install
# put your key in .env (copy .env.example), or set OPENROUTER_API_KEY in the shell
npm run debate -- topics/open-weights-regulation.json
--research <n>sets how many research questions each side investigates on the web first (default 4, 0 to skip).--fact-checks <n>sets how many of the other side's opening claims each side checks before rebuttals (default 2, 0 to skip).--max-cost <dollars>caps what one debate may spend (default $1.50, orMAX_COST_PER_DEBATEin.env). The cap is also lowered to whatever your key has left under its OpenRouter limit. If a run hits the cap, it stops cleanly and saves what it finished as.partial.md.--dry-runruns the whole pipeline with placeholder text and no API calls.--seed <s>reproduces a model assignment. By default the current time is used, so models rotate across sides.--models <file>uses a different model pool (defaultmodels.json, OpenRouter model ids). Runnpm run models -- <search>to find current ids. Unknown ids are rejected before any spending.
Each debate is saved to debates/<slug>/<timestamp>.md (readable) and .json (data). To make the Markdown for an older JSON file, run npm run render -- <file>.json.
How a debate runs
- Each position gets a different model from the pool, and the synthesis model is one that argued no side.
- Research: each side writes its own research questions, including one hunting for evidence against itself, and answers them with web search (OpenRouter's web plugin). The results become that side's cited evidence brief.
- Opening statements, grounded in the brief. Claims not in the brief must be marked "(unverified)".
- Fact-check: each side picks the other side's most important factual claims and checks them on the web.
- Rebuttals and closing statements. All sides in a round see only earlier rounds, and the speaking order rotates.
- A neutral synthesis, which sees all the research and judges claims against it.
Prompts live in src/prompts.ts.