AI8 min read

Case: From 30 Minutes to Under a Minute with AI Verification of Farm Audits

How we built AI verification for farm sustainability audits: expert-written rules, an advisory LLM, a human verifier in charge and about $0.50 per document.

A farm sustainability assessment can pass every form check and still be wrong. Animal stock that should reconcile does not. A production period does not fit the species. Each field looks fine on its own; the error only shows when you read the fields together.

For a global animal nutrition group, two expert verifiers used to find these errors by hand: about 1,400 assessments a year, at 15–30 minutes each. We built the module that screens each assessment before a verifier sees it. It processes an assessment end to end in under 60 seconds, at about $0.50, and hands the verifier a red, yellow or green verdict with a memo.

The project and its results are on the case study page. This article is about the decisions behind them: why the checks are rules and not one big prompt, how the rules came from the experts, how the verifier stays in charge, how the cost per document stays low, and what we would measure before trusting any system like it. If you plan to automate document checks of your own, these are the parts that decide whether it works.


Where the Errors Actually Were

The errors that cost the verifiers time were not single wrong values. Form validation already catches most of those. They were cross-field errors: stock numbers that do not reconcile, periods that do not fit the species. Each value is plausible; the combination is not.

That shapes everything after it. A cross-field error is a relationship between values, and a relationship can be written down as a rule: these input fields, this calculation, these thresholds. Once it is a rule, it can be checked the same way every time.

The data made it harder:

  • Size. One raw export of a single assessment can reach 21 MB, with thousands of fields.

  • Sparsity. Most of those fields are empty, and an empty field can mean “not applicable” or “forgotten”.

  • Variety. There are 16 assessment types, covering species and farming systems, each with its own logic. New types had to plug in without rework.


Why Rules First, Not One Big Prompt

The obvious first idea for document checks today is to give a large language model the whole document and a long prompt that says “find the errors”. We did not build it that way, and the reasons apply well beyond farms.

In this pipeline, every assessment is classified by type and runs through a deterministic rules engine: a set of common checks plus a set for each supported species, 30 to 100 checks per assessment type. The rules decide the traffic light. The language model comes after them, and its job is to explain.

Question One big prompt Rules engine plus advisory LLM
Same input, same verdict? Not guaranteed; output can vary between runs Yes, by design
Why was this flagged? Whatever the model says about itself The named rule and the field that raised it
Who owns the logic? Whoever edits the prompt Domain experts confirm each rule before it goes into code
A new document type Rewrite and retest the prompt Add a rule set; the common checks still apply
What the model may do Decide Explain, never change the verdict

This split answered the client’s hardest requirement: the AI may advise but not decide, and every flag must name the rule and the field that raised it. With one big prompt, that is a promise you have to test without end. With rules, it is simply how the system works.

📌 Key Insight:

Let code decide whatever can be written as a rule. Give the language model the job code does badly: explaining the findings in plain language, under checks of its own.


Getting the Rules Out of Two Experts’ Heads

The verification logic was not written down anywhere. It lived with two people. So the first month was discovery: interviews with the verifiers and with the client’s infrastructure team, ending in documented rule sets for beef, dairy and broiler assessments.

Every rule follows the same format:

  • Input fields: exactly which values the rule reads.

  • Thresholds: what counts as green, yellow and red.

  • Blank handling: what the rule does when a field is empty, which matters a lot in data where most fields are empty.

Then came a review loop. The client’s experts confirmed every rule in working sessions before it went into code. The rules sit in versioned catalogs, so a change in the logic is a change you can see and trace to a version, not an edit hidden in a prompt.

What we would tell anyone starting a similar project: budget for this step and do not skip it. A model cannot apply rules nobody has written down, and an engineer guessing at them builds the wrong checks with confidence. The experts own the rules; the engineers own the code that runs them.


How the Cost per Document Stays Low

Processing one assessment costs about $0.50. Cost per document is an architecture question more than a prompt question, and three decisions in this pipeline shape it:

  • Shrink the input first. A minifier turns the multi-megabyte raw export into a compact, typed model of tens to hundreds of kilobytes that keeps only the filled fields. Language models are billed by the amount of text they process, so nothing should carry 21 MB of mostly empty fields further than it must.

  • Run the checks as code. The 30–100 rules per assessment type are deterministic code, not model calls. Adding a rule adds no model cost.

  • Give the model one narrow job. The LLM explains the findings; it does not hunt for them. OpenAI is the primary model and Anthropic the fallback, so one provider outage does not stop the review.

The input side was also where much of the effort went. The data contract with the client’s platform and the minifier took two months, twice as long as the core pipeline. Expect the same on your own project: getting clean, typed input is a large part of the job, and it pays off in every step after it.


Keeping the Verifier in Charge

The module does not approve or reject anything. For every assessment it returns a red, yellow or green signal and a memo grouped by section, sent back to the client’s platform through a REST callback. A human verifier still makes the call.

Three things keep that arrangement honest:

  • Every flag is traceable. It names the rule and the field that raised it, so the verifier can check a finding instead of having to trust it.

  • The model cannot change the verdict. The LLM explains the findings in plain language. Built-in evaluations check that its summary matches the rule results and cites only checks that really exist.

  • Every run is on record. Each run, verdict and delivery status is stored in a database and can be read back through the API. Each AI step is traced in a self-hosted Langfuse instance inside the client’s own cloud, so the assessment data stays there.

The point is to move the verifiers’ time from arithmetic to judgment. The machine does the reconciling; the people decide what the findings mean.


What to Measure Before You Trust It

Before a system like this feeds real decisions, we would want answers to the following questions. Some are built into this pipeline; the rest are what we would ask of any document-checking project.

  • Is it repeatable? Run the same document twice; the verdict must not change. Here the rules engine guarantees it: the same input always gives the same verdict.

  • Does each rule do what the expert meant? Test every rule against cases where the expert knows the answer, including blank fields. This project runs a unit and integration test suite with strict type checking.

  • Does the AI text stay faithful? Measure whether the summary matches the rule results and cites only real checks. Without that, the explanation layer can quietly undo the reliability of the rules.

  • Does it hold up on real documents? Test data is tidy; production data is not. The rules engine was run live on real assessments, which is where blank fields and odd combinations show up.

  • Does it agree with your experts? Compare the system’s verdicts with your reviewers’ own decisions on the same documents, and look hardest at the cases it marked green and they did not.

  • What does one document cost, and how long does it take? Track both per run. Here: under 60 seconds and about $0.50, against 15–30 minutes by hand.


Where the Same Pattern Fits

Nothing in this design is specific to farms. Expert rules in versioned catalogs, a deterministic engine, a model that explains but does not decide, and a person who signs off: that pattern could fit many document checks where errors hide between fields. A few places where it could apply:

  • Insurance claims: dates, amounts and policy terms that should agree across a claim file.

  • Supplier audits: questionnaires and certificates where an answer in one section contradicts another.

  • Compliance checklists: internal or regulatory checklists where each item can be written as a rule with a clear threshold.

  • Contract checks: clauses, figures and deadlines that must match a template or a set of approved terms.

These are possibilities, not past projects. The first test is the same as on the farm audits: can your experts write the checks down? If they can, most of the system follows. If they cannot, that is where the project starts.


Conclusion

Going from 15–30 minutes by hand to under a minute did not come from a bigger model. It came from writing down what two experts knew, running it as code, and giving the language model a narrow job that can itself be checked. If your team checks documents by hand against rules that live in a few people’s heads, our AI development service is where we scope the same approach for your process.

Frequently asked questions

What is AI document verification?

Software that checks documents for errors before a person reviews them. In the approach we use, the checks are deterministic rules written down with domain experts, and a language model explains the findings in plain language. The system flags problems; a human decides.

Can an LLM check documents reliably on its own?

A model can spot many errors, but the same document can get different answers on different runs, and it is hard to prove why something was flagged. For checks that feed real decisions, we put the logic in rules that always give the same verdict for the same input, and let the model explain the results.

How much does automated document checking cost per document?

It depends on the size of the documents, the number of checks and the models used. In our farm audit project, processing one assessment costs about $0.50. Reducing the input to the fields that are actually filled and running the checks as code, not as model calls, keeps that number down.

Does AI document checking replace human reviewers?

Not the way we build it. The system returns a red, yellow or green verdict and a memo that names the rule and the field behind each flag. The reviewer still makes the decision, but starts from a pre-checked document instead of doing the arithmetic by hand.

Which documents are suited to automated checks?

Structured documents where errors show up as contradictions between fields: assessments, claims, audit questionnaires, checklists. The deciding question is whether your experts can write the checks down as rules with clear thresholds. If they can, the rest of the system follows from there.

Built by Mobian

Selected work

AgriTech · Global animal nutrition group, UK

<60 secto process an assessment, not 15–30 min by hand

AI verification for farm audits

An AI pipeline that checks farm sustainability assessments for logical errors before a human verifier sees them.

30–100verification rules per assessment type
~$0.50cost per assessment

Skincare e-commerce · Deliq, Ukraine

62%conversion on recommended products

AI skincare recommendations

Selfie-based skin analysis that builds a personal routine and a pre-filled WooCommerce cart, sent via Klaviyo.

+21%average order value in the first month
70%less work for human consultants

Media · OMD Optimum Media Ukraine

200+employees on the platform

Social LMS with AI assistant

An internal social network and LMS with an AI assistant that tailors answers to each employee’s role.

3 monthsto launch the social network and LMS
2 monthsto build the time tracking tool

Free estimate · no obligation

Planning a build on this stack?

We've built with the tools we write about. Tell us about your project and get a second opinion from engineers who've shipped them.

  • 1We review your product, stack and roadmap
  • 2We point out the risks we've seen in similar projects
  • 3You get a team shape and rough timeline within 48 hours

Tell us about your project

Prefer to talk first? Book a 30-minute callWe use your details only to answer your request. Privacy policy