Idea · Aug 14, 2026
Prompt Diff
A single-page app that runs your prompt five times in parallel via the Claude API, then renders outputs side-by-side with a semantic similarity heatmap and visual diff, so you can see exactly how much a prompt's wording changes its behavior.
What it would do
Prompt Diff surfaces the hidden non-determinism in LLM outputs by making it visual. You type a prompt, hit Run x5, and the app fires five simultaneous Claude API calls. Results appear in a grid; a cosine-similarity heatmap (computed client-side from sentence embeddings) colors each pair from green (highly similar) to red (divergent). A token-level diff view highlights where runs disagree word by word. You can then edit the prompt and re-run, and a side panel overlays the old vs. new heatmap so you can measure whether your rewrite reduced variance or shifted meaning. A 'stability score' summarizes the average pairwise similarity so you can quickly judge prompt robustness. No backend needed beyond the Claude API key: everything runs in the browser. The project works equally well as a personal debugging tool and as a classroom demo for AI literacy, illustrating sampling temperature and stochastic generation concretely rather than abstractly.
Key features
- Five-way parallel prompt execution with real-time streaming output
- Cosine-similarity heatmap across all output pairs using client-side sentence embeddings
- Token-level diff view highlighting divergences between any two selected runs
- Before/after heatmap overlay for comparing prompt variants
- Stability score summarizing average pairwise similarity per run batch