One major takeaway that matches my own investigation is that Gemini 2.0 still materially struggles with bounding boxes on digital content. Google has published[1] some great material on spatial understanding and bounding boxes on photography, but identifying sections of text or digital graphics like icons in a presentation is still very hit and miss. -- [1]: https://github.com/google-gemini/cookbook/blob/a916686f95f4…
Ingesting PDFs and why Gemini 2.0 changes everything
41–50 of 456 posts
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#4290% accuracy +/- 10%? What could that be useful for, that’s awfully low.
you'll find that most of the errors here are structural issues with the table or inability to parse some special characters. tables can get crazy!
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#43Is there is any code example with a full prompt available from OP, or are there any references (such as similar GitHub repos) for those looking to get started within this topic?
Your insights would be highly appreciated.
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#44>Unfortunately Gemini really seems to struggle on this, and no matter how we tried prompting it, it would generate wildly inaccurate bounding boxes This is what I have found as well. From what I've read, LLMS do not work well with images for specific details due to image encoders which are too lossy. (No idea if this is actually correct.) For now I guess you can use regular OCR to get bounding boxes.
Modern multimodal encoders for LLMs are fine/not lossy since they do not resize to a small size and can handle arbitrary sizes, although some sizes are obviously better represented in the training set. A 8.5" x 11" paper would be common. I suspect the issue is prompt engineering related. > Please provide me strict bounding boxes that encompasses the following text in the attached image? I'm trying to draw a rectangle…
>Please provide me strict bounding boxes that encompasses the following text in the attached image? I'm trying to draw a rectangle around the text.
> - Use the top-left coordinate system
>this input document is 1080 x 1236 px. return the bounding boxes as integers
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#45This is what I am trying to figure out how to solve. My problem statement is: - Injest PDFs, summarize, and extract important information. - Have some way to overlay the extracted information on the pdf in the UI. - User can provide feedback on the overlaid info by accepting or rejecting the highlights as useful or not. - This info goes back in to the model for reinforced learning. Hoping to find something that can m…
The tricky part is maintaining a mapping between your LLM extractions and these coordinates.
One way to do it would be with two LLM passes:
1. First pass: Extract all important information from the PDF
2. Second pass: "Hey LLM, find where each extraction appears in these bounded text chunks"
Not the cheapest approach since you're hitting the API twice, but it's straightforward!Re: Ingesting PDFs and why Gemini 2.0 changes everything
#46I work in fintech and we replaced an OCR vendor with Gemini at work for ingesting some PDFs. After trial and error with different models Gemini won because it was so darn easy to use and it worked with minimal effort. I think one shouldn't underestimate that multi-modal, large context window model in terms of ease-of-use. Ironically this vendor is the best known and most successful vendor for OCR'ing this specific ty…
I've been fighting trying to chunk SEC filings properly, specifically surrounding the strange and inconsistent tabular formats present in company filings. This is giving me hope that it's possible.
For this specific use case you can also try edgartools[1] which is a library that was relatively recently released that ingests SEC submissions and filings. They don't use OCR but (from what I can tell) directly parse the XBRL documents submitted by companies and stored in EDGAR, if they exist.
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#47Earlier quoted context omitted.
Modern multimodal encoders for LLMs are fine/not lossy since they do not resize to a small size and can handle arbitrary sizes, although some sizes are obviously better represented in the training set. A 8.5" x 11" paper would be common. I suspect the issue is prompt engineering related. > Please provide me strict bounding boxes that encompasses the following text in the attached image? I'm trying to draw a rectangle…
Just tried this and it did not appear to work for me. Prompt: >Please provide me strict bounding boxes that encompasses the following text in the attached image? I'm trying to draw a rectangle around the text. > - Use the top-left coordinate system >this input document is 1080 x 1236 px. return the bounding boxes as integers
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#48I work in fintech and we replaced an OCR vendor with Gemini at work for ingesting some PDFs. After trial and error with different models Gemini won because it was so darn easy to use and it worked with minimal effort. I think one shouldn't underestimate that multi-modal, large context window model in terms of ease-of-use. Ironically this vendor is the best known and most successful vendor for OCR'ing this specific ty…
This is a big aha moment for me. If Gemini can do semantic chunking at the same time as extraction, all for so cheap and with nearly perfect accuracy, and without brittle prompting incantation magic, this is huge.
Re: Ingesting PDFs and why Gemini 2.0 changes everything
#49Re: Ingesting PDFs and why Gemini 2.0 changes everything
#50Is there an AI platform where I can paste a snip of a graph and it will generate a n th order polynomial regression for me of the trace?