LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
Almost exactly 1 year ago, I submitted something to HN about using Llama2 (which had just come out) to improve the output of Tesseract OCR by correcting obvious OCR errors [0]. That was exciting at the time because OpenAI's API calls were still quite expensive for GPT4, and the cost of running it on a book-length PDF would just be prohibitive. In contrast, you could run Llama2 locally on a machine with just a CPU, and it would be extremely slow, but "free" if you had a spare machine lying around. Well, it's amazing how things have changed since then. Not only have models gotten a lot better,…
LLM-aided OCR – Correcting Tesseract OCR errors with LLMs launched on August 9, 2024 with 479 votes, #68 of 5,471 launches that month and more than 99% of that year's launches. The site was still online in September 2026, 2 years on.
In plain words
LLM-aided OCR is a tool that corrects errors produced by Tesseract OCR using large language models. It works by breaking documents into chunks and processing them through APIs like OpenAI's GPT-4o-mini or Anthropic's Claude 3-Haiku to identify and fix OCR mistakes. The project is designed for users who need to improve digitized text accuracy from scanned documents, with a focus on making the correction process fast and affordable through modern, cost-effective language model services.
written from the facts on this page · September 2026
From the sources
Enhances Tesseract OCR output using LLMs (local or API) for error correction, smart chunking, and markdown formatting of scanned PDFs - Dicklesworthstone/llm_aided_ocr
In the maker’s words, at launch
Almost exactly 1 year ago, I submitted something to HN about using Llama2 (which had just come out) to improve the output of Tesseract OCR by correcting obvious OCR errors [0]. That was exciting at the time because OpenAI's API calls were still quite expensive for GPT4, and the cost of running it on a book-length PDF…
Does a similar job
all alternatives →
Using LLama2 to Correct OCR Errors2023 · github.com · ▲54I've been disappointed by the very poor quality of results that I generally get when trying to run OCR on older scanned documents, especially ones that are typewritten or otherwise have unusual or irregular typography. I recently had the idea of using Llama2 to use common sense reasoning and subject level expertise to correct transcription errors in a "smart" way-- basically doing what a human proofreader who is familiar with the topic might do. I came up with the linked script that takes a PDF as input, runs Tesseract on it to get an initial text extraction, and then feeds this…
Tesseract.js – Pure JavaScript OCR for 60 Languages2016 · github.com · ▲727Pure Javascript OCR for more than 100 Languages 📖🎉🖥 - naptha/tesseract.js
Llama 3.2 Interpretability with Sparse Autoencoders2024 · github.com · ▲579I spent a lot of time and money on this rather big side project of mine that attempts to replicate the mechanistic interpretability research on proprietary LLMs that was quite popular this year and produced great research papers by Anthropic [1], OpenAI [2] and Deepmind [3]. I am quite proud of this project and since I consider myself the target audience for HackerNews did I think that maybe some of you would appreciate this open research replication as well. Happy to answer any questions or face any feedback. Cheers [1]…
Qwen-2.5-32B is now the best open source OCR model2025 · github.com · ▲211Last week was big for open source LLMs. We got: - Qwen 2.5 VL (72b and 32b) - Gemma-3 (27b) - DeepSeek-v3-0324 And a couple weeks ago we got the new mistral-ocr model. We updated our OCR benchmark to include the new models. We evaluated 1,000 documents for JSON extraction accuracy. Major takeaways: - Qwen 2.5 VL (72b and 32b) are by far the most impressive. Both landed right around 75% accuracy (equivalent to GPT-4o’s performance). Qwen 72b was only 0.4% above 32b. Within the margin of error. - Both Qwen models passed mistral-ocr (72.2%), which is specifically trained for OCR. - Gemma-3…
LLM Aided Transcription Improvement2024 · github.com · ▲11I recently submitted another project for using LLMs to correct errors and improve formatting of OCRed documents which was well received. The low cost and high quality/speed of the latest "value tier" models from OpenAI and Anthropic have made it possible to get compelling results at a very reasonable price in that application. It occured to me that the same approach taken there (namely, splitting documents into chunks and sending each chunk through a chain of LLM prompts that each take the output of the previous prompt and apply an additional layer of processing) could be easily applied…
PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o2024 · github.com · ▲191I've developed a Python API service that uses GPT-4o for OCR on PDFs. It features parallel processing and batch handling for improved performance. Not only does it convert PDF to markdown, but it also describes the images within the PDF using captions like `[Image: This picture shows 4 people waving]`. In testing with NASA's Apollo 17 flight documents, it successfully converted complex, multi-oriented pages into well-structured Markdown. The project is open-source and available on GitHub. Feedback is welcome.
Questions this answers
More ai this month
the category →



Paintings by AI models: programs run through a simulation of oil paint.
AI · 20d ago · stillwet.art

PixVerse R2▲381A real-time world model you can explore and change
AI · 28d ago · world.pixverse.video
Source: Show HN post ↗ · launch text quoted in part
Launched alongside, August 2024
the whole month →



Jupitrr AI▲1,195Jupitrr AI turns raw talking videos into scroll-stopping content for coaches and consultants. Research, script, record, edit, and publish in one app.
AI · 2024 · jupitrr.com

Hey there HN! We’re Joe and Stopa, and today we’re open sourcing InstantDB, a client-side database that makes it easy to build real-time and collaborative apps like Notion and Figma. Building modern apps these days involves a lot of schleps. For a basic CRUD app you need to spin up servers, wire up endpoints, integrate auth, add permissions, and then marshal data from the backend to the frontend and back again. If you want to deliver a buttery smooth user experience, you’ll need to add optimistic updates and rollbacks. We do these steps over and over for every feature we build, which can…
Dev tools · 2024 · github.com