Skip to content
Vision medium

Chart Data Extraction — Quarterly Revenue Bar Chart

Vision-capable models extract structured data from a bar chart image. Scored on numerical accuracy and schema compliance.

Published June 8, 2025

Goal

Evaluate vision models' ability to extract quantitative data from charts for downstream automation.

Models Compared

  • GPT-4o OpenAI 2024-11-20
  • Claude 3.5 Sonnet Anthropic 20241022
  • Gemini 2.0 Flash Google gemini-2.0-flash-001

Exact Prompts

system system
Extract data from the chart image. Return valid JSON matching the provided schema exactly.
user user
Extract all data points from this bar chart into JSON:
```json
{
  "quarters": ["Q1 2023", ...],
  "series": [
    { "name": "string", "values": [number, ...] }
  ]
}
```
[Chart image attached: revenue-bar-chart-q1q4.png]

Parameters

Temperature
0
Max Tokens
2048
Top P
1

Context

A 1200×800 PNG bar chart showing quarterly revenue for 4 product lines across 2023–2024. Ground truth values provided separately for scoring.

Outputs

GPT-4o

Extracted 16 data points. 15/16 within 2% of ground truth.

Claude 3.5 Sonnet

Extracted 16 data points. 16/16 exact match.

Gemini 2.0 Flash

Extracted 16 data points. 14/16 within 2%. Swapped Q3/Q4 for Product C.

Evaluation

Method
Automated comparison against ground truth CSV
Rubric
Numerical accuracy (70%), schema compliance (20%), completeness (10%)
Human Review
No — automated only

Detailed Analysis

Chart Specifications

  • Format: PNG, 1200×800, sRGB
  • Chart type: Grouped bar chart, 4 series × 4 quarters
  • Value range: $1.2M – $8.7M
  • Ground truth: Provided as revenue-ground-truth.csv in downloads

Verdict

Claude 3.5 Sonnet achieves perfect extraction on this chart type. Gemini 2.0 Flash is fastest and cheapest but less reliable on adjacent bar values.