New Three new products: fordway trading ERP, UEPS cloud rendering and WPECS delivery and operations View products →

AI results are always drafts: the review loop behind fordway's document recognition

Engineering By SREYUN 0 views

Plugging a large language model into a business system is easy. Making its output safe to post is not. One extra zero in an order quantity or one wrong digit in an invoice amount turns straight into a wrong delivery or a wrong receivable. fordway's document recognition has followed one rule from day one: AI results are always drafts. The system reads, matches, calculates and checks; reviewers only confirm the yellow and red fields; and only a confirmed draft becomes a real document.

Supported documents

DocumentFormatsWithout a vision modelWith a vision model
Customer ordersChat or email text, TXT, CSV, Excel, PDF, imagesText and Excel are read by the rule engine; images go to manual entryImages and scans are recognized too
Customer purchase orders and contractsPDFs with a text layer, Excel (including legacy .xls)Tables are rebuilt from header coordinatesYes
InvoicesE-invoice PDF, OFD, digital invoice XML, photosPDF, OFD and XML in seconds; photos go to manual entryYes
Bank receipts and transfer slipsOnline banking PDF receipts, transfer text, phone screenshotsPDFs and text are recognized; screenshots go to manual entryYes

The rule engine understands a lot of casual phrasing: chat messages that list items, quantities and a delivery date in one sentence, quantities written before the item, numbers written out in Chinese words or as "half a tonne", prices given per tonne, and relative dates such as "tomorrow" or "the day after tomorrow".

A three-column review desk

The review desk splits a document into three columns: the original on the left (zoomable images, raw text, Excel as a table, embedded PDF), the editable extraction in the middle, and the matching and validation evidence for every line on the right. Every field carries a confidence tag:

ColorConfidenceWhat the reviewer does
Green0.90 or higherAccept as is
Yellow0.70 to 0.90Take a look and confirm
RedBelow 0.70Must be checked by hand; a red item is not preselected and has to be chosen manually

The thresholds are parameters you can tune to your risk appetite. Experienced reviewers barely touch the mouse: press 1 to accept all high-confidence lines, fix the yellow and red fields, press Enter to turn the draft into a sales order, or press Esc to discard a poor document and enter it by hand. The target is an average review time of under three minutes per document.

Cross-checks the system does for you

Confidence is not just a number the model reports about itself; business rules keep adjusting it:

  • Quantity times price equals amount: when it does, confidence in both goes up; numbered tables use this relationship to tell quantity, price and amount apart, even when the customer's headers are misaligned with the data.
  • Price matches the system price: an agreement or standard price match raises confidence; prices below the floor or more than 2% off are flagged in red on the line.
  • Totals match the lines: if neither the sum of quantity times price nor the total including tax matches, the difference is shown at the top.
  • Units and prices are converted: an order for "2 tonnes at 8,600 per tonne" for an item priced per kilogram becomes 2,000 kg at 8.6 per kg, with the conversion explained on the line.
  • Business common sense: an order number the customer has used before links to the original order; a quantity far above the customer's largest order in the past year asks whether a zero slipped in; a delivery date before the order date asks for a check.
  • Extra checks for contracts: specifications that disagree with the item's dimensions, tax treatment that differs from the customer's quotes, non-RMB currencies, your own tax number or bank account not matching your records, and documents in which your company is actually the buyer (such as your own purchase order uploaded by mistake).

Learning: better with every use

Every confirmation trains the system, but only on what it should learn:

  • Item mappings: once a customer's wording for an item is confirmed, it matches directly next time.
  • Customer aliases: when a document names the customer differently from its full name, such as a nickname, the confirmed alias is remembered.
  • Finding the customer in the text: when no customer is named, the system looks for a customer's full name or a contact's mobile number in the text, excluding your own company name.
  • What is not learned: forms of address such as "Mr. Wang" or "Manager Liu" are never learned as customer aliases, so another customer's order is not misattributed.
  • Feedback: every change records "AI value to final value", and the recognition quality page lists the most-corrected fields as clues for new aliases or better prompts.

Invoices and bank receipts

Invoice recognition decides whether an invoice is outgoing or incoming from your company name and tax number, links the partner by tax number, then bank account, then name, suggests the statement to link to, and cross-checks the amount written in words against the figures. Bank receipt recognition decides whether money came in or went out and previews settlement against invoices in order of invoice date. Both have triple duplicate protection: repeated invoice numbers, repeated transaction numbers and repeated files are all rejected. For payment safety, a supplier's bank account is never changed automatically from a recognition result.

Swappable models, no hard dependency

Recognition models connect through the OpenAI-compatible protocol: Qwen-VL on Alibaba Cloud Model Studio, DeepSeek, or a local vLLM or Ollama. The model list degrades in order: if a model is unavailable or over 120% of its daily budget, the next one takes over, with rule-based recognition and manual entry as the final fallback. Recognition jobs run on a PostgreSQL FOR UPDATE SKIP LOCKED queue with leases, retry backoff, daily quotas and a budget breaker, and the JSON a model returns is repaired and normalized for units and prices before validation. API keys are stored with AES-256-GCM using a key derived from the server's master secret, which is never stored in the database, and pages only ever show a masked suffix.

In short

In fordway, AI is not there to make decisions for people; it turns the reviewer's job from typing every field into confirming the doubtful ones. The machine reads, matches, calculates and checks, people look only where there is doubt, and the last key press is always made by a person. Learn more on the fordway product page or book a demo.

Related articles