<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Optovate: writing by Ethan Thackery</title><description>Notes on using AI on the repetitive work in small businesses.</description><link>https://optovate.ai/</link><language>en-us</language><item><title>Is this task worth automating? Do the arithmetic first</title><link>https://optovate.ai/blog/is-it-worth-automating/</link><guid isPermaLink="true">https://optovate.ai/blog/is-it-worth-automating/</guid><description>A simple way to work out whether an automation will pay for itself, with the numbers written out, and the cases where the answer is no.</description><pubDate>Fri, 06 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Some tasks are obviously worth automating. Most aren’t obvious either way, and the excitement around AI makes it easy to automate something that will never pay back what it cost.&lt;/p&gt;
&lt;p&gt;Before any project, I do a short piece of arithmetic with the client. It takes five minutes, and sometimes the answer is no.&lt;/p&gt;
&lt;h2 id=&quot;the-three-numbers-you-need&quot;&gt;The three numbers you need&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;How many times a week the task happens. Count it for a week if you aren’t sure. People tend to underestimate frequent tasks and overestimate rare ones.&lt;/li&gt;
&lt;li&gt;How many minutes each one takes, start to finish. Include the switching: opening the email, finding the file, logging into the second system. That overhead is often half the time.&lt;/li&gt;
&lt;li&gt;What an hour of that person’s time costs the business. Include salary and overhead. If you only know the hourly wage, add a third to it.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;the-calculation&quot;&gt;The calculation&lt;/h2&gt;
&lt;p&gt;Hours saved per year = times per week × minutes each × 48 working weeks ÷ 60.&lt;/p&gt;
&lt;p&gt;Take a supplier invoice that someone types into the accounting system. Say it happens 40 times a week and takes 6 minutes each.&lt;/p&gt;
&lt;p&gt;40 × 6 × 48 ÷ 60 = 192 hours a year.&lt;/p&gt;
&lt;p&gt;At $35 an hour, that is $6,720 a year of someone’s time. An automation that costs $4,000 to build and $20 a month to run saves about $540 a month after running costs, so it pays for itself in a little over seven months.&lt;/p&gt;
&lt;p&gt;Now take a monthly report that takes 45 minutes. 1 × 45 × 12 ÷ 60 = 9 hours a year, or $315. Even a small automation costs more than that. Unless the report is error-prone in a way that costs real money, leave it alone, or improve the spreadsheet so it takes 15 minutes instead.&lt;/p&gt;
&lt;h2 id=&quot;what-the-arithmetic-leaves-out&quot;&gt;What the arithmetic leaves out&lt;/h2&gt;
&lt;p&gt;Time saved is the easiest benefit to count, but it isn’t always the biggest.&lt;/p&gt;
&lt;p&gt;Speed can matter more than hours. A quote request answered in ten minutes instead of the next morning wins more jobs. That is worth estimating separately: how many leads go cold today, and what is one of them worth?&lt;/p&gt;
&lt;p&gt;Errors have a cost. A mistyped invoice amount, a missed delivery date or an order entered twice can cost more than a week of data entry. If a task goes wrong regularly, count what the mistakes cost.&lt;/p&gt;
&lt;p&gt;Some costs run the other way. An automation needs someone to own it. Someone has to notice if it stops, and someone has to update it when a vendor changes their form. A well-documented handover keeps that cost small, but it isn’t zero.&lt;span class=&quot;sn&quot;&gt; &lt;small&gt;(Note 1: I build every automation with a short “if this stops” page in the handover docs, written for whoever in the business is least technical. )&lt;/small&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you pay for a retainer, include it in the sum. With a $400 monthly retainer, the invoice example above saves $140 a month instead of $540, and payback stretches past two years. That is why I don’t suggest a retainer for one small automation. It starts to make sense once several automations share it.&lt;/p&gt;
&lt;h2 id=&quot;when-the-answer-is-no&quot;&gt;When the answer is no&lt;/h2&gt;
&lt;p&gt;Tasks that happen rarely, however tedious they feel. Ten minutes twice a month is four hours a year.&lt;/p&gt;
&lt;p&gt;Tasks where the process isn’t settled. If the steps change every few weeks, the automation will always be catching up.&lt;/p&gt;
&lt;p&gt;Tasks where judgment is the job. Pricing a custom quote, deciding whether to extend credit, handling an upset customer. Automation can prepare the information for these. It shouldn’t make the call.&lt;/p&gt;
&lt;h2 id=&quot;a-rule-of-thumb&quot;&gt;A rule of thumb&lt;/h2&gt;
&lt;p&gt;If a task happens at least daily, takes more than a few minutes, and follows the same steps each time, do the arithmetic. It will usually say yes.&lt;/p&gt;
&lt;p&gt;If it fails any of those three, do the arithmetic anyway. It will usually say no.&lt;/p&gt;
</content:encoded><author>hello@optovate.ai (Ethan Thackery)</author></item><item><title>Where I’d start automating in a business of 15 people</title><link>https://optovate.ai/blog/where-to-start-automating/</link><guid isPermaLink="true">https://optovate.ai/blog/where-to-start-automating/</guid><description>If I walked into a typical small business on Monday, these are the five jobs I would look at first, and the order I would look at them in.</description><pubDate>Tue, 29 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;People often ask me what they should automate first. The honest answer is that it depends on where the hours actually go, and you only find that out by watching. But in small businesses the same few jobs come up again and again.&lt;/p&gt;
&lt;p&gt;Picture a business with fifteen people: an owner, someone running the office, a few in sales or service, a few doing the actual work. Here is where I would look, in roughly the order I would look.&lt;/p&gt;
&lt;h2 id=&quot;1-whatever-arrives-by-email-and-gets-retyped&quot;&gt;1. Whatever arrives by email and gets retyped&lt;/h2&gt;
&lt;p&gt;Every business has an inbox that works as a to-do list: quote requests, orders, supplier invoices, booking changes. Someone reads each one and copies details into another system.&lt;/p&gt;
&lt;p&gt;This is the first place I look because it is usually the largest hidden cost, and because it is now easy to automate well. A model can read an email, decide what it is and pull out the details with good accuracy. The new record goes into the CRM or accounting system, and a person approves anything the system is unsure about.&lt;/p&gt;
&lt;p&gt;If you want to see what that looks like, the demo on my home page runs exactly this workflow on a sample email.&lt;/p&gt;
&lt;h2 id=&quot;2-handoffs-between-the-tools-you-already-pay-for&quot;&gt;2. Handoffs between the tools you already pay for&lt;/h2&gt;
&lt;p&gt;Most small businesses have five to fifteen software subscriptions that don’t talk to each other. A deal closes in the CRM and someone creates the project by hand. A job finishes and someone types the invoice. A form is submitted on the website and someone copies it into a spreadsheet.&lt;/p&gt;
&lt;p&gt;These handoffs are rarely more than a few minutes each. They add up because they happen dozens of times a week, and because they are where things fall through the cracks. Connecting the tools directly removes both the time and the dropped balls.&lt;/p&gt;
&lt;h2 id=&quot;3-the-weekly-report-someone-builds-by-hand&quot;&gt;3. The weekly report someone builds by hand&lt;/h2&gt;
&lt;p&gt;Ask who builds the Monday numbers. There is almost always one person who spends a morning exporting, pasting and formatting the same report every week.&lt;/p&gt;
&lt;p&gt;A report that builds itself from live data is one of the most satisfying things to automate, because the before and after are so clear. The person who used to build it gets a morning back, and the report arrives earlier and with fewer mistakes.&lt;/p&gt;
&lt;h2 id=&quot;4-questions-your-best-person-answers-over-and-over&quot;&gt;4. Questions your best person answers over and over&lt;/h2&gt;
&lt;p&gt;What is the returns policy for custom orders? Which supplier do we use for this part? How do I handle a customer who wants to split a payment?&lt;/p&gt;
&lt;p&gt;If your most experienced person is the company’s search engine, an internal assistant can take a lot of that load. It answers from your own documents and shows where the answer came from, so people can trust it, and it passes anything it can’t answer to a human.&lt;/p&gt;
&lt;p&gt;This one comes fourth because it needs good documents to answer from. If the answers only exist in someone’s head, writing them down comes first.&lt;/p&gt;
&lt;h2 id=&quot;5-follow-ups-that-depend-on-someone-remembering&quot;&gt;5. Follow-ups that depend on someone remembering&lt;/h2&gt;
&lt;p&gt;Quotes that were sent and never chased. Invoices that are ten days overdue. Customers who haven’t ordered in three months.&lt;/p&gt;
&lt;p&gt;Each of these is a simple rule plus a well-written message, and each one is money left on the table when nobody remembers. They are fifth only because they are easy and quick, so they often get bundled into one of the projects above.&lt;/p&gt;
&lt;h2 id=&quot;what-i-would-not-start-with&quot;&gt;What I would not start with&lt;/h2&gt;
&lt;p&gt;I would not start with a chatbot on the website. It is the most visible option and usually the least valuable one for a business this size. Visitors who want to buy will fill in a form or call. The ones who chat are mostly asking questions a clear page would answer.&lt;/p&gt;
&lt;p&gt;I would also not start with anything that touches money without a person checking it. Automate the reading and the preparing. Keep a human on the approving, at least until the system has a few months of good results behind it.&lt;/p&gt;
&lt;h2 id=&quot;how-to-tell-which-one-is-yours&quot;&gt;How to tell which one is yours&lt;/h2&gt;
&lt;p&gt;For a week, ask everyone to note any task they did more than five times that involved copying information from one place to another. Don’t judge the list. Just count.&lt;/p&gt;
&lt;p&gt;The task at the top of that list is almost always the right first project.&lt;/p&gt;</content:encoded><author>hello@optovate.ai (Ethan Thackery)</author></item><item><title>Fix the spreadsheet before you buy an AI agent</title><link>https://optovate.ai/blog/fix-the-spreadsheet-first/</link><guid isPermaLink="true">https://optovate.ai/blog/fix-the-spreadsheet-first/</guid><description>Most small businesses asking for an AI agent have a data problem first. Here is how to tell, and what to fix before spending money on automation.</description><pubDate>Tue, 08 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A lot of conversations about automation now start with the words “AI agent”. They have read that an agent can answer customers, chase invoices or run their scheduling, and they want one.&lt;/p&gt;
&lt;p&gt;Then I ask to see the spreadsheet the agent would work from, and the conversation changes.&lt;/p&gt;
&lt;h2 id=&quot;what-the-spreadsheet-usually-looks-like&quot;&gt;What the spreadsheet usually looks like&lt;/h2&gt;
&lt;p&gt;It is rarely one spreadsheet. It is a main file, a copy someone made in 2023 “just for the warehouse”, and a third that lives in an email thread. The customer column holds “Acme”, “ACME Inc.” and “Acme (Bob)”. Dates are typed three ways. A column called &lt;em&gt;Notes&lt;/em&gt; contains half the important information in the business, written in shorthand only two people understand.&lt;/p&gt;
&lt;p&gt;People cope with this because people are good at context. Bob knows that “Acme (Bob)” is the same customer as “ACME Inc.” and that a blank in the status column means “probably shipped, ask Maria”.&lt;/p&gt;
&lt;p&gt;Software doesn’t know any of that. An AI model will make a guess, and it will guess confidently. If the data behind your business is ambiguous, an agent built on it will be ambiguous at speed.&lt;/p&gt;
&lt;h2 id=&quot;why-this-matters-more-for-ai-than-for-people&quot;&gt;Why this matters more for AI than for people&lt;/h2&gt;
&lt;p&gt;When a person makes a mistake with messy data, it is usually one mistake, and someone notices. When an automation makes a mistake with messy data, it makes the same mistake every time the situation comes up, and nobody notices until a customer does.&lt;/p&gt;
&lt;p&gt;That is the real cost. It isn’t that the agent is bad. It is that the agent faithfully repeats every inconsistency it was given, without the hesitation a person would show.&lt;span class=&quot;sn&quot;&gt; &lt;small&gt;(Note 1: A person who sees “Acme (Bob)” and “ACME Inc.” on the same day will usually stop and check. A model processing them a second apart has no reason to. )&lt;/small&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id=&quot;a-quick-test&quot;&gt;A quick test&lt;/h2&gt;
&lt;p&gt;Before you spend money on any automation, try this. Pick the process you want to automate and ask two people who do it to write down, separately, how they handle the five most common cases.&lt;/p&gt;
&lt;p&gt;If their answers match, you have a process. It can be automated, and the automation will probably work well.&lt;/p&gt;
&lt;p&gt;If their answers differ, you have two processes that happen to share a name. Automating that locks one version in and quietly breaks the other person’s work. The fix here is a meeting, not software.&lt;/p&gt;
&lt;h2 id=&quot;what-fixing-it-looks-like&quot;&gt;What fixing it looks like&lt;/h2&gt;
&lt;p&gt;Fixing the data is less dramatic than it sounds. In most small businesses it takes days, not months, and it means doing a handful of unglamorous things.&lt;/p&gt;
&lt;p&gt;Pick one source of truth for each kind of record. Customers live in the CRM, not in three spreadsheets. Orders live in the order system. If a copy exists for convenience, it is read-only.&lt;/p&gt;
&lt;p&gt;Give every record a stable identifier. A customer number that never changes is worth more than a perfectly formatted name.&lt;/p&gt;
&lt;p&gt;Turn free text into choices where you can. A status column with five allowed values can be automated. A status column where people type whatever they like cannot.&lt;/p&gt;
&lt;p&gt;Move the important parts of the &lt;em&gt;Notes&lt;/em&gt; column into real fields. If people keep writing “net 60” in the notes, payment terms deserve a column.&lt;/p&gt;
&lt;h2 id=&quot;then-automate&quot;&gt;Then automate&lt;/h2&gt;
&lt;p&gt;Once the data is in decent shape, the automation gets smaller, cheaper and more reliable. Often the thing you wanted an agent for turns out to need a simple rule: when an order is marked &lt;em&gt;shipped&lt;/em&gt;, send the customer the tracking link. That is not AI. It is a twenty-minute integration, and it never hallucinates.&lt;/p&gt;
&lt;p&gt;AI still earns its place, mostly at the edges where the input really is messy and can’t be fixed at the source: reading supplier invoices, sorting inbound email, pulling details out of scanned forms. There, a model is the right tool, because you don’t control the format of what arrives.&lt;/p&gt;
&lt;p&gt;The order matters. Clean what you control, then use AI for what you don’t.&lt;/p&gt;
&lt;h2 id=&quot;the-question-i-ask-on-every-first-call&quot;&gt;The question I ask on every first call&lt;/h2&gt;
&lt;p&gt;“If I built this tomorrow, what would it read, and is that information correct today?”&lt;/p&gt;
&lt;p&gt;If the answer is “mostly”, the first week of the project is cleanup. I would rather say that on the first call than build something impressive that inherits a mess.&lt;/p&gt;
</content:encoded><author>hello@optovate.ai (Ethan Thackery)</author></item><item><title>How I got a document pipeline to handle 10x the documents per hour</title><link>https://optovate.ai/blog/document-pipeline-10x/</link><guid isPermaLink="true">https://optovate.ai/blog/document-pipeline-10x/</guid><description>A walkthrough of an Azure OCR pipeline for circuit-board test reports: what each part does, where the time went, and what a small business can borrow from it.</description><pubDate>Tue, 18 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Most of the documents a business receives are read twice. Once by a person who opens the file, and once more when that person types what they saw into some other system. The pipeline in this post exists to remove the second reading, and most of the first.&lt;/p&gt;
&lt;p&gt;I built it in my job as an AI data engineer. It takes in test reports for printed circuit boards, reads them with OCR, attaches the right data label to every record, stores the results and generates the reports people actually look at. When it was finished, it handled ten times as many test documents per hour as before. I can’t name the customers or show their data, so everything below is the general architecture in my own words, with no customer data, names or production code. The code sketch is a generic example written for this post.&lt;/p&gt;
&lt;h2 id=&quot;what-the-documents-look-like&quot;&gt;What the documents look like&lt;/h2&gt;
&lt;p&gt;A circuit-board test report is a dense, mostly tabular document. There is a header with identifiers (board, batch, station, date), then pages of measurements, each with a value, a unit and a pass or fail against a limit. Reports like this rarely arrive in one tidy format.&lt;/p&gt;
&lt;p&gt;Two things make them awkward. The layouts vary by source, so a template that reads one station’s output breaks on the next. And the numbers matter: a misread decimal point turns into a wrong answer about whether a part works.&lt;/p&gt;
&lt;p&gt;The second point shaped the design more than the first. A pipeline like this has to be fast, but it also has to know when it isn’t sure, and say so.&lt;/p&gt;
&lt;h2 id=&quot;the-shape-of-the-pipeline&quot;&gt;The shape of the pipeline&lt;/h2&gt;
&lt;p&gt;The whole system is six steps, each a separate piece that does one job and hands its result to the next.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A report arrives and a webhook tells the pipeline it exists.&lt;/li&gt;
&lt;li&gt;The webhook handler puts a message on a queue, and an Azure Function picks up that one file from it.&lt;/li&gt;
&lt;li&gt;Azure AI’s OCR service reads every page and returns text, tables and positions.&lt;/li&gt;
&lt;li&gt;A classification model assigns each extracted record a data label from the company’s own label set.&lt;/li&gt;
&lt;li&gt;The labeled records are written to Azure SQL.&lt;/li&gt;
&lt;li&gt;Python code builds the test reports from the database.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Next to those six steps sits a set of retention rules that decide what stays in the database and what moves out, which I’ll come back to because it turned out to matter for cost more than for speed.&lt;/p&gt;
&lt;h2 id=&quot;why-it-got-faster&quot;&gt;Why it got faster&lt;/h2&gt;
&lt;p&gt;The 10x figure is throughput: documents processed per hour. Most of it came from changing what waits for what.&lt;/p&gt;
&lt;h3 id=&quot;each-document-starts-its-own-run&quot;&gt;Each document starts its own run&lt;/h3&gt;
&lt;p&gt;The simplest way to process files is to check a folder every so often and work through whatever is there. That design has a hidden cost: a file that arrives one minute after the check waits for the next one, and a big batch makes everything behind it wait in line.&lt;/p&gt;
&lt;p&gt;With webhook ingestion, each document announces itself when it arrives and starts its own run. Nothing waits for a timer, and nothing runs when there is no work.&lt;span class=&quot;sn&quot;&gt; &lt;small&gt;(Note 1: On Azure’s consumption plan, functions are billed per execution, which is part of why an event-driven design tends to be cheaper as well as faster. )&lt;/small&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id=&quot;each-file-is-its-own-small-job&quot;&gt;Each file is its own small job&lt;/h3&gt;
&lt;p&gt;Azure Functions run many copies of the same small function side by side. Because every document is processed by its own function call, twenty documents arriving together become twenty runs at once rather than one run that takes twenty times as long.&lt;/p&gt;
&lt;p&gt;This only works if each step is independent. A function that reads a document should not need to know what happened to the previous document. Keeping the steps that small took some discipline, and it is the single biggest reason the throughput number moved.&lt;/p&gt;
&lt;h3 id=&quot;ocr-is-the-slow-part-so-everything-else-gets-out-of-its-way&quot;&gt;OCR is the slow part, so everything else gets out of its way&lt;/h3&gt;
&lt;p&gt;Reading a page with OCR takes far longer than any other step. Classification, writing to the database and building a report are quick by comparison. So the design question becomes: is anything making the OCR call wait, or making the next document wait for the OCR call?&lt;/p&gt;
&lt;p&gt;Here is a simplified sketch of the per-file pattern. The webhook’s only job is to drop a message on a queue; this function is triggered by that message. Production code has more error handling and logging, and the helper functions are left out.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light-high-contrast github-dark-high-contrast&quot; style=&quot;--shiki-light:#0e1116;--shiki-dark:#f0f3f6;--shiki-light-bg:#ffffff;--shiki-dark-bg:#0a0c10; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; azure.functions &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; func&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;app &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; func.FunctionApp()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#622CBC;--shiki-dark:#DBB7FF&quot;&gt;@app.queue_trigger&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#702C00;--shiki-dark:#FFB757&quot;&gt;arg_name&lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;msg&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#702C00;--shiki-dark:#FFB757&quot;&gt;                   queue_name&lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;incoming-reports&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#702C00;--shiki-dark:#FFB757&quot;&gt;                   connection&lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;Storage&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#622CBC;--shiki-dark:#DBB7FF&quot;&gt; process_report&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;(msg: func.QueueMessage) -&gt; &lt;/span&gt;&lt;span style=&quot;--shiki-light:#023B95;--shiki-dark:#91CBFF&quot;&gt;None&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    job &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; msg.get_json()  &lt;/span&gt;&lt;span style=&quot;--shiki-light:#66707B;--shiki-dark:#BDC4CC&quot;&gt;# {&quot;blob_url&quot;: ..., &quot;source&quot;: ...}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#66707B;--shiki-dark:#BDC4CC&quot;&gt;    # 1. Read the document. This is the slow call.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    result &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; read_with_ocr(job[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;blob_url&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#66707B;--shiki-dark:#BDC4CC&quot;&gt;    # 2. Turn tables into records and label each one.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    records &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; [label(r) &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; r &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; extract_records(result)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#66707B;--shiki-dark:#BDC4CC&quot;&gt;    # 3. Unsure records go to a review queue for a person.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    sure &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; [r &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; r &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; records &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; r.confidence &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#023B95;--shiki-dark:#91CBFF&quot;&gt; THRESHOLD&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    unsure &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; [r &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; r &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; records &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; r.confidence &lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#023B95;--shiki-dark:#91CBFF&quot;&gt; THRESHOLD&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;    save_records(sure, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#702C00;--shiki-dark:#FFB757&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;job[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;source&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt; unsure:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;        queue_for_review(unsure, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#702C00;--shiki-dark:#FFB757&quot;&gt;blob_url&lt;/span&gt;&lt;span style=&quot;--shiki-light:#A0111F;--shiki-dark:#FF9492&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;job[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#032563;--shiki-dark:#ADDCFF&quot;&gt;&quot;blob_url&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#0E1116;--shiki-dark:#F0F3F6&quot;&gt;])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The queue in front of the function matters as much as the function. If a burst of reports arrives, they line up in the queue and get processed as fast as the OCR service allows, instead of overwhelming it and failing.&lt;/p&gt;
&lt;h2 id=&quot;labels-at-the-door&quot;&gt;Labels at the door&lt;/h2&gt;
&lt;p&gt;Every record that comes out of a test report belongs to a category, and the reports downstream are built by category. Those labels are specific to the business, so no off-the-shelf model knows them.&lt;/p&gt;
&lt;p&gt;I built classification models and ingestion logic that assign the label as the record comes in. It means the database never holds unlabeled rows, so report code never has to guess, and nobody has to sort records by hand before a report can run.&lt;/p&gt;
&lt;p&gt;The part I would stress to anyone building something similar is the confidence threshold in the sketch above. A model that is right most of the time is only useful if the cases where it is unsure go somewhere a person will see them.&lt;span class=&quot;sn&quot;&gt; &lt;small&gt;(Note 2: In practice, “a person will see them” means a short queue with the original page next to the extracted values, so the reviewer can confirm or correct in a few seconds. )&lt;/small&gt;&lt;/span&gt; A wrong label that nobody flags can sit in a report for months.&lt;/p&gt;
&lt;h2 id=&quot;the-cost-side-deciding-what-to-keep&quot;&gt;The cost side: deciding what to keep&lt;/h2&gt;
&lt;p&gt;Faster ingestion has a side effect: you store a lot more, a lot faster. Raw files, OCR output, intermediate results and final records all pile up, and cloud storage and database costs grow with them.&lt;/p&gt;
&lt;p&gt;So the pipeline includes retention workflows. Each kind of data has a rule for how long it stays in the database and where it goes after that. Final records stay where the reports can reach them. Bulky intermediate output that nobody queries is moved to cheaper storage or removed once it has served its purpose. Webhook ingestion helps here too, because the pipeline only touches what actually arrived instead of scanning storage on a schedule.&lt;/p&gt;
&lt;p&gt;With rules like these, the monthly bill tracks what the reports actually use instead of every file that ever arrived.&lt;/p&gt;
&lt;h2 id=&quot;what-a-small-business-can-borrow&quot;&gt;What a small business can borrow&lt;/h2&gt;
&lt;p&gt;A twenty-person company does not receive thousands of circuit-board test reports. It receives supplier invoices, purchase orders, signed forms, delivery notes, insurance certificates and inquiry emails. The volume is smaller. The structure of the problem is identical: something arrives, a person reads it, a person types what it says into another system.&lt;/p&gt;
&lt;p&gt;The same four ideas carry over at a fraction of the size and cost.&lt;/p&gt;
&lt;h3 id=&quot;let-the-document-start-the-work&quot;&gt;Let the document start the work&lt;/h3&gt;
&lt;p&gt;An invoice that arrives by email can trigger its own processing within seconds. You don’t need a daily batch.&lt;/p&gt;
&lt;h3 id=&quot;keep-each-step-small&quot;&gt;Keep each step small&lt;/h3&gt;
&lt;p&gt;“Read it”, “decide what it is”, “put it in QuickBooks” and “tell someone” are separate steps. When one breaks, you know which.&lt;/p&gt;
&lt;h3 id=&quot;send-the-unsure-cases-to-a-person&quot;&gt;Send the unsure cases to a person&lt;/h3&gt;
&lt;p&gt;People stay in the process. They stop reading the ninety documents that are fine and look carefully at the ten that aren’t.&lt;/p&gt;
&lt;h3 id=&quot;decide-what-to-keep&quot;&gt;Decide what to keep&lt;/h3&gt;
&lt;p&gt;Even a small system builds up files. Writing the retention rule on day one takes ten minutes, and it saves the afternoon you would otherwise spend after a surprise bill.&lt;/p&gt;
&lt;h2 id=&quot;what-i-would-do-the-same-way-again&quot;&gt;What I would do the same way again&lt;/h2&gt;
&lt;p&gt;If I were starting over, I would keep the same four choices: one small function per document, a queue in front of the slow step, labels assigned at the door, and a written rule for every kind of stored data. Those choices produced most of the 10x.&lt;/p&gt;
&lt;p&gt;The thing I would add on day one of any pipeline like this is a simple count of uncertain records: how many the model was unsure about, by source, by day. That number tells you where the documents are getting harder to read, usually before anyone complains.&lt;/p&gt;
&lt;p&gt;If you have a pile of documents that someone in your business retypes every week, I’d like to hear about it. The pipeline above is bigger than what most small businesses need, and the smaller version is quicker and cheaper to build.&lt;/p&gt;
</content:encoded><author>hello@optovate.ai (Ethan Thackery)</author></item></channel></rss>