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. As others mentioned, consistency is key in parsing documents and consistency is not a feature of LLMs. The output might look plausible, but without proper validation this is just a nice local playground that can’t make it to production.
Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
61–70 of 97 posts
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#62I had been using GPT4o for extracting insights from Scanned docs, it was doing fine. But very recently (since they launched new model - o1), it's not working. GPT4o is refusing to extract text from images and says it can'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's really frustrating for m…
Have you tried few shot prompting? Something on the lines of: User: Extract x from the given scanned document. Assistant: User: Extract x from the given scanned document. Assistant: User: Extract x from the given scanned document. In my experience, this seems to make the model significantly more consistent.
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#63Parsing 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). 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: https://www.llamaindex.ai/blog/introducing-llamaparse-premiu... ) However this model will get better and we may soon have a…
We’ve been doing exactly this by doubling-down on VLMs ( https://vlm.run ) - VLMs are way better at handling layout and context where OCR systems fail miserably - VLMs read documents like humans do, which makes dealing with special layouts like bullets, tables, charts, footnotes much more tractable with a singular approach rather than have to special case a whole bunch of OCR + post-processing - VLMs are definitely m…
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#64Does it do image to MD too?
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#65While 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. As others mentioned, consistency is key in parsing documents and consistency is not a feature of LLMs. The output might look plausible, but without proper validation this is just a nice local playground that can’t make it to production.
Speaking of the devil - I've just had hallucinations with Ollama and reader-lm model (converting HTML to Markdown) the other day. In 40% of cases it spew out things that weren't in the input (not exactly surprising, knowing that it's a generative model). Turns out the model needs temperature of zero (and then it seem to behave well, at least in simple tests), but it wasn't in the model settings. https://github.com/ol…
I purposely set the temperature to 0.1, thinking the LLM might need a little wiggle room when whipping up those markdown tables. You know, just enough leeway to get creative if needed.
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#66While 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. As others mentioned, consistency is key in parsing documents and consistency is not a feature of LLMs. The output might look plausible, but without proper validation this is just a nice local playground that can’t make it to production.
I get your worries about LLMs and their consistency problems. But I think we can fix a lot of that using LLMs themselves for checks. If you're after top-notch accuracy, you could throw in another prompt, add some visual and text input, and double-check that nothing's lost in translation. The cheaper models are actually great for this kind of quality control. LLMs have come a long way since they first showed up, and I…
I tried multiple OCRs before and it’s hard to tell if the output is accurate or not but just comparing manually.
I created a tool to visualise the output of OCR [0] to see what’s missing and there are many cases that would be quite concerning especially when working with financial data.
This tool wouldn’t work with LLMs as they don’t return the character recognition (to my knowledge), which will make it harder to evaluate them on a scale.
If I want to use LLMs for the task, I would use them to help with training ML model to do OCR better, such as creating thousands of synthetic data to train.
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#67Earlier quoted context omitted.
I get your worries about LLMs and their consistency problems. But I think we can fix a lot of that using LLMs themselves for checks. If you're after top-notch accuracy, you could throw in another prompt, add some visual and text input, and double-check that nothing's lost in translation. The cheaper models are actually great for this kind of quality control. LLMs have come a long way since they first showed up, and I…
How would you know something is missing? I tried multiple OCRs before and it’s hard to tell if the output is accurate or not but just comparing manually. I created a tool to visualise the output of OCR [0] to see what’s missing and there are many cases that would be quite concerning especially when working with financial data. This tool wouldn’t work with LLMs as they don’t return the character recognition (to my kno…
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#68I had been using GPT4o for extracting insights from Scanned docs, it was doing fine. But very recently (since they launched new model - o1), it's not working. GPT4o is refusing to extract text from images and says it can'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's really frustrating for m…
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#69Parsing 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). 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: https://www.llamaindex.ai/blog/introducing-llamaparse-premiu... ) However this model will get better and we may soon have a…
What about combining old school OCR with GPT visual OCR? If your old school OCR output has output that is not present in the visual one, but is coherent (e.g. english sentences), you could get it back and slot it into the missing place from the visual output.
Re: Show HN: PDF to MD by LLMs – Extract Text/Tables/Image Descriptives by GPT4o
#70GPT 4o doesn't do actual OCR and there's much smaller and more effective models for specifically this problem. I appreciate your work, intent, and sharing it. It's very important to appreciate what you're doing and its context when sharing it. At that point, you are responsible for it, and the choices you make when communicating about it reflect on you.
I've been testing it out on pitch decks made in Figma and saved as JPGs. Surprisingly, the LLM OCR outperformed top dogs like SolidDocuments and PDFtron. Since I'm mainly after getting good context for the LLM from PDFs, I've been using this hybrid setup, bringing in the LLM OCR for pages that need it. In my book, this API is perfect for these kinds of situations.