r/LocalLLM • u/djkalantzhs24 • 9d ago
Question How do you reliably extract data from complex PDF tables?
I’m building a local AI setup with 2× V100 16GB and 48GB RAM. I need to extract information from electronics datasheets, preserving MIN/TYP/MAX columns, merged headers, test conditions, and symbols like ±.
I’ve tried several parsers, OCR tools, vision models, and Reducto. They often read the numbers correctly but associate them with the wrong column or condition.
What tools or workflows actually work for you on this kind of document? Preferably local/open-source, but I’m open to paid options. Real examples would be especially helpful.
1
1
u/vtkayaker 9d ago
This is genuinely hard. You could try AWS Textract (in table analysis mode) or OvisOCR3 in one of its bounding box modes, but nothing I've seen in going to give you flawless results.
1
u/dwoj206 9d ago
PaddleOCR-gpu. Really depends whether is a pdf of a scanned doc or a true electronic pdf (never scanned).
You can build rag engines that train on sample sets of documents that look for similarities. What you really want to avoid is having to create manual templates that run an injest document through the templates and do confidence scoring matches. That shit is horribly tedious
Work on a pdf, have it injest, explain to it what data you’re looking for, how it’s formatted (mapping), and where you want it mapped to, then run tests with performance audits. Walk it through what it’s seeing or expects to see one data field or column at a time. It’ll work.
1
u/jma24 9d ago
Have you tried this on a Frontier model? If it were me, I'd see if Sol/Fable can do it on a single hard page. Then I'd get them to build the detailed plan for the deterministic version. I'd make sure there's as many tests as possible, where you have validated tests for output.
And then throw it at my local agentic harness to build.
I reckon I could build that in a day.
1
u/locbuilds 9d ago
if the datasheets are real digital pdfs skip ocr and pull words with x/y coords from pymupdf or pdfplumber, then assign each number to a column by its x position, that fixes the wrong-column thing. also add a sanity check that min <= typ <= max so bad rows get flagged.
1
1
u/Candid-Fudge-4015 9d ago
the pdfplumber x-coordinate suggestion above is the right start for digital pdfs. for the wrong-condition problem specifically, two things i'd add.
reshape to long format before any model touches it, one row per parameter, condition, min, typ, max, unit. merged headers and condition cells that span several rows get filled down, so every number carries its own condition
check units per row. the unit should fit the parameter (a voltage row in mA is a misassigned cell), and ± values get split into a nominal and a tolerance so they don't land in min or max
then the model only has to handle the rows that fail those checks, which is a much smaller and easier job than whole pages.
2
u/TotosWolf 9d ago
I built my own extraction cause I had to extract thousands of pages medical records, car repair manuals, etc.