Skip to content

Part 2 of 7 · Quote comparer series ~5 min read

How a quote gets read

Supplier quotes have no shared format at all. One is a spreadsheet export, one is a PDF from an accounting package, one is a photograph of a handwritten sheet, and one is four sentences in the body of an email. The reader has to cope with all of them and be checkable afterwards.

Key takeaways

  • Every extracted value stores the page, the line and the raw text it came from.
  • The raw text is kept verbatim, not just the parsed number.
  • Quantities and units are extracted separately; a number without a unit is incomplete.
  • Terms pages are read too. That is where the exclusions usually live.
  • An unreadable quote is flagged for a person, never partially guessed at.

One document to line items

How a supplier quote is read into line items with provenanceA vertical chain of five steps entered by a box labelled A quote arrives as a PDF, image or email body. Step one asks whether there is a text layer, noting most PDFs have one; if not it exits to OCR the pages and mark it OCR-derived. Step two finds the line items, whether in a table or in prose. Step three asks whether each has a unit such as square metres, each, day or sum; if not it exits to Flag as unclear, and does not assume. Step four reads the terms pages, where exclusions live. Step five stores everything with provenance: page, line and raw text. A note says OCR-derived values are marked, because a person checking should know which they are.AWS ACCOUNTA quote arrivesPDF, image, email bodyIs there a text layer?most PDFs have oneOCR the pagesand mark it OCR-derivednoFind the line itemstable or proseEach has a unit?m2, each, day, sumFlag as uncleardo not assumenoRead the terms pagesexclusions live hereStore with provenancepage, line, raw textOCR-derived values are marked, because a person checking should know which they are.
Fig 1. How one document becomes a set of checkable line items. The provenance in the last box is what makes every later number defensible.
  • Compute
  • Database
  • App integration
  • Analytics
  • Front-end & mobile

Provenance on everything

Every stored value carries three things beyond the value itself: which page it was on, which line, and the raw text as it appeared. That last one matters more than it sounds. “Tiling — 11m2 — £840” parses cleanly; “Tiling to splashback area only, POA” does not, and the difference is invisible once both have been reduced to a row in a table.

The practical payoff is that the comparison can render every figure as a link back to the page it came from. Somebody querying a number resolves it in five seconds instead of reopening three PDFs, and that turns out to be the difference between a comparison people trust and one they redo by hand.

The terms pages

The exclusions are almost never in the line items. They are in the paragraph after the total, or on a separate terms page, or in a single sentence like “price assumes clear access and existing services in working order”. Reading only the priced table is the single most common way an automated comparison goes wrong.

So the terms text is extracted as its own object, associated with the quote rather than with any line, and every sentence containing an exclusionary construction is kept verbatim for the normaliser to work on. No summarising at this stage; the wording is the evidence.

When it cannot read something

How an unreadable value is escalated rather than guessedA horizontal row of five boxes. Photo at an angle: half legible. Handwritten total: is it an eight or a three? Do not guess: ever. Flag the quote, with the region highlighted. A person reads it: thirty seconds. A note says a confidently wrong total in a comparison is worse than no comparison.THE ONE THING IT MUST NOT DOPhoto at an anglehalf legibleHandwritten total8 or 3?Do not guesseverFlag the quotewith the regionA person reads it30 secondsA confidently wrong total in a comparison is worse than no comparison.
Fig 2. The refusal path. A person spending thirty seconds on an ambiguous figure is cheap; a wrong figure that nobody questions is not.
  • Compute
  • Security & identity
  • Management
  • Front-end & mobile
  • People

The flag is specific: it names the page, crops the region, and states what was ambiguous. “Could not read quote 3” is an unhelpful message that gets ignored; “page 2, line 7 — is this £830 or £530?” gets answered immediately.

Keeping the original

The source document is stored unmodified alongside the extraction, permanently for as long as the quote is live and for a period after the job. Extraction improves, formats change, and a disagreement six months later is settled by the original rather than by the parse.

Next: making three quotes comparable.

All posts