No.417 · Analytics
Model Bench
Compare AI models the way you'd choose one: score against cost or time, an efficient frontier, and a linked ranking with 95% intervals.
The prompt
Written for the variant you picked above: Light
Build a benchmark view for comparing AI models, in SVG and React with no chart library. The headline is the takeaway in words — "Orion 3 leads at 71.4% · Orion 3 Mini gets 89% of that for 21% of the cost" — computed from the data: the top scorer, and the cheapest (or fastest, matching the x axis) frontier model that reaches at least 88% of its score. Left: a scatter of score (y, %, gridlines every 5) against cost per task or median time per task (x, log scale with 1-2-5 ticks, labelled with which direction is better). A segmented control switches the x measure and every dot glides to its new position (650ms, cubic out). Each model is a dot in its provider's colour (fixed by provider order in a colour-blind-checked five-colour palette, so hiding a provider never repaints the others), with a vertical whisker for its 95% interval and a direct label. The efficient frontier — models nothing beats on both score and the x measure — is a dashed line, and frontier models are drawn filled while dominated ones are hollow. Right: the same models ranked by score as compact bars with their interval as a faint band behind each bar. Hovering a dot or a row (or focusing a row) highlights that model in both views and dims the rest; a tooltip gives provider, score with interval, cost and time. Provider legend chips toggle providers on and off. A Table button swaps the chart for a full results table. The demo data is fictional. Selected variant — Light (light): Palette for this theme (Light): --grid #e9e8e2; --ink #0b0b0b; --ink-2 #52514e; --muted #898781; --ring rgba(11, 11, 11, 0.1); --surface #fcfcfb. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "light". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Switch between cost and time on the x axis; hover a dot or a row to highlight a model in both views; toggle providers in the legend; use Table for the numbers. Motion: Dots tween between axes over 650ms; bars ease 600ms; highlights fade 200ms. Accessibility: The chart has a summary label, the ranking is an ordered list of focusable rows that highlight the model, colour always comes with a name (labels, legend, list), and a full table view is one click away. Reduced motion jumps between axes. Responsive behavior: The scatter and ranking sit side by side and stack under 760px; the SVG scales with its width. Touch: Tap rows or dots to highlight; the table view covers precise reading. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Switch between cost and time on the x axis; hover a dot or a row to highlight a model in both views; toggle providers in the legend; use Table for the numbers.
- Motion
- Dots tween between axes over 650ms; bars ease 600ms; highlights fade 200ms.
- Accessibility
- The chart has a summary label, the ranking is an ordered list of focusable rows that highlight the model, colour always comes with a name (labels, legend, list), and a full table view is one click away. Reduced motion jumps between axes.
- Responsive
- The scatter and ranking sit side by side and stack under 760px; the SVG scales with its width.
- On touch
- Tap rows or dots to highlight; the table view covers precise reading.