# microsoft/viseval architecture

> Architecture diagram of the GitHub repository microsoft/viseval, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/viseval
- Repository: https://github.com/microsoft/viseval

## Overview

VisEval is a benchmark toolkit for assessing generated visualizations for validity, query/ground-truth correctness, and readability. The user supplies a Dataset and an Agent; Evaluator iterates benchmark queries and tables, asks the agent to generate and execute chart code, then applies validity and legality checks and optional readability checks before producing evaluation details and scores. The graph preserves chart parsing, temporal comparison, layout inspection, and vision-model assessment as distinct capabilities. Source excerpts show the principal orchestration and several checker implementations; links to checkers invoked in unsampled evaluator sections are supported by the evaluator’s indexed references.

Main entry points: [`viseval/evaluate.py`](https://github.com/microsoft/viseval/blob/main/viseval/evaluate.py) (Evaluator), [`viseval/agent.py`](https://github.com/microsoft/viseval/blob/main/viseval/agent.py) (Generation Agent), [`viseval/dataset.py`](https://github.com/microsoft/viseval/blob/main/viseval/dataset.py) (Dataset Loader), [`viseval/check/deconstruct.py`](https://github.com/microsoft/viseval/blob/main/viseval/check/deconstruct.py) (SVG Deconstruction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Benchmark Inputs"]
  node_dataset["Dataset Loader<br/>[dataset.py]"]
  node_benchmark_data[("Benchmark Data")]
end

subgraph group_runtime["Generation Runtime"]
  node_agent["Generation Agent<br/>[agent.py]"]
  node_evaluator["Evaluator<br/>[evaluate.py]"]
  node_execution["Agent Execution<br/>[agent.py]"]
end

subgraph group_correctness["Validity and Legality"]
  node_surface["SVG Surface Check"]
  node_deconstruct["SVG Deconstruction<br/>[deconstruct.py]"]
  node_chart["Chart Type Check<br/>[chart_check.py]"]
  node_data["Data Check<br/>[data_check.py]"]
  node_order["Order Check<br/>[order_check.py]"]
  node_time["Time Utilities<br/>[time_utils.py]"]
end

subgraph group_readability["Readability Evaluation"]
  node_layout["Layout Check<br/>[layout_check.py]"]
  node_scale["Scale and Ticks"]
  node_readability["Readability Check"]
end

subgraph group_results["Evaluation Results"]
  node_results["Evaluation Results<br/>[evaluate.py]"]
end

node_user(("Benchmark User"))
node_webdriver["Chrome WebDriver"]
node_vision["Vision Model"]

node_user -->|"configures"| node_dataset
node_benchmark_data -->|"loads"| node_dataset
node_user -->|"provides"| node_agent
node_user -->|"configures"| node_evaluator
node_evaluator -->|"reads benchmark"| node_dataset
node_evaluator -->|"requests generation"| node_agent
node_evaluator -->|"requests execution"| node_execution
node_agent -->|"implements"| node_execution
node_evaluator -->|"checks SVG"| node_surface
node_evaluator -->|"deconstructs SVG"| node_deconstruct
node_evaluator -->|"checks chart"| node_chart
node_evaluator -->|"checks data"| node_data
node_evaluator -->|"checks order"| node_order
node_data -->|"uses time parsing"| node_time
node_deconstruct -->|"uses time parsing"| node_time
node_evaluator -->|"checks layout"| node_layout
node_layout -->|"drives browser"| node_webdriver
node_evaluator -->|"checks scales"| node_scale
node_evaluator -->|"assesses readability"| node_readability
node_scale -->|"queries model"| node_vision
node_readability -->|"queries model"| node_vision
node_evaluator -->|"produces scores"| node_results

click node_dataset "https://github.com/microsoft/viseval/blob/main/viseval/dataset.py"
click node_benchmark_data "https://github.com/microsoft/viseval/blob/main/viseval_dataset.zip"
click node_agent "https://github.com/microsoft/viseval/blob/main/viseval/agent.py"
click node_evaluator "https://github.com/microsoft/viseval/blob/main/viseval/evaluate.py"
click node_execution "https://github.com/microsoft/viseval/blob/main/viseval/agent.py"
click node_surface "https://github.com/microsoft/viseval/blob/main/viseval/check/surface_form_check.py"
click node_deconstruct "https://github.com/microsoft/viseval/blob/main/viseval/check/deconstruct.py"
click node_chart "https://github.com/microsoft/viseval/blob/main/viseval/check/chart_check.py"
click node_data "https://github.com/microsoft/viseval/blob/main/viseval/check/data_check.py"
click node_order "https://github.com/microsoft/viseval/blob/main/viseval/check/order_check.py"
click node_time "https://github.com/microsoft/viseval/blob/main/viseval/check/time_utils.py"
click node_layout "https://github.com/microsoft/viseval/blob/main/viseval/check/layout_check.py"
click node_scale "https://github.com/microsoft/viseval/blob/main/viseval/check/scale_and_ticks_check.py"
click node_readability "https://github.com/microsoft/viseval/blob/main/viseval/check/readability_check.py"
click node_results "https://github.com/microsoft/viseval/blob/main/viseval/evaluate.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_benchmark_data,node_user toneBlue
class node_agent,node_evaluator,node_execution toneAmber
class node_surface,node_deconstruct,node_chart,node_data,node_order,node_time toneMint
class node_layout,node_scale,node_readability toneRose
class node_results,node_webdriver,node_vision toneIndigo
```

## Components

### Benchmark Inputs

- [Dataset Loader](https://github.com/microsoft/viseval/blob/main/viseval/dataset.py): `viseval/dataset.py`
- [Benchmark Data](https://github.com/microsoft/viseval/blob/main/viseval_dataset.zip): `viseval_dataset.zip`

### Generation Runtime

- [Generation Agent](https://github.com/microsoft/viseval/blob/main/viseval/agent.py): `viseval/agent.py`
- [Evaluator](https://github.com/microsoft/viseval/blob/main/viseval/evaluate.py): `viseval/evaluate.py`
- [Agent Execution](https://github.com/microsoft/viseval/blob/main/viseval/agent.py): `viseval/agent.py`

### Validity and Legality

- [SVG Surface Check](https://github.com/microsoft/viseval/blob/main/viseval/check/surface_form_check.py): `viseval/check/surface_form_check.py`
- [SVG Deconstruction](https://github.com/microsoft/viseval/blob/main/viseval/check/deconstruct.py): `viseval/check/deconstruct.py`
- [Chart Type Check](https://github.com/microsoft/viseval/blob/main/viseval/check/chart_check.py): `viseval/check/chart_check.py`
- [Data Check](https://github.com/microsoft/viseval/blob/main/viseval/check/data_check.py): `viseval/check/data_check.py`
- [Order Check](https://github.com/microsoft/viseval/blob/main/viseval/check/order_check.py): `viseval/check/order_check.py`
- [Time Utilities](https://github.com/microsoft/viseval/blob/main/viseval/check/time_utils.py): `viseval/check/time_utils.py`

### Readability Evaluation

- [Layout Check](https://github.com/microsoft/viseval/blob/main/viseval/check/layout_check.py): `viseval/check/layout_check.py`
- [Scale and Ticks](https://github.com/microsoft/viseval/blob/main/viseval/check/scale_and_ticks_check.py): `viseval/check/scale_and_ticks_check.py`
- [Readability Check](https://github.com/microsoft/viseval/blob/main/viseval/check/readability_check.py): `viseval/check/readability_check.py`

### Evaluation Results

- [Evaluation Results](https://github.com/microsoft/viseval/blob/main/viseval/evaluate.py): `viseval/evaluate.py`

### Other components

- **Benchmark User**
- **Chrome WebDriver**
- **Vision Model**

## Connections

- Benchmark User → Dataset Loader: configures (evidence: `README.md`)
- Benchmark Data → Dataset Loader: loads (evidence: `viseval/dataset.py`)
- Benchmark User → Generation Agent: provides (evidence: `README.md`)
- Benchmark User → Evaluator: configures (evidence: `README.md`)
- Evaluator → Dataset Loader: reads benchmark (evidence: `viseval/evaluate.py`)
- Evaluator → Generation Agent: requests generation (evidence: `README.md`)
- Evaluator → Agent Execution: requests execution (evidence: `viseval/evaluate.py`)
- Generation Agent → Agent Execution: implements (evidence: `viseval/agent.py`)
- Evaluator → SVG Surface Check: checks SVG (evidence: `viseval/evaluate.py`)
- Evaluator → SVG Deconstruction: deconstructs SVG (evidence: `viseval/evaluate.py`)
- Evaluator → Chart Type Check: checks chart (evidence: `viseval/evaluate.py`)
- Evaluator → Data Check: checks data (evidence: `viseval/evaluate.py`)
- Evaluator → Order Check: checks order (evidence: `viseval/evaluate.py`)
- Data Check → Time Utilities: uses time parsing (evidence: `viseval/check/data_check.py`)
- SVG Deconstruction → Time Utilities: uses time parsing (evidence: `viseval/check/deconstruct.py`)
- Evaluator → Layout Check: checks layout (evidence: `viseval/evaluate.py`)
- Layout Check → Chrome WebDriver: drives browser (evidence: `viseval/check/layout_check.py`)
- Evaluator → Scale and Ticks: checks scales (evidence: `viseval/evaluate.py`)
- Evaluator → Readability Check: assesses readability (evidence: `README.md`)
- Scale and Ticks → Vision Model: queries model (evidence: `viseval/check/scale_and_ticks_check.py`)
- Readability Check → Vision Model: queries model (evidence: `viseval/check/readability_check.py`)
- Evaluator → Evaluation Results: produces scores (evidence: `viseval/evaluate.py`)
