Inspiration
AI copilots now read dashboards, board decks and patient charts, then summarise them for people who act on the summary. Real charts are messy: truncated axes, log scales, dual axes, look-alike colours, time running right to left. Nobody measures whether those everyday design choices make a model flip a spike into a drop. We wanted proof, not anecdotes.
What it does
TrapLens is a factory that generates realistic decision charts in three domains (clinical, finance, operations) with answers known exactly from the data. Every task is a minimal pair: the same data drawn once as a clean chart and once with exactly one common design trap (truncated axis, dual axis, log scale, look-alike colours, sparse grid, reversed time). Question and answer stay identical. If a model is right on the clean chart and wrong on the trap chart, the trap caused the error.
The web console lets anyone:
- Build a test pair live and watch all 8 validation gates pass
- Explore every failure, with each model's exact answer
- Beat the AI: answer the same questions and build a human baseline
How we built it
- Python 3.12, numpy and matplotlib. Data is sampled and SHA-256 hashed before any pixel is drawn.
- Eight automated gates certify every task: schema, data-first hashing, two independently written solvers that must agree, pixel + OCR check that the render matches the data, a ±5 px perceptual-robustness certificate (the answer cannot change if a reader misjudges every mark), grounding, byte-identical determinism, and a self-test of the answer grader.
- 192 certified minimal pairs; 1,920 answers from 5 open vision-language models (Qwen3-VL-8B, Qwen2.5-VL-7B/3B, InternVL3-8B, SmolVLM2-2.2B) run on free Kaggle T4 GPUs. Adapters for Claude, Gemini and OpenRouter are included.
- Paired deltas with task-level bootstrap 95% confidence intervals.
- FastAPI + vanilla JS console, Docker, 45 unit tests, deployed on Render.
AI integration and responsible use
AI is the subject under test, and the project exists to make AI use safer. No model ever grades another model: ground truth comes from the data, and two independent solvers must agree. All data is synthetic, so no personal data is involved. We report results honestly, including a trap that raised accuracy, and state our limits plainly (no human baseline yet; the ±5 px tolerance is a global assumption).
Results
- Every model lost accuracy on trap charts: 5 to 21 points, all 95% CIs above zero.
- A log scale cost the strongest models 33 to 40 points (InternVL3-8B: 90% → 50%).
- A reversed time axis made Qwen2.5-VL-7B read a +35 mmHg blood-pressure spike as a −35 drop.
Challenges we ran into
Making tasks provably fair: 42% of candidate charts were rejected by the gates (mostly the perceptual-robustness gate), so a model failure is never caused by an unreadable chart.
Accomplishments that we're proud of
A benchmark that explains why a model fails, not only that it failed, with every claim backed by a confidence interval.
What we learned
Small, common design decisions matter more than chart complexity. The same model that reads a chart perfectly can be flipped by one axis setting.
What's next for TrapLens
Collect a human baseline through Beat the AI, add frontier API models, and ship a "chart lint" that warns a dashboard author before an AI copilot misreads their chart.
Built With
- docker
- fastapi
- javascript
- kaggle
- matplotlib
- numpy
- python