Best practices for extracting highly variable fields from PDFs (n8n + LLM + code?)

Hi everyone,
I’m working on an n8n-based workflow where I need to extract structured data from PDFs whose layout varies a lot from document to document.
The specific challenge is fields that are conceptually the same but:
appear in different positions on the page
use different labels / wording
are sometimes in tables, sometimes in text blocks
are not always explicitly declared (partial info, cumulative info, etc.)
In my case, this is not about OCR quality (OCR works fine), but about semantic extraction reliability.
What I’m currently doing
OCR / text extraction → plain text
LLM-based Information Extraction nodes
Some custom JS code to normalize and validate outputs
Fallback to human confirmation when confidence is low
This works most of the time, but for edge cases the LLM still:
picks the wrong occurrence
overfits to patterns that are not always present
or confidently returns an incorrect value
My questions to the community
Are there more robust patterns than a single “Information Extraction” step?
For example:
multi-pass extraction (candidate detection → ranking → validation)
combining regex / heuristics with LLM reasoning
confidence scoring instead of hard extraction
In n8n specifically, do you usually:
rely on LLM nodes only?
or split the problem into:
deterministic code first
LLM only for ambiguous cases?
For highly variable documents, is it considered best practice to:
extract all possible candidates first
then decide downstream which one is correct?
rather than trying to extract “the right one” in a single step?
Are there alternative nodes / tools / approaches you’ve found more reliable than classic IE:
RAG-style approaches on the document text
page-by-page reasoning
rule-based pre-filtering before LLMs
hybrid pipelines (code + LLM + human-in-the-loop)
Constraint
This is a production workflow, so:
determinism matters
silent hallucinations are unacceptable
human fallback is allowed, but only as a last step
I’m mainly looking for architectural patterns and best practices, not prompt tweaks.
Any real-world experience or references would be extremely helpful.
Thanks!