Reports

From Plotting Primitives to Semantic Specifications: Altair as a Token-Efficient Interface for Agentic AI

Pubblico Deposited

Contenuto scaricabile

Scarica il pdf
https://scholar.colorado.edu/concern/reports/t435gg05s
Abstract
  • Agentic AI systems increasingly perform data analysis workflows that require generating executable visualizations.
    In primitive-based plotting libraries, agents must infer the semantic intent of a visualization and also synthesize the procedural code needed to construct figures, axes, legends, layouts, and interactions.
    This paper studies whether a declarative visualization grammar reduces this interface-induced procedural burden.
    We compare Matplotlib, as a primitive-based plotting interface, with Altair/Vega-Lite, as a declarative visualization interface.
    Across 11 visualization tasks, two library conditions, three repeated runs, and four successfully evaluated OpenAI models, we measure first-pass generation tokens, generated code lines, execution success, repair-token behavior, and repeat-run variability.
    The results show no consistent Altair advantage for low-complexity charts. However, for medium and higher-complexity tasks, Altair reduces first-pass generation tokens in most conditions, with aggregate reductions of 22.6\% for medium tasks, 12.1\% for medium-high tasks, and 31.1\% for high-complexity tasks.
    Code-line reductions follow the same pattern. These results suggest that token efficiency is not merely a syntactic property of a library.
    It emerges from the alignment between task semantics, tool semantics, and model capability.
Creator
Date Issued
  • 2026-07-06
Academic Affiliation
Subject
Ultima modifica
  • 2026-07-06
Identifier
  • Altair advantages
Resource Type
Dichiarazione dei diritti
Peer Reviewed
Language

Relazioni

Articoli