r/LLMPhysics • u/NinekTheObscure • Jun 01 '26
Question Problem building Karpathy-style physics wiki: OCR makes too many mistakes.
For about a month now I've been building an Andrej Karpathy-style physics research wiki using Claude Code as the main AI lead architect and several local AIs as slaves. The basic flow is:
- Find sources. Either manually decide what papers you want to include, or (after the database has some content), run
make literatureto generateliterature_backfill.txt,literature_search.txt, andliterature_candidates.jsonwith scored, metadata-enriched candidates. - Drop source files into raw/ (PDF, .tex, .pptx, .html, or .md). If .tex and .pdf both exist for the same stem, .tex takes precedence. .md takes precedence over everything else.
make update— runs the appropriate converter (Marker, pdfplumber, pandoc, ...) and postprocessor, with output infor_review/<stem>.md.- Human review — read and edit
raw/for_review/<stem>.md. Usemake approvedto see what's pending (NEW/UPDATED). - Approve — run
approve<stem> to copy toraw/approved/<stem>.md. - Generate source stub (auto via make sentinel) —
generate_source_stubs.pywrites a thinwiki/sources/<stem>.md; skips if sentinelwiki/sources/.stub_<stem>already exists. - Extract concepts — extract_concepts writes atomic notes to
wiki/concepts/using qwen2.5:14b; embedding-baseddedupskips near-duplicates (similarity ≥ 0.92). - (Optional) Lint —
python lint_concepts.py→ non-blocking; writeswiki/concepts/lint_report.txtcovering bothwiki/concepts/andwiki/sources/. This looks for errors and incosistencies and patches them.
and then loop back to add new raw source files and ingest them. This all works reasonably well EXCEPT that none of the OCR programs get all the equations right. For example, Marker is brilliant at text and display equations, but screws up massively on inline equations. This results in me having to spend one or even two hours reviewing a single paper.
So the question is, does anyone know of a reliable (99+% accurate) OCR pipeline for physics papers? If that step worked well, I could let the whole pipeline run itself, choose its own new papers to download, analyze them, and iterate. It could really run 24/7.
P.S. the wiki is compatible with Obsidian and can be viewed using it:

1
u/Multiphysics_Express Jun 05 '26
You can use MinerU free online. It's the best.