OVP vs prompting matplotlib vs Vega-Lite, for agents

If an AI agent has to turn data into a chart, it has three options: write plotting code from a prompt, emit a Vega-Lite spec, or resolve an OVP object. They solve different parts of the problem. This page is the honest comparison, including where OVP is the wrong tool.

The one-line difference

Side by side

 Prompt matplotlibVega-Lite OVP
Same input, same output No. The model improvises; two runs diverge Yes, once you have written the spec Yes. Byte-identical goldens are the conformance suite
Chart choice Whatever the model guesses this time Yours to specify; the grammar does not advise Resolved from audience, purpose and message, with the pattern and decider that justify it
House style Different every run Hand-themed per project 16 named languages; colors are roles, not hex
Honesty guardrails NoneNone Anti-patterns, warn-level charts, and QA checks: pies cap at three slices, waterfalls must reconcile, cumulative curves never fall
Output formats PNG via a code sandbox SVG or canvas via a JS runtime SVG and PPTX from one spec, member-identical decks
What the agent loads Re-derives styling and layout on every call A verbose spec per chart One registry lookup plus a self-contained copy block
Fails loudly on bad input No; it renders something plausible Partially; schema-invalid specs error Yes; the gate rejects off-vocabulary intent and unsound data

Where each one wins

OVP composes with them, not against them

OVP is a layer, not a renderer lock-in. Its tokens already export as matplotlib styles, Plotly templates, and Vega-Lite config blocks (see the report-themes companion repo), so you can keep your existing renderer and still inherit the 16 languages. The decision and determinism live in OVP; the drawing can live wherever you like.

The agent-specific case

For an autonomous agent the failure mode of free-form prompting is not ugliness, it is silent plausibility: a chart that looks right and encodes the wrong thing, differently each run, with no way to test it. OVP replaces "generate a chart" with "resolve an object and render it", which is a lookup with a known-good answer and a golden to check against. That is the whole pitch: deterministic and honest, not plausible.