TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o

191 pointsby yigitkonur358 months ago
I&#x27;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]`.<p>In testing with NASA&#x27;s Apollo 17 flight documents, it successfully converted complex, multi-oriented pages into well-structured Markdown.<p>The project is open-source and available on GitHub. Feedback is welcome.

19 comments

Oras8 months ago
While this is a nice development, it’s quite risky parsing documents with LLMs. In usual OCRs, you have boundaries to check, but with LLMs, you just get a black box output.<p>As others mentioned, consistency is key in parsing documents and consistency is not a feature of LLMs.<p>The output might look plausible, but without proper validation this is just a nice local playground that can’t make it to production.
评论 #41619134 未加载
评论 #41619138 未加载
评论 #41631316 未加载
zerop8 months ago
I had been using GPT4o for extracting insights from Scanned docs, it was doing fine. But very recently (since they launched new model - o1), it&#x27;s not working. GPT4o is refusing to extract text from images and says it can&#x27;t do it, though it was doing same thing with same prompts till last week. I am not sure if this is intentional downgrade and it can be clubbed with new model launch, but it&#x27;s really frustrating for me. I cancelled my GPT4 premium and moved to claude. It works good.
评论 #41616242 未加载
评论 #41617799 未加载
评论 #41619353 未加载
评论 #41621404 未加载
评论 #41616233 未加载
pierre8 months ago
Parsing docs using LVM is the way forward (also see OCR2 paper released last week, people are having ablot of success parsing with fine tunned Qwen2).<p>The hard part is to prevent the model ignoring some part of the page and halucinations (see some of the gpt4o sample here like the xanax notice:<a href="https:&#x2F;&#x2F;www.llamaindex.ai&#x2F;blog&#x2F;introducing-llamaparse-premium" rel="nofollow">https:&#x2F;&#x2F;www.llamaindex.ai&#x2F;blog&#x2F;introducing-llamaparse-premiu...</a>)<p>However this model will get better and we may soon have a good pdf to md model.
评论 #41618872 未加载
评论 #41616351 未加载
评论 #41617916 未加载
constantinum8 months ago
There is also LLMWhisperer, a document pre-processor specifically made for LLM consumption.<p>As other mentioned, accuracy is the one part of solution criteria, other include, how does the preprocessing engine scale&#x2F;performs at large scale, and how does it handle very complex documents like, bank loan forms with checkboxes, IRS tax forms with multi-layered nested tables etc.<p><a href="https:&#x2F;&#x2F;unstract.com&#x2F;llmwhisperer&#x2F;" rel="nofollow">https:&#x2F;&#x2F;unstract.com&#x2F;llmwhisperer&#x2F;</a><p>LLMWhisperer is a part of Unstract - An open-source tool for unstructured document ETL.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Zipstack&#x2F;unstract">https:&#x2F;&#x2F;github.com&#x2F;Zipstack&#x2F;unstract</a>
jdthedisciple8 months ago
Zerox [0] was featured on here recently and does the exact same thing<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;getomni-ai&#x2F;zerox">https:&#x2F;&#x2F;github.com&#x2F;getomni-ai&#x2F;zerox</a>
smusamashah8 months ago
I have not found any mention of accuracy. Since it&#x27;s using LLM, how accurate the conversion is? As in does that NASA document match 100% with the pdf or did it introduce any made up things (hallucinations)?<p>That converted NASA doc should be included in repo and linked in readme if you haven&#x27;t already.
评论 #41617718 未加载
评论 #41615077 未加载
bravura8 months ago
I&#x27;ve also been using the nougat models from meta, which are trained to turn PDF into md using the donut architecture
评论 #41617724 未加载
charlie08 months ago
I do this all the time for old specs, but one issue I worry about is accuracy. It&#x27;s hard to confirm if the translations are 100% correct.
TZubiri8 months ago
Ok attempt number 158 at parsing pdfs, here we go, this time surely it will work.
eth0up8 months ago
I used GPT4o to convert heavily convoluted PDFs into csv files. The files were Florida Lottery Pick(n) histories, which they deliberately convolute to prevent automatic searching; ctrl-f does nothing and a fsck-ton of special characters embellish the whole file.<p>I had previously done so manually, with regex, and was surprised with the quality of the end results of GPT, despite many preceding failed iterations. The work was done in two steps, first with pdf2text, then python.<p>I&#x27;m still trying to created a script to extract the latest numbers from the FL website and append to a cvs list, without re-running the stripping script on the whole PDF every time. Why? I want people to have the ability to freely search the entire history of winning numbers, which in their web hosted search function, is limited to only two of 30+ years.<p>I know there&#x27;s a more efficient method, but I don&#x27;t know more than that.
评论 #41619432 未加载
评论 #41617614 未加载
评论 #41621838 未加载
评论 #41617001 未加载
评论 #41617408 未加载
refulgentis8 months ago
GPT 4o doesn&#x27;t do <i>actual</i> OCR and there&#x27;s much smaller and more effective models for specifically this problem.<p>I appreciate your work, intent, and sharing it. It&#x27;s very important to appreciate what you&#x27;re doing and its context when sharing it.<p>At that point, you are responsible for it, and the choices you make when communicating about it reflect on you.
评论 #41619407 未加载
fzysingularity8 months ago
One nit in the repo README - you might want to change the cost reporting to be as $15 &#x2F; 1000 pages instead of documents.
KoolKat238 months ago
This is handy, one thing I&#x27;ve noticed using 3.5 Sonnet, the tables that aren&#x27;t the correct orientation are more prone to incorrect output.<p>I know this was an issue when GPT 4 vision initially came out due to training, not sure if it&#x27;s a solved problem or if your tool handles this.
jdross8 months ago
How does this compare with commercial OCR APIs on a cost per page?
评论 #41614941 未加载
magicalhippo8 months ago
Was just looking for something like this. Does it handle equations to latex or similar? How about rotated tables, ie landscape mode but page is still portait?
评论 #41615091 未加载
评论 #41616465 未加载
评论 #41615510 未加载
devops0008 months ago
You could transform arXiv to a markdown website
scottmcdot8 months ago
Does it do image to MD too?
评论 #41619758 未加载
评论 #41618080 未加载
评论 #41619168 未加载
wittjeff8 months ago
license please?
bschmidt18 months ago
My previous employer needs this.<p>I won&#x27;t tell them :) :D &gt;:D :|