ai.viz

Write a Vega-Lite chart spec from a description, fitted to the tables, for viz.vegalite to render. The spec is checked by the renderer's own rules before it is emitted.

  • Kind: standard
  • Network: yes
  • Secrets: llm (optional) -- see Secrets

Inputs🔗

NameTypeRequiredDefaultDescription
tablescollection of file (Parquet)yesTables to work from, named t0, t1, ... in order.
descriptionstringyesWhat the artifact should do, in plain language.
modelstringyesModel identifier, exactly as the provider names it (e.g. claude-opus-5-5).
providerstringnoanthropicWho serves the model. The key is the block's llm secret. One of anthropic, openai, openai_compatible.
base_urlstringnoblankEndpoint for an OpenAI-compatible server (vLLM, Ollama, Azure, a gateway). Leave blank for the provider's own API.
sharestringnoschemaHow much of the data the model may see. Column names are always sent; summary statistics reveal values; samples send rows. Everything sent is recorded in the provenance output. One of schema, summary, samples.
max_turnsnumberno12Model calls before the block gives up.
max_tokensnumberno200000Input plus output tokens across all calls, billed to your key.
noncestringnoblankChange to generate afresh with nothing else changed; the block ignores its value.

Outputs🔗

NameTypeDescription
specfile (Vega-Lite)The chart spec.
provenancejsonEvery tool result sent to the model, the model and endpoint used, and token usage.

Example🔗

- id: "@viz"
  name: ai.viz
  inputs: [{block: "@plots", output: result, as: tables}]
  args:
    description: Biomass by species, one panel per state.
    provider: anthropic
    model: claude-opus-5-5
    share: summary
  secrets:
    llm: my-anthropic-key