Devil's Advocate
A real-time AI debate platform that stress-tests startup ideas: an adversarial voice debater with retrieval memory, live judge scoring over Socket.IO, and a public demo.
Origin
Started as a group prototype in a user-centered machine learning course (CS 568). After the course, I prepared the public demo and added tests and deployment checks.
The problem
Founders pitch to friendly audiences. This does the opposite: you pitch an idea, an adversarial AI attacks your weakest assumptions by voice, a judge panel scores the exchange live, and you leave with a structured report.
How it works
A Socket.IO backend holds per-session state as the single source of truth, with the interface as a projection of it. Events race in a live debate, so anything else gets out of sync.
Gemini Live drives low-latency voice. Structured-output calls against fixed schemas generate the judge scores and the final report, so the interface and the PDF export consume typed data rather than free text. A vector store gives the debater retrieval memory over a startup knowledge base and any documents you upload.
The decision I am proudest of
Every external client is constructed behind a mock gate. One environment variable swaps in deterministic implementations, and the public deployment simply has no model keys in its environment, so a hostile visitor cannot make it spend money.
The public demo uses the same deterministic implementations as the tests. Visitors can try the interface without making live model calls or uploading documents to a model provider.
Where it stands
The same codebase runs fully live with credentials or fully mocked on the open internet. 81 backend tests across 11 files, including a session-lifecycle integration test that boots a real server. Linting, tests, and a production build run in CI on every push, and deploys use Workload Identity Federation rather than long-lived secrets.