ChartProof catches report sentences that have become inaccurate after a figure is revised. It links each claim to a metric, years, units and calculation. An author can reopen the audit, replace a figure, and see exactly which conclusion needs editing.
Open the live workspace · GitHub Actions checks · Download the source
ChartProof is a revision-aware evidence review tool, not a general-purpose chart-question answering model. Its tested contribution is the complete workflow: record the original chart and numerical claim, preserve source hashes and reviewer confirmations, replace the chart, replay the same arithmetic claim against the new evidence, classify the transition and export a restorable audit. The revision impact trace lists changed, added and removed year/value pairs, distinguishes a source-file hash change from a change in the displayed numbers, and indicates whether the specific years a claim references changed. A reviewer can inspect the formula for each verdict rather than trust an opaque score.
Novelty scope: this is an implementation-level contribution combining known OCR, NLP classification, constrained comparison and versioned audit techniques. Existing research such as ChartCheck already studies chart claim verification; this project does not claim to invent chart fact-checking or achieve general-purpose chart understanding. The narrow parser recognizes a small set of English, single-series percentage comparisons, while manual reviewer linking supports a wider phrasing range. The Azure integrations are optional and are not evidence of a completed paid-cloud evaluation.
For an authentic source-backed demonstration, see the CBSE Class XII real-data guide. It includes a CSV transcribed from official published percentages, a reproducible chart generator (python tools/real_data_demo.py), genuine year-over-year claim checks, and a separately identified intentional transcription-error scenario that demonstrates an outdated claim without misrepresenting official statistics.
The main workspace now starts empty, so you do not have to load an example before checking your own information:
- Use Upload a chart or drag in a PNG, JPG, WebP or selected PDF page. Local Tesseract reads the labels, then you confirm the extracted metric and percentages.
- Or use Paste values / CSV for a two-column year-and-percentage table (up to 12 rows). This draws a readable chart in the browser and marks its provenance as user-entered, not OCR-extracted or independently authenticated.
- Add a supported percentage claim and choose Run verification. The single-chart mode evaluates the claim against that one evidence set.
- Switch to Compare revisions to upload an original and revised chart and detect outdated claims, missing evidence and cosmetic-only changes.
- Export audit preserves the reviewed charts and checks. Load demo remains optional, with clearly labeled scenarios.
ChartProof checks statements against supplied evidence, not the truth or authenticity of the upstream source. Manual/CSV rows are a convenient input route, not evidence of OCR accuracy. The broadest supported input is still a single-series percentage metric with four-digit year labels.
-
Start the web app with Docker.
docker build -t chartproof . docker run --rm -p 8000:8000 chartproof -
Open http://localhost:8000. The two sample images run through Tesseract. The original shows a 12-point rise and the revision an 8-point rise. Open Inspect evidence to see the year/value revision impact and why “at least 10 percentage points” became inaccurate.
-
Load Redesigned chart or Missing year to see how the same check handles a cosmetic change or a missing reference year.
-
Use Review / replace to upload an image or a selected PDF page. Confirm the metric and values against the source. Add your sentence. For freer wording, use Link a calculation to confirm its interpretation. Automatic and reviewer-linked checks carry separate provenance.
-
Export audit saves a JSON file containing both previews, source hashes, original readings, reviewed values, claim bindings and results. Open audit replays the checks. The current workspace also persists in this browser's local storage.
Use Python 3.12, Tesseract 5 with the English language files, and a DejaVu Sans font for regenerating examples. Docker includes the native dependencies. On Windows, install Tesseract, add its installation directory to PATH, and use py -3.12 -m venv .venv and .venv\Scripts\activate.
python -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python app.pyThe server reads HOST and PORT. Without configuration it binds to your own computer. App users need only a browser. Charts and checks live in the browser and are sent to the chosen server for processing. Clearing browser data clears the local workspace. The exported audit can restore it on a different computer.
Use an English single-series bar chart on one page, four-digit year labels, and explicit percentages from 0 to 100. The browser accepts a PNG, JPEG, WebP, or unlocked PDF up to 3 MiB. The native command line accepts files up to 6 MiB. Crop multi-figure pages before upload. The local engine pairs printed values to year labels by position. Review is required for every custom source. Check the percentage scale when using Azure.
| Operation | Example |
|---|---|
| Single-year lookup | Placement rate was at least 70% in 2025. |
| Percentage-point change | Placement rate rose by at least 10 percentage points from 2024 to 2025. |
| Relative percentage change | Placement rate grew by 20% from 2024 to 2025. |
The automatic English parser requires one supported comparison and the chart's metric name. A reviewer can bind a free-form sentence to the same three operations. Missing evidence, a zero relative-change denominator, or an unsupported automatic interpretation produces Insufficient evidence. Arithmetic uses the printed numbers with decimal precision. A statement about headcounts requires count data. Human-linked calculations express the reviewer's interpretation of the prose.
python -m chartproof samples/original.pdf samples/corrected.png --claim "Placement rate rose by at least 10 percentage points from 2024 to 2025." --out audit.jsonThe command returns 0 for all supported revisions, 1 when any revision contradicts a claim, and 2 when any remaining result lacks evidence. The example returns 1. Open the exported audit in the web app to review the OCR fields.
| Component | Implementation |
|---|---|
| Document and visual information extraction | Azure Content Understanding analyzes the selected page image with prebuilt-documentSearch. The adapter normalizes a single Chart.js bar series. Local Tesseract is available independently. |
| Multimodal model and prompt design | A Microsoft Foundry vision deployment receives the same chart and claim and returns a verdict and rationale. It is a separate comparison in the web interface. |
| Language classification | A trained word and bigram TF-IDF logistic regression predicts lookup, point change, relative change, or unsupported. Versioned coefficients are served with Python's standard library. |
| Responsible AI | Source preview and file digest, preserved automatic readings, visible reviewer edits, evidence for verdicts, and explicit abstention. |
Read Deployment and Azure setup for the Render Blueprint, required Azure permissions and variables, a two-call live smoke test and an optional live comparison. The recorded local results and offline Azure contract checks are in the technical report.
python -m pip install -r requirements-dev.txt
python tools/train.py
python -m unittest discover -s tests -v
python tools/benchmark.py --out evaluation/local-run.jsonThe committed benchmark contains 180 revision verdicts across 12 controlled chart families. Inputs are rendered from known values and OCR reads the pixels. A separate 24-item language set, an external wording-coverage audit and a small CBSE check provide additional context. See results, external coverage, and the evaluation method and limitations.
| Path | Purpose |
|---|---|
app.py, web/ |
FastAPI service and browser workspace |
chartproof/ |
Visual extraction, Azure clients, classifier and comparison logic |
samples/ |
Original PDF and PNG figures and machine-readable sample references |
evaluation/, tools/ |
Training examples, held-out cases, reference results and reproducible scripts |
tests/ |
API, arithmetic, source-review, and cloud protocol regression checks |
Dockerfile, render.yaml, .github/workflows/ |
Packaging, hosting configuration and continuous integration |
Microsoft AI-901 study guide · Azure Content Understanding · ChartCheck, ACL Findings 2024. Source attribution for the redrawn CBSE example is in the technical report.
