Use Case: When AI Reads Your Forms and Quietly Gets the Numbers Wrong
Here’s a request that lands on a lot of engineers’ desks, especially anyone working near insurance, banking, or lending. A client has a mountain of forms, insurance claims, account applications, statements, and they want an AI that pulls the right values out of them: this policy number, that claim amount, this date, correctly, every time. It sounds like the document-chatbot problem from my last post. It isn’t quite. A support bot answers questions from prose. This has to read a form and get exact numbers right, and in insurance or banking a wrong number is a mispaid claim or a compliance failure, real money on the line.
So you reach for the obvious tool: RAG. It’s brilliant on paragraphs, chop the text into chunks, find the matching chunk, hand it to the model, get a grounded answer. And then you point it at a form and it starts quietly getting numbers wrong. It answers “what’s the policy number?” with the account number. It swaps one amount for another. Nothing crashes; it just returns confident, incorrect values, which is the worst kind of failure here.
Let me walk through how I’d actually build this. The surprise is that the fix is almost never a bigger or smarter model. The whole battle is won or lost in one unglamorous step, chunking, how you cut the document into pieces before you ever store it. Naive chunking that works fine on prose destroys a form. So I’ll show why it breaks, the approaches that fix it, and, honestly, the side effect and accuracy cost of each. (I’ll assume the text is already pulled off the page, getting text off a scan is a separate job. Here we care about what happens after: how you cut it up.)
The one thing that makes a form different
Quick reminder of why forms aren’t prose. In a paragraph, meaning flows in a line, you can cut it almost anywhere and each piece still makes sense. In a form, meaning is a pairing: a label and its value belong together, and a table cell only means something next to its row and column headers.
Why the usual chunking breaks it
The default chunking strategy is dead simple: cut the text every ~500 words, maybe with a little overlap. On prose, fine. On a form, watch what it does.
Naive chunking (cut by size)
Structure-aware chunking
That’s the whole problem in a nutshell: naive, size-based chunking treats a form like prose, and forms aren’t prose. So how do you chunk them properly? There are a few approaches, and each buys accuracy at a different price.
The chunking approaches, with their real trade-offs
Here’s the menu, from naive to what I’d actually reach for, each with its honest side effect and its effect on accuracy.
The golden rule behind all of them
Every good approach above is really following one principle. If you remember nothing else, remember this:
Never split a value from the thing that names it. A number without its label is noise. Chunk along the form's structure, label-with-value, row-with-headers, so every piece that gets stored can still be understood on its own.
A closer look at the workhorse: parent-child
Because parent-child chunking is the one I’d reach for most, here’s how it actually works, and it’s a neat idea. You store two linked versions of the content: tiny pieces to search with, and big pieces to answer from.
The trick that quietly does a lot: metadata
One more technique that pairs with all of these, and it’s easy to overlook. When you store each chunk, tag it with metadata, extra labels about what it is: which form, which field, which section. Then retrieval can filter before it even searches.
Which one should you actually pick?
The honest decision guide, matched to your forms and your risk.
| Your situation | Reach for | Because |
|---|---|---|
| Simple, consistent key-value forms | Field-aware chunking | Keeps each pair whole; big accuracy win, low effort |
| Lots of tables, row-level questions | Table-aware (row) chunking | Ties each row's cells to their headers |
| Mixed forms, varied questions | Parent-child chunking | Precise finding plus enough context; the best all-rounder |
| Same fields every time, exact values matter | Extract to structured data, skip RAG | Most accurate and verifiable when the shape is fixed |
| Any of the above, high stakes | + metadata + a confidence check | Filter to the right fields, and flag uncertain ones for a human |
Want the real research?
If you want to go deeper than this overview, these are solid primary sources on chunking structured and tabular data for RAG:
- Structure-aware chunking for tabular data, on why row-and-header-aware chunking beats naive splitting, with faithfulness numbers: Structure-Aware Chunking for Tabular Data in Retrieval-Augmented Generation.
- Semi-structured table question answering, a look at answering questions over messy real tables: ST-Raptor (arXiv 2508.18190).
- Adaptive retrieval over tabular formats, on structured querying instead of blind chunk search: SQuARE (arXiv 2512.04292).
The takeaway
When RAG gets a number wrong on a form, the instinct is to blame the model or reach for a bigger one. Nine times out of ten, the real fault is upstream, in how you chopped the document. Naive size-based chunking treats a form like a paragraph and slices right through the label-value pairs that carry its meaning, leaving retrieval with orphaned numbers to guess from.
The fix isn’t fancier AI, it’s chunking that respects the form’s shape: keep each label glued to its value, each row glued to its headers, use parent-child so you can find precisely and answer with context, tag everything with metadata so you can filter to the right field, and when the form is fixed and the stakes are high, skip fuzzy search and pull the fields into a real table. Every one of these has a cost, more structure detection, more index layers, less flexibility, but they all buy the same thing: numbers that come out right. On a form, accuracy was never really about the model. It was about not cutting the meaning in half before the model ever sees it.