You never know how dangerous an AI system is until its output starts moving money.
OCR can extract an invoice total, vendor name, and line items in seconds.
But what happens when the total is wrong, the invoice ID is missing, or the extracted value has weak visual evidence?
If your system trusts the JSON blindly, you have a data integrity problem. โ
In Issue 49 of The Modern Engineer, I build a production-oriented OCR extraction contract using .NET and Azure AI Document Intelligence.
The principle is simple: Azure extracts. Deterministic code decides.
We don't let the extraction provider decide whether a document is safe for downstream processing.
Instead, we define explicit contracts that check ๐
โ
Required fields and confidence thresholds
โ
Bounding regions that support extracted values
โ
Line-item confidence and financial reconciliation
โ
Currency mismatches and missing evidence
โ
Quarantine rules for failed or contradictory extractions
Every document follows a deterministic route: admitted, needs_review, or quarantined.
A missing invoice ID isn't a prompt engineering challenge.
A financial discrepancy isn't something an LLM should explain away.
And a confidence score is useless if it doesn't change what the system is allowed to do.
I also cover live Azure extraction, transient failure handling, in-memory unit tests, and structured quarantine reports.
The goal isn't to prove that OCR can read an invoice.
It's to prove that our system knows when not to trust what OCR returns.
This pattern applies to invoice processing, insurance claims, onboarding documents, procurement, and any workflow where extracted data becomes a business event.
๐ฉ Read full issue: elliotone.com/newsletter/202โฆ
---
๐ Subscribe to The Modern Engineer today for production-grade AI architectures, real code, and engineering insights with no demos and no fluff: elliotone.com/newsletter
Serious AI builders, let's connect.
I'm Elliot, 27, an AI Engineer and solo builder from London.
I'm looking to expand my network and connect with:
AI Engineers
AI Founders
CTOs
Indie Builders
Other people in tech
Drop a comment, tell me what you're building, and let's connect and build together!
Elliot One retweeted
Most job titles are BS anyway.
Forward Deployed Engineer. AI Context Engineer. AI Harness Engineer.
Isnโt this all AI engineering, or even broader, software engineering?
The specialisations are real. But let's stop pretending every new abstraction needs a new profession.
Software engineers are fucking alive.
Most job titles are BS anyway.
Forward Deployed Engineer. AI Context Engineer. AI Harness Engineer.
Isnโt this all AI engineering, or even broader, software engineering?
The specialisations are real. But let's stop pretending every new abstraction needs a new profession.
Software engineers are fucking alive.
I havenโt written a single line of code by hand in at least a year.
I donโt think thereโs any good reason to write code manually at this point.
Convince me otherwise.
Some days, I have no idea what I'm doing.
I'm building SaaS products, writing about AI Engineering, growing my newsletter, and working as a Founding Engineer at an AI startup in London.
For a while, I kept looking for a single path that would bring everything together.
Then I realised they don't need to be separate paths.
They're all part of the same journey.
I'm figuring things out as I go, building in public, and slowly creating my own path towards entrepreneurship.
I guess that's what building in public is all about.
C# 15 union types enable stronger contracts and simpler domain modeling.
C# developers for years used ๐จ๐๐ฃ๐๐๐ญ, inheritance, or custom result classes to represent values with multiple possible shapes.
Union types offer a more direct approach: explicitly define the valid alternatives in the type system.
For example, a ๐ฟ๐๐ข๐๐๐๐๐ผ๐๐๐๐๐ could represent ๐ฒ๐๐๐, ๐ฒ๐๐๐, or ๐ฑ๐๐๐๐๐๐๐๐๐๐๐ without forcing unrelated types into an artificial hierarchy.
The real engineering value goes beyond syntax.
โ
Explicit contracts: Make valid outcomes part of the API definition.
โ
Safer pattern matching: Handle distinct cases clearly and identify missing branches when cases evolve.
โ
Better domain modeling: Represent business outcomes and workflow states without excessive nullable properties or boilerplate.
Think of ๐ถ๐๐๐๐๐๐๐๐๐๐๐๐ representing ๐๐๐๐๐ณ๐๐, ๐ฝ๐๐๐ต๐๐๐๐, or ๐
๐๐๐๐๐๐๐๐๐๐ด๐๐๐๐.
Instead of returning ๐จ๐๐ฃ๐๐๐ญ or ๐ญ๐ก๐ซ๐จ๐ฐ๐ข๐ง๐ ๐๐ฑ๐๐๐ฉ๐ญ๐ข๐จ๐ง๐ฌ for expected business outcomes, the API communicates its possibilities directly.
Union types are still a C# 15 preview feature, but the underlying principle is timeless.
Good type systems do more than describe data. They encode domain constraints and make invalid states harder to represent.
Do you use union types in your codebase? If not, why not?
Nobody cares about your idea or product as much as you think, so donโt be afraid to share it and talk about it.
Some entrepreneurs worry that someone might steal their idea. I donโt think thatโs usually the case.
Serious builders are too busy building their own things to spend time stealing or copying someone elseโs idea.
Donโt be paranoid about your idea. Itโs not that special.
The execution and the journey are what matter.
Looking to connect with ambitious AI founders.
Drop a comment with one line about what youโre building.
No small talk. No fluff.
Just builders connecting with builders.
Iโm Elliot, building XOREN (xoren.co.uk) focused on operational and frontier ai systems for organisations.
AI founders letโs connect.
Iโm looking to expand my network on X. Iโd like connect with more serious ai builders, solopreneurs, and engineers.
Engineers who have become solopreneurs, how do you handle the marketing and sales side of your journey?
What tips, tricks, or systems have worked best for you?
More often than not, I think about how, if I achieve just this one thing, I can finally start living.
Iโve been like this for most of my life, always chasing the next thing, believing that life will finally begin once I get there.
Iโve realised recently that I do the same with my entrepreneurial journey. I keep pushing myself harder and harder. Some days, it feels like Iโm bullying myself, pushing myself beyond what I should, and I donโt even know why.
But sometimes, when I slow down and look back, I realise Iโm not the same person I was yesterday, let alone a couple of years ago.
Life is still happening.
At 27, I feel afraid of how much there is still left to achieve and how far behind I am compared to the deadlines I set for myself.
But Iโve never regretted anything.
Iโm not where I thought Iโd be, but Iโm not in the worst place I ever imagined myself being, either.
And maybe thatโs the point. All of this, the uncertainty, the setbacks, the growth, the waiting, is part of life itself.
Life isnโt something that begins when we achieve our goals. Itโs happening right now, along the way.
Agentic coding is the future of engineering, not vibe coding.
The difference is not how much AI you use.
It is how much engineering discipline you preserve.
Vibe coding optimises for implementation speed.
You describe what you want, generate code, iterate, and hope the result works.
This works for prototypes and experimentation, but becomes dangerous when speed is mistaken for engineering quality.
โ
Agentic coding changes the execution model.
Instead of generating isolated snippets, AI agents can inspect repositories, analyse dependencies, plan changes, modify files, run tests, interpret failures, and iterate toward a defined outcome.
The shift is from AI generating code to AI participating in a controlled engineering workflow.
But autonomy without constraints is just another source of technical debt.
The challenge is enabling agents to execute complex tasks without compromising correctness, security, or maintainability.
This requires a clear division of responsibility ๐
๐. ๐๐ฎ๐ฆ๐๐ง๐ฌ ๐จ๐ฐ๐ง ๐ข๐ง๐ญ๐๐ง๐ญ.
โณ Requirements, architecture, constraints, security boundaries, and acceptance criteria must be explicit.
๐. ๐๐ ๐๐ง๐ญ๐ฌ ๐จ๐ฐ๐ง ๐๐ฑ๐๐๐ฎ๐ญ๐ข๐จ๐ง.
โณ Implementation, refactoring, debugging, and testing can increasingly be delegated within defined boundaries.
๐. ๐๐ง๐ ๐ข๐ง๐๐๐ซ๐ฌ ๐จ๐ฐ๐ง ๐ฏ๐๐ซ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง.
โณ Code review, integration testing, observability, threat modelling, and architectural consistency remain essential.
A passing test suite is evidence, not proof, of correctness.
An agent completing a task does not make the system production-ready.
The engineer's job is to establish when autonomous execution can be trusted.
That requires better evaluation loops, deterministic guardrails, least-privilege tool access, reproducible environments, and verification gates agents cannot bypass.
The future is not about removing engineers from software development.
It is about shifting effort from manually writing every line to defining, directing, and verifying complex systems.
Vibe coding makes code generation easier. Agentic engineering makes development more autonomous.
The competitive advantage will belong to engineers who understand software and how to build reliable systems around AI agents.
That is the difference between generating code faster and engineering software at a higher level.
What does your agentic workflow look like?
AgenticCoding | SoftwareEngineering | AIEngineering



