Math & Table Audit + One-Click Toy Reproduction Lab (.ipynb)
Reading quantitative papers critically means never taking headline numbers or equations on faith. Prism combines two tight, verifiable workflows right inside your Zotero chat sidebar:
/audit-numbers— Math & Table Audit: Audits reported table averages, relative vs. absolute percentage gains, dataset split totals (train + val + test = N), and rates/proportions using provider Code Execution (when permitted) plus Prism's deterministic local arithmetic verifier, outputting a filterable Quantitative Audit Card with clickable[p. N]PDF jump chips./toy-repro— One-Click Toy Reproduction Lab (.ipynb): Synthesizes a strictly validnbformat: 4Jupyter Notebook (.ipynb) implementing the paper's core equation, loss function, or algorithm on deterministic synthetic data, automatically test-running it inside Code Execution when available, capturing inline sanity-check plots, and attaching it to Zotero atomically (Preview → Approve → Commit+ Undo).
When a paper matches your Local-Only Privacy Guardrail (e.g., unpublished, confidential, or a protected collection), Prism blocks cloud uploads before reading the PDF and explicitly disables cloud Code Execution. You can retry in 1 click with a local provider (e.g., Ollama) to run Prism's offline deterministic arithmetic verifier and generate self-contained local .py / .ipynb deliverables without any byte leaving your machine.
1. Ways to Launch
2. Quantitative Math & Table Audit (/audit-numbers)
Prism prioritizes quantitative PDF pages (tables, results, datasets, and equations) and verifies claims through two complementary layers:
- Cloud Code Execution Sandbox (when available & permitted): On OpenAI (
code_interpreter), Anthropic Claude (code_execution), and Google Gemini (code_execution) models, Prism instructs the sandbox to execute a Python verification script and capturesstdout,stderr, and exit status directly. - Deterministic Local Arithmetic Cross-Checker (always on): Every extracted numerical assertion is independently verified in TypeScript with exact floating-point math — even catching arithmetic errors a smaller local LLM might overlook:
- Table Column & Row Averages: Respects published rounding precision (e.g.,
±0.05on 1-decimal tables) while flagging genuine mean mismatches. - Relative vs. Absolute Percentage Gains: Explicitly catches the classic paper error of claiming e.g.
+4.2% relative gainon71.2 → 73.5when actual relative gain is+3.23%(and absolute gain is+2.3 pts), or labeling absolute percentage points as relative%. - Sample Split Sums: Verifies
train + val + test == Nand subgroup percentages summing to100%. - Proportions, Rates & F1 Scores: Recomputes
numerator / denominatoragainst reported percentages or ratios and cross-checks Precision/Recall/F1 harmonic mean (2PR / (P + R)).
- Table Column & Row Averages: Respects published rounding precision (e.g.,
Interactive Quantitative Audit Card
![Interactive Quantitative Audit Card displaying Sandbox Verified status, clickable 3-column KPI scoreboard (Discrepancies, Warnings, Verified), adaptive Reported vs. Computed comparison rows, and verified [p. N] PDF jump chips.](/Prism/images/math-audit-card.png)
- Live 5-Stage Progress Indicator: While auditing, Prism displays an animated 5-stage progress card with an elapsed timer and one-click Cancel so you can track PDF context gathering, arithmetic verification, and sandbox execution smoothly.
- Interactive 3-Column KPI Scoreboard: Inspect counts for
Discrepancies(red),Warnings(amber), andVerified(green) at a glance—click any KPI tile to filter checks immediately (click again to return toAll), or toggleCompact passed/Expand all detailsto focus on flagged anomalies first. - Adaptive
Reported → ComputedComparison Rows: Compares the paper's claimed figure against the recomputed value, delta summary, formula, and verification source badge (Sandbox,Deterministic, orLLM)—laying out compact numbers side-by-side and automatically stacking longer analytical expressions cleanly without text wrapping glitches. - Verified PDF Anchor Telemetry & Jumps: Displays verified PDF grounding counts (
N/M PDF anchors verified) and pairs each finding with a clickable[p. N]badge matched against the paper's real PDF text layer to jump and highlight directly in Zotero Reader. - Verification Script, Regenerate Branching & Exports: Expand the collapsible Verification Python Script (
.py) or Sandbox stdout/stderr, re-run via native Regenerate branching without losing prior runs, export the full audit to Markdown (.md) or Python (.py), or clickToy Repro Lab (.ipynb)to jump straight into reproduction.
3. One-Click Toy Reproduction Lab (/toy-repro)
Turn passive reading of a dense method section or X-Ray'd equation into an executable learning artifact:
- Structured Paper-to-Code Synthesis: Prism generates 4–8 alternating Markdown cells (with KaTeX equations and explicit
Eq. (X)/Algorithm 1/[p. N]provenance) and self-contained Python 3 code cells using onlynumpyandmatplotlibon fixed-seed synthetic data (np.random.default_rng(42)) — zero external dataset downloads, zero CUDA dependencies, and sub-3-second execution. - Automatic Sandbox Validation, Auto-Repair & Embedded Plots: When running on a cloud provider with native Code Execution (and the paper is not Privacy-Guardrail-protected), Prism automatically runs the generated script in the sandbox (
exit code 0), applies a single automatic repair pass if any runtime bug occurs, embeds verifiedstdoutand generated matplotlib PNG sanity-check plots (display_data) directly into the.ipynboutputs, and renders those plots inline inside the chat card (click to inspect full-size). - Strict
nbformat: 4(.ipynb) Packaging: Prism serializes and validates every notebook against the Jupyternbformat: 4(nbformat_minor: 5) specification (kernelspec,language_info, unique cell IDs,\n-terminatedsourceline arrays,execution_count, andoutputs) so it opens cleanly in JupyterLab, Jupyter Notebook, VS Code, and Google Colab.
Interactive File Card Actions

Preview(All Cells/Code Only): Expand a cell-by-cell Jupyter preview right inside the chat card with anAll Cells/Code Onlyfilter bar, rendered KaTeX Markdown, Python code blocks with JupyterIn [N]/Out [N]sandbox stdout, per-cell copy buttons, and clickable[p. N]PDF jumps.Save .ipynb: Export the validated<paper-slug>-toy-repro.ipynb(including embedded outputs and PNG plots) via Zotero's native save dialog.Copy .py/.py: Copy or save a clean# %%percent-format Python script runnable directly viapython3or interactively in VS Code / Spyder.Save to Zotero& Native Regenerate: Stage attaching<paper-slug>-toy-repro.ipynb(taggedPrism Toy Lab) directly under the active Zotero paper behind Prism's atomicPreview → Approve → Commit+ Undo Approval Card, or click Regenerate to iterate on a new branch while preserving prior notebooks.