<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[cloudsquid blog]]></title><description><![CDATA[Insights for Operators and Executives in Finance, Operations, Logistics and Digital Transformation. We write about new technological unlocks, practical guides around AI Agents and our intelligence of creating production AI systems in these functions.]]></description><link>https://newsletter.cloudsquid.io</link><image><url>https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png</url><title>cloudsquid blog</title><link>https://newsletter.cloudsquid.io</link></image><generator>Substack</generator><lastBuildDate>Thu, 30 Jul 2026 16:03:36 GMT</lastBuildDate><atom:link href="https://newsletter.cloudsquid.io/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Mike McCarthy]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[cloudsquid@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[cloudsquid@substack.com]]></itunes:email><itunes:name><![CDATA[Mike McCarthy]]></itunes:name></itunes:owner><itunes:author><![CDATA[Mike McCarthy]]></itunes:author><googleplay:owner><![CDATA[cloudsquid@substack.com]]></googleplay:owner><googleplay:email><![CDATA[cloudsquid@substack.com]]></googleplay:email><googleplay:author><![CDATA[Mike McCarthy]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Your ERP Has a New Coworker. Here's What You Need to Know.]]></title><description><![CDATA[How AI agents connect to the systems that run your business and what two weeks of news just clarified.]]></description><link>https://newsletter.cloudsquid.io/p/your-erp-has-a-new-coworker-heres</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/your-erp-has-a-new-coworker-heres</guid><dc:creator><![CDATA[Filip Rejmus]]></dc:creator><pubDate>Thu, 07 May 2026 11:21:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last week, two things happened that most finance and ops teams missed.</p><p>SAP updated its API policy to block third-party AI agents from interacting with its systems. Salesforce made it generally available for developers to build and deploy agents directly from the command line. Two large companies, moving in opposite directions, betting differently on the same question: how should AI agents actually talk to enterprise software?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The answer to that question determines what&#8217;s automatable in your organization over the next few years. It&#8217;s worth understanding.</p><div><hr></div><h2>What an Agent Actually Does</h2><p>An AI agent is a language model that takes actions, not just answers. It can query a database, open a file, send an email, update a record. The difference between a chatbot and an agent is a set of tools and the autonomy to decide when to use them.</p><p>In an enterprise context, the tasks agents are most valuable for tend to span multiple systems. Reconciling invoices against the GL touches an AP inbox, an ERP, and maybe a shared drive. An agent has to reach across all of them, which means connection is the foundational problem.</p><div><hr></div><h2>The Two Dominant Approaches: MCP and CLI</h2><h3>MCP &#8212; Model Context Protocol</h3><p>MCP is an open standard, originally created by Anthropic and now stewarded by the Linux Foundation, that gives AI agents a structured way to interact with external systems. An MCP server sits in front of a tool or data source and exposes a menu of callable functions  along with descriptions of what each one does and what parameters it takes. The agent reads the menu, decides what it needs, and makes calls accordingly.</p><p>The appeal is standardization. In the same way that APIs let SaaS products plug into each other, MCP lets agents treat external systems as interoperable building blocks. NetSuite ships an AI Connector Service built on MCP. Salesforce supports MCP. The ecosystem is growing.</p><h3>CLI &#8212; Command Line Interface</h3><p>A CLI is a program you run from a terminal. It accepts commands, executes them, and returns output. It&#8217;s not a new idea; it&#8217;s how developers have interacted with systems for decades but it&#8217;s becoming a first-class integration surface for agents.</p><p>Salesforce&#8217;s move to ship a dedicated agents plugin for its CLI is the clearest recent example. Developers can now build, configure, test, and deploy Agentforce workflows using the same terminal-based toolchain they&#8217;ve always used for code. Agents can do the same.</p><p>The CLI&#8217;s advantage is composability. The output of one command becomes the input of the next. Data can be filtered, reshaped, and piped through a chain of operations without ever loading it fully into memory. That property, mundane in a developer workflow, turns out to matter enormously for ERP tasks.</p><div><hr></div><h2>When There&#8217;s No API</h2><p>A significant share of enterprise systems &#8212; especially on-premise deployments, legacy platforms, and older ERP configurations &#8212; don&#8217;t have usable APIs. Or the API exists but covers a fraction of the data model, requires expensive licensing, or is so poorly documented as to be effectively inaccessible.</p><p>In those cases, the integration surface is whatever the system already exposes.</p><p><strong>Email</strong> remains one of the most durable integration channels in enterprise software. A large portion of the operational data that flows through a business still moves through inboxes. An agent that reads and writes email participates in those flows without touching a database.</p><p><strong>SFTP</strong> is how older systems exchange bulk data at scale. Many SAP, Oracle, and legacy MRP environments produce nightly or weekly file drops  An agent that reads from an SFTP folder has access to a rich, structured data stream, no API required.</p><p><strong>Screen automation</strong>, aka RPA is the last resort, and increasingly a viable one. It&#8217;s fragile when interfaces change, but for systems that expose no other programmatic surface, it works. AI-powered document parsing has made the unstructured outputs of these interfaces considerably more tractable.</p><p>The through-line: the system doesn&#8217;t need to change. The agent adapts to whatever surface is already there.</p><div><hr></div><h2>The Three Things an Agent Needs</h2><p>Reducing this to first principles, an agent automating work in an ERP or system of record needs three things:</p><h3>1. Data</h3><p>The information relevant to the task: transaction records, invoice data, vendor master, chart of accounts, whatever the workflow touches. It might come from the ERP directly, from a file share, from email, or from a warehouse. Getting it to the agent cleanly and completely is the first constraint.</p><h3>2. A Code Environment</h3><p>ERP tasks are really a chain of transformations and lookups. "Do these invoice line items match the PO within tolerance?" is not answerable by reading data. It requires joining two datasets, computing variances, applying business logic, and producing a structured output. An agent with access to a code environment can do this properly: write a script, run it, inspect the result, adjust, and iterate. Without one, the agent is limited to reasoning in natural language about data it has already read into memory.</p><h3>3. A Way to Push and Pull from Systems</h3><p>Once the agent has reasoned about the data and reached a conclusion, it needs to either pull more or push something back. This is where MCP and CLI come in. The integration layer is what makes the agent's output operational rather than advisory.</p><div><hr></div><h2>Why CLI Wins for ERP Work</h2><p>MCP's value proposition is tool discovery: a structured, typed interface where the agent can ask "what can this system do?" and get a documented answer back. For exploratory tasks or unfamiliar APIs, that's genuinely useful.</p><p>But ERP data has a characteristic that breaks the core assumption of most MCP deployments: volume.</p><p>A material master in SAP can span millions of rows across multiple views. When an MCP server loads this into the agent&#8217;s context window, the architecture becomes bounded by what fits (or rather what doesn&#8217;t). Language models have finite context windows, and production ERP datasets will exceed them.</p><p>CLI sidesteps this because the code environment handles the data, not the context window. The agent writes a query or script to extract exactly the records it needs. That data lands on disk. A second script transforms and filters it. The output is what reaches the model. The model reads a few hundred rows instead of a few million.</p><p>The data is also persistent between steps. An agent working through a multi-step task doesn&#8217;t need to hold everything in memory simultaneously. It fetches, stores, computes, fetches again. CLI composability, i.e piping output from one command into the next, is exactly the right tool for this pattern.</p><p>That doesn&#8217;t make MCP useless. For structured write operations where typed validation before anything touches the system of record is valuable, for multi-agent setups where a central orchestrator coordinates across many downstream tools, MCP earns its overhead. The pattern that tends to work in our experience: CLI for data work, MCP at the point of write.</p><div><hr></div><h2>What the SAP Policy Actually Means</h2><p>SAP&#8217;s new API policy prohibits the use of its APIs for &#8220;interaction or integration with semi-autonomous or generative AI systems that plan, select, or execute sequences of API calls.&#8221; It also bans &#8220;systematic or large-scale data extraction.&#8221;</p><p>The practical effect is that third-party agents (anything not running through SAP&#8217;s own AI layer, Joule)  are now in technical violation if they&#8217;re making API calls autonomously. The policy says enforcement rights include throttling, suspension, and termination. It explicitly prohibits circumvention through proxies, custom code, or intermediary services.</p><p>The DSAG, representing tens of thousands of SAP customers across Germany, Austria, and Switzerland, has publicly criticized the policy for creating uncertainty and potentially blocking innovation. They&#8217;ve noted that the policy doesn&#8217;t clearly specify which APIs are affected, leaving customers unable to determine what&#8217;s compliant. SAP has reserved the right to change the approved API list unilaterally.</p><p>SAP markets this as a system stability measure. The commercial effect is that it steers AI workflows toward Joule and SAP&#8217;s own ecosystem. These are not mutually exclusive positions.</p><p>The workarounds for teams who need to operate outside that ecosystem are, again, the non-API surfaces: SFTP exports for bulk reads, email-based flows for exception handling, and human-in-the-loop checkpoints before anything writes back. Not the architecture anyone would design from scratch, but functional, auditable, and fully outside the policy&#8217;s scope.</p><div><hr></div><h2>The Bottom Line</h2><p>Agents can already connect to your ERP. Through APIs where they're open, through file drops and inboxes where they're not, and through screen interfaces as a last resort. The connection question is largely solved. What separates successful automation from nice Proof-of-Concepts is the combination of a code environment capable of handling real data volumes and an architecture that keeps humans in the loop at the right points.</p><div><hr></div><p><em>Thoughts, pushback, or things working differently in your environment: hit reply.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[OpenAI & Anthropic's new forward deployed grift]]></title><description><![CDATA[Rent seeking in mid market AI]]></description><link>https://newsletter.cloudsquid.io/p/openai-and-anthropics-new-forward</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/openai-and-anthropics-new-forward</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Wed, 06 May 2026 14:29:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p>Last week at basically the same time Anthropic &amp; OpenAI announced joint ventures with major PE firms.</p><p>Anthropic: ~$1.5B. Blackstone ($300M), Hellman &amp; Friedman ($300M), Goldman Sachs ($150M), Anthropic ($300M), plus Apollo, General Atlantic, Leonard Green, GIC, &amp; Sequoia.</p><p>OpenAI: $10B valuation. $4B from 19 investors anchored by TPG Brookfield, Bain Capital, Advent, Dragoneer, SoftBank, Palantir, Goldman Sachs, Snowflake. </p><p>Both adopt the trendy Palantir forward deployed engineer model. Small technical teams embedded inside portfolio companies to rewire workflows. The combined investor base controls thousands of mid-market companies.</p><h2>Why this is happening</h2><p>The firms involved hold direct equity in the model companies themselves.</p><p>Blackstone holds ~$1B in direct Anthropic equity across multiple rounds. TPG sits in Anthropic&#8217;s cap table <em>and</em> anchors OpenAI&#8217;s DeployCo. Goldman Sachs is in Anthropic&#8217;s Series G, on OpenAI&#8217;s revolving credit facility, &amp; committed $150M to the Anthropic join venture. Dragoneer coled Anthropic&#8217;s Series G &amp; invested in DeployCo.</p><p>The firms benefit at all levels of the transaction but not where they are supposed to:</p><ol><li><p><strong>Direct equity</strong> in the model company: appreciation tied to revenue growth &amp; IPO valuation</p></li><li><p><strong>Equity</strong> in the deployment vehicle: implementation fees and guaranteed returns</p></li><li><p><strong>Control</strong> of the portfolio companies being told to adopt the product</p></li></ol><p>The PE firm mandates adoption at the portco. The portco pays the model company and their own owner. Implementation revenue accrues to the model company. Model company revenue inflates the PE firm&#8217;s direct equity ahead of IPOs both companies are targeting in 2026. Every dollar of portco spend is serving multiple positions on the same balance sheet.</p><p>The position generates returns for the owners but none depend on whether the implementation creates operational value at the portfolio company. It seems pretty early in a new tech hype cycle to already see this level of rent seeking as returns are extracted from positions without a focus on you know&#8230; successfully implementing AI.</p><h2>The old SV playbook</h2><p>Silicon Valley ran a slimmed down version of this for years. Big VCs encouraged portfolio companies to buy each other&#8217;s software inflating ARR ahead of fundraises &amp; IPOs. The practice drew criticism, but the exposure was a lot more limited. The 2026 version is at a much more damaging scale. </p><p>The old VC cross-sell inflated metrics inside a smaller system of mostly consenting participants and had the added value of helping each other as design partners. Branching outside of software companies selling to software companies, there are bigger implications to the mid market economy.</p><h2>17.5% Guarantee</h2><p>OpenAI contractual returns made the nature of this deal even more explicit if it wasn&#8217;t already. DeployCo guarantees PE investors 17.5% annual return for five years. If DeployCo underperforms, OpenAI covers the gap. 17.5% on $4B = up to $700M/year in payout.</p><p>It&#8217;s pretty clearly purchased customer acquisition structured as a financial instrument. The return is contractual and not performance based so it doesn&#8217;t matter whether a single implementation actually creates value for the underlying portfolio.</p><h2>Who pays the bill</h2><p><strong>Mid market Portcos.</strong> The forward deployed engineers arrive to automate without a clear alignment on goals and outcomes. The owner of these initiatives sits one level down from the pushers. When a project doesn&#8217;t have good mutual incentives the outcomes are almost always worse.</p><p><strong>Application layer startups.</strong> Every vertical AI company selling into mid market PE backed companies is now fighting an uphill battle to sell into this space. You can&#8217;t win a competitive evaluation that never happens. The deployment companies and associated circular deals are a moat against the entire application layer of new companies.</p><p><strong>Public market investors at IPO.</strong> The biggest exposure. Both IPOs will be priced on enterprise revenue manufactured through captive distribution. When the PE hold periods end &amp; the mandates fade, what happens to retention? Index funds, retail investors, &amp; pension funds hold that paper.</p><h2>What this means for AI</h2><p>The best AI implementations I've seen start with a specific operational problem and work backward to the implementation. These start with a capital structure and work backward to justify it. The mid market companies powering the economy and writing the checks for AI agent deployments deserve better than being a line item in the AI capital arms race.</p><h2></h2><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Goldman Sachs is building the Accounting AI you can't]]></title><description><![CDATA[What this AI buildout signals for Finance Operations]]></description><link>https://newsletter.cloudsquid.io/p/goldman-sachs-is-building-the-accounting</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/goldman-sachs-is-building-the-accounting</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Wed, 18 Feb 2026 16:08:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Anyone who has spent time in finance operations knows that the work is precise, relentless, and deeply unglamorous. A single booking discrepancy discovered late on a Friday can cascade into hours of manual investigation. Multiply that across hundreds of daily exceptions and you start to understand why large financial institutions have always solved the problem the same way: hire more people.</p><p>Goldman Sachs is now testing whether that equation can be broken. The bank has entered a six-month partnership with Anthropic, embedding the AI company&#8217;s engineers directly inside Goldman to build autonomous agents targeting accounting and compliance workflows. The scope is specific, the investment is real, and the implications extend well beyond one bank.</p><h2>The Specifics of Goldman&#8217;s Bet</h2><p>Goldman&#8217;s CIO Marco Argenti framed these systems as &#8220;digital co-workers,&#8221; a term that obscures the ambition underneath. What Goldman is building are autonomous agents capable of processing documents at volume, applying internal policy logic, flagging exceptions, escalating to humans where needed, and generating audit-ready output.</p><p>The bank chose two initial domains. The first is trade and transaction accounting: the capture, matching, reconciliation, and documentation cycle that runs continuously across every desk. The second is client vetting and onboarding, covering KYC, due diligence, and internal policy compliance. Both domains share the same characteristics that make them attractive for automation: high volume, dense rule sets, and a long tail of exceptions that currently require manual triage.</p><p>The stated goal is not incremental efficiency. Goldman wants to compress these workflows dramatically, absorbing business growth without proportional headcount increases.</p><div><hr></div><h2>From Code to Operations</h2><p>Goldman&#8217;s path to this point is instructive. The bank&#8217;s initial AI deployment was in software engineering, where it rolled out an autonomous coding tool called Devin across its developer teams. That was a conventional application of large language models.</p><p>What caught Goldman&#8217;s attention was that Claude&#8217;s core strength turned out to be reasoning through rule-dense, ambiguous problems, not just generating code. That capability maps directly onto operational finance work.</p><p>The difficulty in accounting and compliance has never been the mechanics. Debits and credits are straightforward. The difficulty is that source systems disagree, data arrives on inconsistent timelines, documentation is partial, internal policies sometimes conflict with each other, and no two exceptions look exactly alike.</p><p>Take a specific scenario. A fixed-income desk executes a block trade settling across three counterparties in two currencies. The trade capture system books the notional in USD. The risk platform converts to EUR using a rate snapshot from 4 p.m. The general ledger applies the prior day&#8217;s closing rate. Reconciliation surfaces the discrepancy. Today, a human analyst traces the rate sources, determines whether the variance reflects a timing difference or an actual booking error, checks the resolution against internal policy, and writes up the finding for audit. One exception, 45 minutes.</p><p>An agent that can pull the trade record, compare rate sources, classify the root cause, and draft a resolution memo citing the relevant policy does not eliminate the need for human oversight. It does turn a 45-minute task into a seconds-long triage for routine cases, freeing analysts to focus on the exceptions that genuinely require judgment.</p><p>Most firms saw AI&#8217;s coding ability and filed it under &#8220;developer tools.&#8221; Goldman saw the underlying reasoning capability and recognized its application to the operational core of the business. That leap is the part most organizations have not yet made.</p><div><hr></div><h2>The Architecture That Matters</h2><p>LlamaIndex recently published work on what they call &#8220;long-horizon document agents,&#8221; and the framing is useful for understanding what Goldman is actually constructing. Document-processing AI has historically operated in two limited modes: batch extraction (load a PDF, pull fields, output to a spreadsheet) and conversational retrieval (ask a question, get an answer, lose the context). Neither mode reflects how operational teams work in practice.</p><p>Operational document work persists across days and weeks. It involves batching, escalation, approval chains, and revision cycles. An effective agent in this environment needs to activate on events (a new filing arrives, a reconciliation breaks), maintain task state across sessions, and present its work through interfaces designed for queue management rather than conversation.</p><p>Functioning AI in finance requires three layers operating together. First, a structured data layer that normalizes inconsistent inputs into a form the agent can reason over. Second, a reasoning layer that handles ambiguity, applies policy logic, and classifies exceptions. Third, a deterministic workflow layer that enforces auditability, manages throughput, and governs human escalation. Goldman appears to be investing across all three layers, which distinguishes this effort from the chatbot experiments that most firms have run so far.</p><div><hr></div><h2>The Mid-Market Problem</h2><p>Goldman can afford to embed an AI company&#8217;s engineering team for half a year and build custom infrastructure from scratch. The question this raises for every other firm is straightforward: how do you get to the same destination without those resources?</p><p>The operational problems are identical regardless of firm size. Invoice matching at a regional distributor involves the same structural challenge as trade reconciliation at a global bank: messy inputs, rule-based processing, exception handling, and documentation requirements. The gap is entirely in implementation capacity.</p><p>Three paths are available. The first is inaction, which is a bet that the competitive landscape will not shift quickly. Goldman&#8217;s investment suggests otherwise. The second is internal development, which for most firms will stall after handling the easy cases because the hard engineering sits in the data normalization and workflow layers, not in the AI model itself. The third is adopting products that have already built the full stack, including the data infrastructure, the reasoning layer, and the workflow orchestration. The challenge with this path is evaluation: knowing whether a vendor has solved the architecture problem or simply wrapped a language model in a user interface.</p><p>The distinguishing features of a production-ready system are a data architecture that handles document variability at scale, workflow interfaces built for review and exception management rather than chat, complete audit trails covering every agent decision, and human-in-the-loop patterns that function under real operational pressure.</p><div><hr></div><h2>Where This Leaves the Profession</h2><p>Goldman is conducting a controlled experiment on how much procedural work in accounting and compliance can be handled by autonomous agents. The outcome will not be binary. Regulatory accountability will continue to require human responsibility. Client relationships will continue to require judgment. Risk ownership will remain with people.</p><p>What is changing is where human effort concentrates. The value is migrating from executing procedural steps to designing the processes agents follow, defining the rules that govern exception handling, reviewing agent output for errors, and defending decisions under regulatory scrutiny.</p><p>That represents a meaningful shift in the skill set the profession rewards. And it raises a secondary question that few institutions are addressing yet: if the entry-level procedural work that has historically trained junior professionals gets absorbed by agents, how does the next generation develop the judgment that the senior roles require?</p><p>Goldman is pressure-testing what can be automated. The rest of the industry needs to think carefully about what comes after.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Three layers of agent operating systems]]></title><description><![CDATA[A coding agent pattern that's about to show up everywhere]]></description><link>https://newsletter.cloudsquid.io/p/the-three-layers-of-a-vertical-ai</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/the-three-layers-of-a-vertical-ai</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Wed, 14 Jan 2026 13:53:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qbBB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The &#8220;coding agent for everything&#8221; thesis is compelling: give an AI a filesystem and a Python interpreter, and it can tackle problems that confound traditional software. The agent reads context from files, writes code to solve problems, and persists state across sessions.</p><p>This works. We&#8217;ve built a finance platform around it. But running it in production revealed what the thesis leaves out: coding agents alone can&#8217;t handle high-volume, regulated work. Two additional layers made it work:</p><p>- Infrastructure to process unstructured data at scale</p><p>- Workflow and review interfaces to run processes repeatably</p><p>Use case-specific agent operating systems can&#8217;t be individual sandboxes like Claude Code. Without this scaffolding, the filesystem pattern fails under real-world constraints.</p><p>---</p><h3>Why We Built This Way</h3><p>We started building accounting automation in 2024. The problem we were solving forced a particular architecture: unstructured documents coming in (PDFs, emails, bank feeds), structured data going out (ERPs, general ledgers). Standard finance operations, but messy in practice.</p><p>The system needed to be composable because the inputs were unpredictable. Every customer had different document formats, different GL schemas, different vendor naming conventions. We couldn&#8217;t hardcode the logic.</p><p>In the last month, we integrated a coding agent with a harness and filesystem. We moved core infrastructure to a project-based filesystem that controls what context the agent can access. The fit was natural. The agent could read ingested documents, write code to transform them, and persist its reasoning. It worked because of the infrastructure we&#8217;d already built.</p><p>That infrastructure turned out to be weight-bearing. Without it, the coding agent couldn&#8217;t operate at scale. With it, the agent became genuinely powerful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qbBB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qbBB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 424w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 848w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 1272w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qbBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png" width="1456" height="843" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:843,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:7123719,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://cloudsquid.substack.com/i/184539984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qbBB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 424w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 848w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 1272w, https://substackcdn.com/image/fetch/$s_!qbBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53d3d62b-307f-4631-8834-438a533986cc_2640x1529.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>---</p><h4>The Three Layers</h4><p><strong>Layer 1: Structured Data Infrastructure</strong></p><p>Here&#8217;s the problem with &#8220;just give the agent a filesystem&#8221;: if you&#8217;re processing 20,000 invoices per month, you can&#8217;t dump them all into a directory structure and expect an agent to work with them efficiently.</p><p>The raw volume breaks the context window. The variety breaks pattern matching. If your agent is reading raw documents just to find basic fields, you&#8217;re burning expensive inference on trivial work.</p><p>You need infrastructure that uses LLMs to enforce structured outputs on unstructured inputs. This is extraction, not reasoning. The LLM doesn&#8217;t decide what the data means, it just forces chaos into schema: turning PDFs, emails, and spreadsheets into normalized, queryable tables.</p><p>This separates extraction from reasoning. The extraction layer handles repetitive work at scale. It produces clean, structured data that the coding agent can query flexibly without drowning in noise.</p><p><strong>What breaks without this layer:</strong> The agent&#8217;s context fills with raw documents. It spends tokens on parsing instead of reasoning. Latency becomes unacceptable. Cost spirals.</p><p>---</p><h4>Layer 2: The Coding Agent</h4><p>The coding agent operates on top of structured data. It&#8217;s good at three things:</p><p><strong>1. Building the environment.</strong></p><p>When a new client onboards, the agent scaffolds their operational setup: Standard Operating Procedures (SOPs), vendor categorization rules, reconciliation logic. It reads existing documentation, asks clarifying questions, writes configuration files, and generates the initial ruleset.</p><p>This is a huge unlock. Traditional enterprise software requires a human consultant to do this setup, which takes months and costs tens of thousands of dollars. The agent does it in an afternoon by working collaboratively with the process expert to encode their knowledge into the file system.</p><p><strong>2. Handling exceptions.</strong></p><p>Structured workflows (more on this in Layer 3) handle the 80% case. The coding agent handles the 20%: unusual document formats, one-off data migrations, edge cases that don&#8217;t fit the standard process. It writes custom scripts, tests them, and integrates data back into the system.</p><p>Without this flexibility, you&#8217;d need to escalate every exception to engineering or reject the work entirely. The agent turns exceptions into solvable problems.</p><p><strong>3. Ad-hoc analysis.</strong></p><p>Once project-specific structured data exists, the agent becomes a natural language interface to it. If you need to create a custom report, export data in a specific format, or investigate an anomaly, the agent writes SQL or Python to pull exactly what you need without waiting for someone to build a feature.</p><p>This is where the &#8220;coding agent as OS&#8221; thesis really shines. You&#8217;re not constrained by the software vendor&#8217;s prebuilt reports and workflows. You have direct, flexible access to your own data.</p><p><strong>What breaks without this layer:</strong> The system becomes brittle. Every edge case requires developer customization. Every new customer need requires a product roadmap discussion. You lose the adaptability that makes AI-native software different.</p><p>---</p><p><strong>Layer 3: Deterministic Workflows</strong></p><p>Here&#8217;s what the &#8220;coding agent for everything&#8221; framing misses: you don&#8217;t want an agent improvising when you&#8217;re booking $2M to a general ledger across thousands of transactions.</p><p>Daily operations like invoice matching, approval routing, and posting to the ERP happen in purpose-built interfaces with event-driven workflows. The process is deterministic, auditable, and includes human checkpoints where they matter.</p><p>This is load-bearing architecture rather than limitation.</p><p>In domains like accounting, the <strong>process by which a result is derived</strong> matters as much as the result. If an auditor asks why a transaction was categorized a certain way, you need to show them a rule, not a sampling of LLM output. You need to prove the logic is consistent, not just that it&#8217;s usually correct.</p><p>A coding agent generating novel logic for each transaction creates variability. Variability breaks auditability. Auditability is non-negotiable in accounting, healthcare, legal, or any other domain where mistakes have regulatory consequences.</p><p>The structured workflows are also where throughput happens. An agent handling 500 invoices per day by writing fresh Python for each one would be slow, expensive, and unpredictable. Event-driven pipelines with clear rules handle the volume efficiently. The agent helped design the flow, but the flow itself runs without the agent&#8217;s ongoing involvement.</p><p><strong>What breaks without this layer:</strong> Cost and latency make high-volume operations impractical. Auditability vanishes. Human reviewers can&#8217;t keep up because every transaction looks different. Trust erodes.</p><p>---</p><h4>The Human as a Tool</h4><p>Most agent hype focuses on removing humans from processes. In consequential domains, this is backwards.</p><p>The right pattern is to treat the human as a tool the agent can invoke. When the reconciliation logic hits a fuzzy vendor match that&#8217;s not in its instructions, the agent doesn&#8217;t crash or guess. It pauses, surfaces the ambiguity, and asks:</p><p>&#8220;This looks like Amazon Web Services, but the address is Dublin and the amount is 15% higher than usual. Should I proceed?&#8221;</p><p>The human confirms. The agent resumes.</p><p>This is different from traditional &#8220;human in the loop&#8221; design, where humans are exception handlers. Here, invoking the human is part of the agent&#8217;s normal operation. The agent routes judgment calls to the human the same way it would query a database or call an API.</p><p>The human provides judgment where judgment matters: validating assumptions, catching anomalies, approving anything consequential. The agent provides speed and consistency where those matter: processing volume, applying rules, surfacing what needs review.</p><p>This isn&#8217;t a fourth layer&#8212;it&#8217;s orthogonal to the architecture. It&#8217;s about control flow. The agent can invoke the human from any layer.</p><p>---</p><h4>Why This Architecture is Hard to Retrofit</h4><p>If this pattern is effective, why isn&#8217;t everyone doing it?</p><p><strong>Legacy software vendors and AI-first companies face architectural lock-in.</strong></p><p>Their AI stack is built for retrieve &#8594; answer &#8594; forget. Moving to stateful work loops and filesystems means rewriting the data model, the API layer, and the UX.</p><p>They also sold customers on &#8220;read-only&#8221; AI. Giving an agent write access to the general ledger requires rethinking the security model and permissions system from scratch.</p><p><strong>Horizontal agent companies face the application layer problem.</strong></p><p>A general-purpose coding agent can learn domain knowledge. You can give it GAAP documentation, explain three-way matching, teach it intercompany transfers. The knowledge can live in the filesystem.</p><p>But knowledge alone doesn&#8217;t create a usable application. The agent needs structured workflows to express that knowledge in a way teams can actually use to complete work. It needs purpose-built interfaces for invoice approval, reconciliation review, and GL posting, not just a chat window where users describe what they want done.</p><p>Domain expertise without workflow infrastructure is just an expensive consultant with no tools.</p><p>---</p><h4>What This Means for Vertical AI</h4><p>The winning AI Application companies won&#8217;t be chatbots over databases or coding agents with filesystem access. They&#8217;ll be operating systems with three weight-bearing layers:</p><p><strong>1. Structured data infrastructure</strong> to handle volume, normalize inputs, and update context.</p><p><strong>2. Coding agents</strong> to provide flexibility, handle exceptions, and adapt to customer-specific needs.</p><p>3. <strong>Deterministic workflows and purpose-built interfaces</strong> to deliver throughput, audit-ability, and consistency where they&#8217;re non-negotiable.</p><p>The coding agent is the architect and analyst. The structured workflows are the assembly line. The human is the supervisor with final authority.</p><p>Get all three right, and you have something that actually works in production.</p><p>Skimp on any one, and you&#8217;re either too rigid (traditional software), too expensive (agents all the way down), or too untrustworthy (LLM output without guardrails).</p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.cloudsquid.io/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Building Agents with MCP: A short report of going to production. ]]></title><description><![CDATA[We shipped an agent to handle financial reconciliation. We found that "Hydra prompts" usually make things worse. The fix wasn't better instructions, but better data surfaces via MCP]]></description><link>https://newsletter.cloudsquid.io/p/building-agents-with-mcp-a-short</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/building-agents-with-mcp-a-short</guid><dc:creator><![CDATA[Filip Rejmus]]></dc:creator><pubDate>Mon, 15 Dec 2025 18:48:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/623edf9e-7e47-4450-8c5e-950429bf9edf_2816x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We work on a finance product. Now I&#8217;m writing this blog for my engineering peers, so I don&#8217;t expect anyone to do a deep dive into the chaotic world of Financial Operations.</p><p>Let me just tell you that working on this for a while made me appreciate that supply chains work at all.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>One of the ugliest recurring problems is reconciling records when there isn&#8217;t a clean join key.</p><p>In the real world:</p><ul><li><p>An invoice references a PO that&#8217;s missing in the bank transfer.</p></li><li><p>Names don&#8217;t match exactly (&#8220;Google&#8221; vs &#8220;Alphabet&#8221;).</p></li><li><p>Dates drift (invoice date vs payment date vs settlement date).</p></li><li><p>Amounts drift (fees, FX, partial payments).</p></li><li><p>Remittance info is missing, truncated, or inconsistent.</p></li><li><p>Mix and match all of the above</p></li></ul><p>A meaningful fraction of cases can&#8217;t be auto-reconciled with a deterministic rule like (amount, date, counterparty) and must be investigated using circumstantial evidence.</p><h3><strong>What ended up working best</strong></h3><p>We tried a couple of approaches to solve this problem. We tried to see if dumping a couple smaller Excel files into Gemini would work (it didn&#8217;t). We also tested if an Assistant could come up with a rule set (it could for the easy cases, but failed on edge cases and didn&#8217;t create any rules that were out of the dataset).</p><p>What worked really well was an Agent with internal MCP access to the underlying data stored in a relational database.</p><p>For anyone not following MCP: it&#8217;s an open standard for connecting an AI client to external tools/data sources in a structured way. It&#8217;s basically a standard port that lets a model discover and call tools rather than scraping everything through natural language.</p><p>A bit surprisingly gpt-5-mini worked as well on this problem as the more powerful models, but that&#8217;s not the main thread of this article.</p><h2><strong>We made the tool surface area tiny on purpose</strong></h2><p>Our data access MCP server only exposes three capabilities:</p><ol><li><p><strong>List available tables</strong></p></li><li><p><strong>Describe a table</strong> (schema/columns; optionally comments)</p></li><li><p><strong>Read-only querying</strong> (with Limits)</p></li></ol><p>It&#8217;s a quite boring design, but by limiting the available paths while exposing dynamic functionality we implicitly tell the model how to do the task.</p><p>In a finance environment, write tools are a trust-killer anyway: what users say they want (&#8220;automate it&#8221;) often diverges from what they accept emotionally (&#8220;show me, let me approve&#8221;).</p><p>Also, from a safety perspective: the MCP ecosystem has already had very real issues with misconfigured servers exposed to the internet and <a href="https://www.bitsight.com/blog/exposed-mcp-servers-reveal-new-ai-vulnerabilities">prompt injection</a>, so you want to assume every tool needs strict access control, auditing, and least privilege.</p><h2><strong>The one caveat: semantics matter a lot</strong></h2><p>This only works if table &amp; column names are semantically meaningful and (ideally) columns/tables have descriptions or comments that match domain language</p><p>If the schema looks like <code>T_014, col_7, x_value </code>(hello SAP), the agent would need to solve internal archaeology first.</p><p>In practice, we found the database surface becomes the context layer. The LLM learns how to think about the task through names and structure. In other words: The schema is the prompt.</p><h2><strong>How the agent actually reconciles</strong></h2><p>The agent&#8217;s behavior looks surprisingly like a decent analyst:</p><ol><li><p><strong>Try perfect matches first: </strong>Match based on exact amount, exact reference / invoice number and strict date windows</p></li><li><p><strong>Then relax constraints: </strong>fuzzy name matches, date tolerance (settlement vs invoice vs posting), grouping/splitting (one payment covering multiple invoices). Start pulling data windows instead of single rows.</p></li><li><p><strong>Accumulate evidence until it can decide: </strong>match, partial match, dispute / needs review, everything is messed up.</p></li></ol><p>If you want a math analogy: a chunk of reconciliation is basically an assignment problem and, in many-to-one or one-to-many cases, it starts to resemble subset-sum / knapsack (&#8220;which set of invoices best explains this payment?&#8221;). Soft constraints like names and dates acting as additional signals.</p><p>The model is not literally running the Hungarian algorithm, but it does perform a kind of iterative constrained search: strict -&gt; relaxed -&gt; stop when confidence is high enough.</p><h2><strong>Results: it handled our recurring hard cases</strong></h2><p>We tested this against ~20 frequent edge cases on production-level data (things that had historically required humans). The agent was able to recognize and resolve all of them in the way our ops team would expect.</p><p>Auditable reasoning trails matter as much as end results in Finance Ops. The Agent is also outputting decision making explanations like</p><ul><li><p>&#8220;Amount matches exactly&#8221;</p></li><li><p>&#8220;Counterparty name differs but resolves via known alias pattern&#8221;</p></li><li><p>&#8220;Payment date aligns with settlement date range&#8221;</p></li><li><p>&#8220;Only one candidate fits all constraints; next best candidate breaks constraint Y&#8221;</p></li></ul><p>It&#8217;s immensely helpful for users to verify results or to understand what has already been tried.</p><p>(We keep humans-in-the-loop when it&#8217;s ambiguous; we&#8217;re not claiming full autonomy in a high-stakes workflow.)</p><h2><strong>Where it fails</strong></h2><p>The main failure mode isn&#8217;t hallucination. Despite the noise in socials, hallucinations haven&#8217;t been an issue in tasks that are operating on underlying data, be it a database or a code repository.</p><p>A missing necessary signal in the data that the Agent can see is an issue though.</p><p>Example: Invoice states amount X. Then after bank fees, X &#8722; 50 arrives but also remittance info is missing and multiple invoices around that value exist.</p><p>If you don&#8217;t have a fees table, or a reliable expected fee model, the agent may overfit to circumstantial fields (date/name proximity) and end up with an imperfect match even though no clean knapsack-like solution exists.</p><p>The obvious fix is add the missing data (fees, remittance enrichment, counterparty identifiers). Most of the time it doesn&#8217;t work like that, simply because your dependency on getting the data in is another person.</p><p>So, usually we have to admit it&#8217;s ambiguous and make it simple for the operator to execute their internal playbook for that case, for example by forwarding the task to another agent that requests info from the customer. But that&#8217;s a topic for another post.</p><h2><strong>Observability: What to log</strong></h2><p>Understanding how the agent decides is useful.</p><p>We collect the user prompt, the sequence of MCP calls (tables described + queries executed) and the intermediate outputs that lead to the final decision</p><p>This is basically a replayable trace of the investigation, which is extremely helpful in debugging and building evals.</p><p>(And for the obvious governance point: log retention + access controls matter a lot here.)</p><h2><strong>Prompting is a weak lever and &#8220;Hydra prompts&#8221; are real</strong></h2><p>This was another surprising lesson.</p><p>Keeping system prompts minimal and generic usually helped. When we tightened prompts to fix a failure, we often got a Hydra effect: edge case A improved, edge cases B, C and D got worse.</p><p>In practice, LLMs overweigh what you tell them right now (prompt salience / instruction dominance). So adding more instructions often causes over-indexing and reduces generality.</p><p>With that in mind, the strongest way we found to improve behavior was improving the semantic quality of the MCP + data layer over working on the prompts.</p><p>This shifted our work from prompt context engineering to data access context engineering.</p><h2><strong>This pattern matches what we see in coding agents</strong></h2><p>The only agentic use case at scale right now is coding (I&#8217;m a skeptic of the actual vs. marketed scale of AI SDRs).</p><p>And what made coding agents work wasn&#8217;t a perfect prompt. It was the ecosystem of searchable codebases, clear file/module names, fast feedback loops (tests, linters) and tools that give agents discoverability (mostly grep).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6l6_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6l6_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 424w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 848w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 1272w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6l6_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png" width="1182" height="264" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:264,&quot;width&quot;:1182,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6l6_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 424w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 848w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 1272w, https://substackcdn.com/image/fetch/$s_!6l6_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f4b390-7b68-4617-91b3-41bcbf5f9481_1182x264.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>That&#8217;s the same story here: make the right context and affordances available, and the agent will often figure out the procedure without you teaching it step-by-step.</p><p>It also matches broader &#8220;AI-in-production&#8221; survey data: teams report heavy use of database access and growing use of MCP/tool calling, plus persistent pain around evals and governance <a href="https://theoryvc.com/ai-in-practice-survey-2025">(Theory Ventures AI in Practice Survey 2025)</a>.</p><h2><strong>Closing takeaways</strong></h2><ol><li><p>Agents can already do surprisingly high-level white-collar investigation work (at least in scoped, tool-grounded settings).</p></li><li><p>Prompting is useful, but it&#8217;s not a reliable primary control knob; it&#8217;s easy to overfit and regress.</p></li><li><p>The biggest leverage is building a high-quality semantic data surface (schema, views, descriptions, access patterns) and restricting tools to what you can govern.</p></li></ol><p>If you&#8217;ve shipped something similar (reconciliation, audit, fraud ops, compliance investigations, etc.), I&#8217;d love to compare notes, especially around eval design and how you handle true ambiguity.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Traditional Finance leaders are skeptical of AI-Native ERPs]]></title><description><![CDATA[TL;DR: The right play involves surrounding legacy systems with AI, not replacing them.]]></description><link>https://newsletter.cloudsquid.io/p/traditional-finance-leaders-are-skeptical</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/traditional-finance-leaders-are-skeptical</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Mon, 15 Dec 2025 09:47:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f23031bb-532f-413d-9013-a080b62d22ca_1280x698.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>TL;DR:</strong></p><ul><li><p>In physical-goods industries, most of the cost isn&#8217;t in running the ERP. It&#8217;s in getting reality into the ERP and reconciling exceptions.</p></li><li><p>AI-native ERPs can work well for digital-first companies, but they rarely touch the real complexity that humans work through in these industries.</p></li><li><p>The opportunity is not replacing SAP, but surrounding it with AI that handles documents, reconciliations, and exceptions.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>AI accounting tools are red hot and raising big money ($400m+ in 2025), but when I ask finance leaders in traditional businesses like manufacturing and consumer goods about the new wave of &#8220;AI-native&#8221; ledgers, the response is skeptical.</p><p>The technology isn&#8217;t bad; the issue is who the tools are built for and what workflows they assume.</p><p>When you look at early customer lists, most of the adoption is in high growth software companies. The founders come from that world, so they design for that world.</p><p>For a SaaS company with clean data, one revenue stream, and API friendly tools, that&#8217;s fine. For a food producer, a distributor, or a manufacturer shipping containers through ports and customs, it is not.</p><h3><strong>Features don&#8217;t match the job</strong></h3><p>Because the tools are built for tech finance teams, they reflect that reality. Instead of logging into an interface to send an invoice reminder, an agent takes care of it and alerts you of the progress in an internal messaging app. It&#8217;s a smooth experience for lightweight tasks.</p><p>In document-heavy traditional finance environments, that&#8217;s not how the work happens.</p><p>Entire teams spend their days on reconciliation and exceptions. They live across SAP, Excel, email, carrier portals, and folders full of PDFs. Their job is not simple approvals in Slack or Teams. They figure out what actually happened across 15 different systems and documents.</p><h3><strong>The contract vs the manifest</strong></h3><p>In physical-goods businesses, transactions are not as simple as contract and invoice. They represent a sequence of events in the real world.</p><p>A single international shipment for a CPG company might involve:</p><ul><li><p>A purchase order &amp; confirmation</p></li><li><p>A packing list &amp; bill of lading</p></li><li><p>Customs documents &amp; export declarations</p></li><li><p>Insurance &amp; inspection certificates</p></li><li><p>Proofs of delivery</p></li><li><p>Supplier invoices, freight invoices, &amp; credit notes<br></p></li></ul><p>Each document is a snapshot in time from a different party. Quantities change, delivery dates slip, and claims appear after the fact. Every company has its own way of stitching this together, so you cannot just ship one &#8220;intake template&#8221; and assume it fits. The variability and custom logic is why Excel is still the dominant tool.</p><p>Trying to hide this complexity inside a single AI-native ERP quickly hits a wall. Finance teams need to control the logic and can&#8217;t trust a black box.</p><h3><strong>The Swivel-Chair API</strong></h3><p>Getting this data into the ERP is still very manual. You can&#8217;t force every customer, customs broker, and vendor to integrate with your system. They send PDFs, CSVs, and emails when they are ready.</p><p>So teams fall back on a swivel chair API, a real human to do the brutal work.</p><p>You have operators with the ERP on one screen and a PDF on the other. They are comparing lines, spotting mismatches in quantity or price, investigating <em>why</em> the mismatch exists, and calling partners to clarify.</p><p>Exceptions transition the job from data entry into investigation.</p><p>In most finance teams, a majority of time is spent on this reconciliation work. The big cost is in stitching together a coherent story from messy, conflicting evidence and finding a resolution.</p><h3><strong>Replacing the core feels wrong</strong></h3><p>The pain is around the system, not inside it. Swapping one set of tables (SAP) for another (Modern ERP) doesn&#8217;t address where the money is actually lost.</p><p>The real costs sit upstream: in document handling, in errors that slip through, and in overpayments that only show up in recovery audits. ERP replacement is a multi-year undertaking, and for these teams, the risk is simply not worth the benefit.</p><h3><strong>What a better approach looks like</strong></h3><p>If the ERP is entrenched and the pain is upstream, the goal should be different: <strong>Do not replace the core.</strong> Build smart systems that surround it and operate with the same context a human uses.</p><p>Keep the legacy ERP as the system of record, but replace the toil around operating it.</p><p>Concretely, you want AI that can ingest messy files (PDFs, Emails, EDI), extract and normalize the data, and match it against your POs and receipts while handling the edge cases.</p><p>AI becomes the reconciliation and compliance layer around the ERP, with infinite time to investigate issues and solve problems humans miss.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How AI Agents can solve complex finance tasks]]></title><description><![CDATA[AI agents are moving finance beyond spreadsheets and manual reconciliations. How a Finance Agent Platform can automate complex workflows and how to get it right.]]></description><link>https://newsletter.cloudsquid.io/p/how-ai-agents-can-solve-complex-finance</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/how-ai-agents-can-solve-complex-finance</guid><dc:creator><![CDATA[Filip Rejmus]]></dc:creator><pubDate>Tue, 11 Nov 2025 12:43:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/1956efaa-1145-4eae-9ba1-01b62af6c39c_1920x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Finance tech hasn&#8217;t really changed in 20 years. Digitising spreadsheets and pushing offline approvals into a browser application is useful but hardly transformational.</p><p>AI agents change that.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Autonomous agents are changing the fundamentals of how software works. They read messy documents, reason across systems, and execute workflows the way an experienced analyst would.</p><p>In finance operations, that is a huge unlock.</p><p>In this post I will:</p><ul><li><p>Outline why finance workflows are such a brutal testbed</p></li><li><p>Show where AI agents are genuinely strong, and where they are fragile</p></li><li><p>Sketch what an actual <strong>Finance Agent Platform</strong> needs to look like</p></li><li><p>Walk through a reconciliation case that a human analyst would dread and an agent can actually handle&#8205;</p></li></ul><p>The target audience here: Finance Managers, VPs of Finance and CFOs who care less about model architectures and more about close quality, cycle times and headcount constraints.&#8205;</p><h2>Why finance workflows are so hard for generic AI Agents and workflow tools</h2><p>A lot of back office AI decks quietly assume the inputs are nice, structured tables. That is not necessarily the reality.</p><p>Typical finance workflows look like this:</p><ul><li><p><strong>Unstructured data</strong></p><ul><li><p>PDFs, scans, emails, screenshots</p></li><li><p>Supplier statements with creative layouts</p></li><li><p>Payment provider exports that change format without warning</p></li></ul></li><li><p><strong>Large, ugly datasets</strong></p><ul><li><p>Payment Provider exports with hundreds of thousands of semi-structured rows</p></li><li><p>Invoice summaries with hundreds of line items</p></li><li><p>GL dumps with years of history</p></li></ul></li><li><p><strong>Non standard documents</strong></p><ul><li><p>Contracts with custom fee ladders and carve outs</p></li><li><p>One off side letters that materially change economics</p></li><li><p>Marketplace payout reports that do not match invoice logic one to one</p></li></ul></li><li><p><strong>Indirect, circumstantial matching</strong></p><ul><li><p>No single ID that ties invoice, PSP transaction and settlement together</p></li><li><p>Need to triangulate by amounts, dates, currencies, users, SKUs</p></li><li><p>Many situations where you can only reach a high confidence hypothesis, not a perfect match</p></li></ul></li><li><p><strong>Multiple data sources involved</strong></p><ul><li><p>ERP, PSP dashboards, bank statements, app store reports, contract repositories, ticketing systems</p></li><li><p>None of them designed to talk to each other natively</p></li></ul></li></ul><p>These are not simple problems. They are multi step, investigative tasks and that is exactly where AI agents start to look interesting.</p><h2>Where AI agents are strong vs where they are fragile</h2><p>At their core, today&#8217;s best AI models are extremely capable <strong>r</strong>easoning engines with limited working memory and no native integrations.</p><p>Understanding that tradeoff is key to designing something useful for finance.&#8205;</p><h3>Strengths</h3><p><strong>1. Handling non standard inputs</strong></p><p>Agents are very good at reading weird stuff:</p><ul><li><p>Invoices that do not match the template</p></li><li><p>Contracts written by lawyers who have never seen your chart of accounts</p></li><li><p>Payment Service Provider reports that mix English labels, local language fees and internal codes</p></li></ul><p>Pattern recognition and layout understanding are generationally better than what legacy OCR or rule based extraction can do.</p><p><strong>2. Deductive reasoning</strong></p><p>Agents can follow multi step instructions such as:</p><p>For each invoice, try to match against PSP exports. If no direct match exists, search by user, by amount within tolerance, and by date proximity. If still unresolved, propose the most likely explanation and a concrete next action.</p><p>This is not simple classification, it is a chain of hypotheses:</p><ul><li><p>&#8220;If X does not match, try Y&#8221;</p></li><li><p>&#8220;If Y and Z conflict, flag an exception rather than forcing a match&#8221;</p></li><li><p>&#8220;If data is missing, recommend which system to query next&#8221;</p></li></ul><p>Pretty much that&#8217;s how an Analyst would think about that.</p><p><strong>3. Understanding finance tasks and procedures</strong></p><p>With the right prompting agents can internalise:</p><ul><li><p>Basic accounting logic (debits, credits, accruals, prepaids)</p></li><li><p>Policy rules (approval thresholds, materiality, risk tiers)</p></li><li><p>Domain specific workflows (PSP reconciliation, vendor statement recs, revenue share calculations)</p></li></ul><p>This makes it realistic to encode your playbooks as agent policies instead of if/else decision trees.</p><h3>Weaknesses</h3><p><strong>1. Limited context for large datasets</strong></p><p>Models have a finite &#8220;context window&#8221;: The amount of data they can actively hold in working memory in one go.</p><p>Finance blows through that quickly:</p><ul><li><p>You can&#8217;t dump a 200k row CSV and a 300 page PDF into the model and say &#8220;reconcile this&#8221;.</p></li><li><p>Naively splitting the data to make it fit loses context and produces inconsistent reasoning.</p><p></p></li></ul><p><strong>2. Instruction overload</strong></p><p>If you ask an agent to:</p><p>Read six documents, understand five policies, reconcile three systems, draft a report, and redesign the chart of accounts</p><p>in a single run, quality collapses.</p><p>Technically, this is instruction overload: the task surface is too broad for the model to maintain a coherent reasoning process. You get shallow, generic answers rather than deep, investigative work.</p><p><strong>3. Being detached from real systems</strong></p><p>Out of the box, agents:</p><ul><li><p>Do not see your Inbox</p></li><li><p>Do not connect to your ERP</p></li><li><p>Do not push entries into your GL</p></li><li><p>Do not post into MS Teams or Slack to collaborate with your team</p></li></ul><p>Without a platform around them, they are powerful but isolated analysts who can only ever say: &#8220;Here is what I would do, if I could touch the systems.&#8221;</p><h2>What an optimal Finance AI Agent platform must look like</h2><p>To make agents actually useful for finance teams, you need more than a model and a chat UI. You need three layers that work together:</p><ol><li><p><strong>Data Capture Layer</strong></p></li><li><p><strong>Operations Layer</strong></p></li><li><p><strong>Reporting and Integration Layer</strong></p></li></ol><p>Think of it as designing an operating model around a very smart analyst: you define how work enters, how they process it step by step, and how the outcomes flow back into your systems and reports.</p><h3>1) Data Capture Layer: giving agents structured eyes</h3><p>The job of this layer is to normalise messy reality into something agents can query and reason over.</p><p><strong>Capture and extract</strong></p><p>Agents handle the intake of:</p><ul><li><p>Invoices</p></li><li><p>Purchase orders</p></li><li><p>Contracts and side letters</p></li><li><p>Bank statements</p></li><li><p>PSP exports and app store reports</p></li><li><p>Vendor statements</p></li></ul><p>They:</p><ul><li><p>Read documents in whatever format they arrive</p></li><li><p>Extract key fields and line items</p></li><li><p>Link them to entities such as suppliers, customers, SKUs, accounts, cost centers</p></li></ul><p><strong>Routing and classification</strong></p><p>Routing agents then:</p><ul><li><p>Decide where each document or record should go</p></li><li><p>Tag them by workflow (payables, receivables, revenue share, disputes, etc.)</p></li><li><p>Trigger the right operational agents in the next layer</p></li></ul><p>This layer is about <strong>data fidelity</strong>. If you do not get this right, everything downstream is built on sand.</p><h3>2) Operations Layer: where actual finance work happens</h3><p>This is where the platform moves to an agent that actually does finance tasks.</p><p><strong>Matching and reconciliation</strong></p><p>Agents here perform tasks such as:</p><ul><li><p>Matching invoices to POs, GRNs and contracts</p></li><li><p>Reconciling PSP settlement data with your invoices and your bank statements</p></li><li><p>Checking whether refunds recorded in your system were actually processed at the PSP</p></li><li><p>Surfacing missing documents or unexplained balances</p></li></ul><p>They operate against the structured data produced by the capture layer.</p><p><strong>Workflow and conditional logic</strong></p><p>These agents also orchestrate next steps:</p><ul><li><p>Apply conditional logic such as:</p><ul><li><p>&#8220;If all checks pass and amount &lt; 10k, move to auto approval&#8221;</p></li><li><p>&#8220;If contract and invoice disagree by more than 3 percent, route to finance review&#8221;</p></li><li><p>&#8220;If refund mismatches are detected, create a ticket for payments ops and attach evidence&#8221;</p></li></ul></li><li><p>Collect additional evidence autonomously:</p><ul><li><p>Fetching additional exports for specific dates</p></li><li><p>Pulling fee schedules from contracts</p></li><li><p>Checking historical patterns for similar exceptions</p></li></ul></li></ul><p>The important property:</p><p>Agents take instructions and procedures and interact with the Data Capture Layer autonomously, exploring deeper where their reasoning says &#8220;this does not add up&#8221;.</p><h3>3) Reporting and Integration Layer: closing the loop</h3><p>Once work is done, results must leave the Agent world and enter the finance world.</p><p>That means:</p><ul><li><p><strong>ERP and ledger pushes</strong></p><ul><li><p>Posting suggested journal entries</p></li><li><p>Updating invoice and payment statuses</p></li><li><p>Tagging disputes and credits</p></li></ul></li><li><p><strong>Reports and spreadsheets</strong></p><ul><li><p>Generating reconciliation reports that a controller can review and sign off</p></li><li><p>Exporting exception lists to Excel or Google Sheets when needed</p></li><li><p>Producing management views for close and audit</p></li></ul></li><li><p><strong>Collaboration hooks</strong></p><ul><li><p>Summaries and links posted into MS Teams, Slack or email</p></li><li><p>Human in the loop approvals where required by policy</p></li></ul></li></ul><h2>Case study: reconciliation that a human analyst hates and an agent can handle</h2><p>Consider a very typical but painful situation.</p><p>You run a consumer app. Revenue flows through multiple payment service providers (PSPs). For a given period, you want confidence that:</p><ul><li><p>Every invoice is backed by a real transaction</p></li><li><p>Fees match the contract</p></li><li><p>Refunds are real and reflected correctly</p></li></ul><p>On the table:</p><ul><li><p>An invoice summary with hundreds of line items</p></li><li><p>PSP exports with thousands of rows across multiple days</p></li><li><p>Several contracts with different fee structures and payout timings</p></li></ul><p>A human analyst will:</p><ul><li><p>Open five systems</p></li><li><p>Fight with CSV filters</p></li><li><p>Keep a mental model of amounts, users and dates in their head</p></li><li><p>Spend hours on edge cases that do not quite match</p></li></ul><p>Here is how an agent inside the platform would tackle it.&#8205;</p><h3>Step 1: Build a coherent picture</h3><p>The agent:</p><ul><li><p>Pulls the invoice summary and normalises the line items</p></li><li><p>Loads the relevant PSP exports for the period plus a window around it</p></li><li><p>Parses the contracts and derives fee rules and expected net payouts</p></li><li><p>Aligns currencies, timestamps and customer or order identifiers</p></li></ul><p>Now it has a structured graph to reason over.</p><h3>Step 2: Attempt deterministic matching</h3><p>For each invoice line, the agent tries the obvious matches:</p><ul><li><p>Same order id in the PSP export</p></li><li><p>Same amount, same currency, within the expected date window</p></li><li><p>Same user or account id where available</p></li></ul><p>Where this works, it confirms:</p><ul><li><p>Gross amount</p></li><li><p>Fees according to contract vs actual fees</p></li><li><p>Settlement timing vs expectations</p></li></ul><h3>Step 3: Investigate exceptions with deeper reasoning</h3><p>The interesting part is what happens when matching fails or produces contradictions. Examples of insights the agent can surface:</p><ul><li><p><em>Missing PSP transaction</em></p><ul><li><p>&#8220;Invoice A for user 0144 is for EUR 7.99 and is expected to be processed by Adyen, but there is no corresponding Adyen transaction. There is a Stripe transaction for EUR 7.99 that does not reference our app order id. This suggests a routing or mapping issue between our order system and PSP configuration.&#8221;</p></li></ul></li><li><p><em>Refund mismatch</em></p><ul><li><p>&#8220;Invoice B is marked as refunded in our system, but the Adyen export only shows a captured payment of EUR 3.56 with no refund record. Amounts match, but the refund flow is missing. Recommended follow up: check Adyen refund transactions and settlement batches for this transaction id, and if no refund exists, escalate to payments ops to reconcile or issue the refund.&#8221;</p></li></ul></li><li><p><em>Invoice vs app store status conflict</em></p><ul><li><p>&#8220;Invoice C is marked as refunded in the ledger, but the corresponding App Store transaction is still captured. The invoice total matches the App Store gross amount and the PSP fee matches the contract. Recommended action: verify whether a refund was actually initiated at the store. If not, either process the refund or update the invoice status to &#8216;paid&#8217; to reflect reality.&#8221;</p></li></ul></li></ul><p>These are structured hypotheses about what went wrong and what to do next.</p><h3>Step 4: Produce auditor friendly output</h3><p>Finally, the agent produces:</p><ul><li><p>A reconciliation report:</p><ul><li><p>Matched items, mismatches, missing transactions, suspected mapping issues</p></li><li><p>For each exception, a suggested explanation and a concrete next step</p></li></ul></li><li><p>System updates:</p><ul><li><p>Suggested journal entries, status updates for invoices, and tagged exceptions</p></li></ul></li></ul><p>A finance manager can review, spot check, and sign off.</p><p>The delta vs today is not that the task suddenly requires zero effort. It is that the bulk of the pattern recognition, cross referencing and explanation drafting is now done by an always on, perfectly consistent analyst.&#8205;</p><h2>Why this is a meaningful tech unlock for finance leaders&#8205;</h2><p>From a CFO or VP Finance perspective, a Finance Agent Platform is about fundamentally changing the constraints of your operating model.</p><p>&#8205;<strong>1. Complexity no longer scales linearly with headcount</strong></p><p>Today, adding new geographies, PSPs or product lines often means more spreadsheets and more analysts.<br>Agents let you grow complexity without a one to one growth in manual reconciliation effort.</p><p><strong>2. Quality becomes systematic</strong></p><p>Right now, many reconciliations and investigations depend on a few people who &#8220;know how things really work&#8221;.<br>Agents, if designed correctly, encode that reasoning into procedures that are:</p><ul><li><p>Repeatable</p></li><li><p>Inspectable</p></li><li><p>Auditable</p></li></ul><p><strong>3. You get a live view of risk</strong></p><p>Tight integration into your systems means agents can run continuously:</p><ul><li><p>Surfacing mismatches before month end</p></li><li><p>Flagging fee leakage against contracts in near real time</p></li><li><p>Highlighting process failures that would otherwise only appear in an audit</p></li></ul><p><strong>4. Human expertise is used where it matters</strong></p><p>You still need humans:</p><ul><li><p>To define policies and materiality thresholds</p></li><li><p>To handle exceptions with commercial or legal nuance</p></li><li><p>To design controls and own the results</p></li></ul><p>But instead of going through data work your team is reviewing agent results and focusing on judgment calls.&#8205;</p><h2>Where do you start?&#8205;</h2><p>If you are a finance leader looking at this, the path is not &#8220;replace the team with agents&#8221;. The path is:</p><ol><li><p>Pick <strong>one painful, investigative workflow</strong>. PSP reconciliation, vendor statement recs or refund audits are perfect candidates.</p></li><li><p>Map the data sources, the playbook your best analyst already follows, and the failure modes.</p></li><li><p>Deploy agents in the three layer model:</p><ul><li><p>Capture and normalise all inputs</p></li><li><p>Encode the investigative steps in an operations agent</p></li><li><p>Integrate outputs directly into your ERP, reports and collaboration tools</p></li></ul></li></ol><p>The tech is now good enough that this is not speculative. What matters is platform design: respecting where AI is strong, compensating for where it is weak, and integrating it deeply into your finance stack.</p><p>The finance teams that get this right will close faster, with fewer surprises, while operating more complex businesses than their peers can support.</p><p>That is the real unlock.</p><p><em>This blog is also on <a href="https://www.cloudsquid.io/blog/how-ai-agents-can-solve-complex-finance-tasks">our website</a>.</em></p><p>&#8205;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[LLMs solving problems OCR+NLP couldn't]]></title><description><![CDATA[The stack that for decades provided document understanding is now losing against Generative AI. Here are some patterns that these models were struggling with but now are solved by GPT-5 and friends.]]></description><link>https://newsletter.cloudsquid.io/p/ocr-is-legacy-tech</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/ocr-is-legacy-tech</guid><dc:creator><![CDATA[Filip Rejmus]]></dc:creator><pubDate>Wed, 27 Aug 2025 06:00:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The first idea resembling something like the idea of OCR got developed in 1870 as a reading machine for the blind - the <a href="https://en.wikipedia.org/wiki/Optophone">Optophone</a>.  This was the first step to solve a problem that sounds pretty simple: How do we get writing on paper inside a computer? </p><p>150 years of research, engineering breakthroughs and hundreds of IDP products later we were finally able to scan a receipt and have the fields be filled out - if it looked nice and friendly enough to the OCR model. Heureka.</p><p>Unfortunately for Tesseract, Abbyy and co. they suffer from the complication that documents are written by humans. And humans love to do things like:</p><ul><li><p>Stamp over the most critical data because it feels like the right spot</p></li><li><p>Organize data in tables with four nested of levels of groupings</p></li><li><p>Disagree on standards of data, thus abandoning any approach of standardization and simply sending their very own format around</p></li><li><p>Add handwritten comments in their own language</p></li><li><p>Create documents that need at least a college degree in their field to correctly understand.</p></li></ul><p>This meant OCR models were basically just helpers for data scientists, handling cleanups, routings, and post-validations to get something only vaguely close to real automation at work.</p><h2>Multimodal LLMs enter the scene</h2><p>With the launch of Multimodal LLMs, most prominently Gemini-Flash-2.0, many AI fields with decades long track records of active research became obsolete. Image Classification? Solved. <a href="https://arxiv.org/abs/2104.06039">Answering questions over images, text and tables?</a> Auf Wiedersehen. And OCR? Exactly.</p><p>What gives LLMs the power to declare victory in dozens of areas that were previously considered their own domain comes down to two characteristics of the Transformer architecture and its training:</p><ol><li><p>The model&#8217;s architecture allows it to have global context of everything that is in the input. I.e. it can for example understand that a table row belongs to headers printed 5 pages prior.</p></li><li><p>The model is trained on the entire internet and can understand concepts like stamps, order forms with handwriting over them and that invoices can have as many layouts as there&#8217;s people on this planet.</p></li></ol><p>With that intuition in mind it&#8217;s not surprising why they are able to easily solve problems that OCRs gave up on. Instead of just transforming pixel patterns into words they can look at the whole document at once and then even reach for their corpus of all human knowledge to make sense of it on a conceptual level. Not only that, they can even return information about an embedded Image with barely any text at all! Think of a technical drawing for example. You will be able to pull data from that where OCR would give you a transcript of the labels if you&#8217;re lucky.</p><h2>Where OCRs got an ace up their sleeve - for now</h2><p>Remember the part where I said that Language Models are awesome with their huge training set and global context?</p><p>Makes them a bit expensive unfortunately. A PDF with a few hundred pages and embedded images will cost you a couple Dollars, depending on the model. In document processing we also suffer from the relatively small output context windows. 64 thousand tokens may be enough to write a small codebase in Cursor but will blow up when trying to extract just a couple dozen pages of tables from docs. There&#8217;s also something reassuring about clear, explainable rules over the black-box nature of LLMs.</p><p></p><p>With all that said, I still believe that processing documents will be a solved problem in a couple years time. It feels like we&#8217;re 95% there. Models will get cheaper and more efficient with longer context windows. The focus will be on automating away the flow from document to System of Record, and AI Agents are already starting to being helpful here too. </p><p><em>My company <a href="http://cloudsquid.io">cloudsquid</a> works on this problem. If you&#8217;re interested in working with us or simply wanna chat about this post contact me through our website, filip@cloudsquid.io or on <a href="https://www.linkedin.com/in/filiprejmus/">LinkedIn</a>.</em></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[An honest document AI benchmark]]></title><description><![CDATA[What running a benchmark taught us about benchmarking document ai]]></description><link>https://newsletter.cloudsquid.io/p/an-honest-document-ai-benchmark</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/an-honest-document-ai-benchmark</guid><dc:creator><![CDATA[Filip Rejmus]]></dc:creator><pubDate>Fri, 21 Mar 2025 15:38:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dqv7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We did it. The pressure from the market became too immense. We didn't want to do it, but enough was enough. We gave in, went into the lab, and created a document AI benchmark.</p><p>Yes, that's right, another in-depth technical blog showcasing an array of bar charts with cloudsquid predictably ranked as the number one vendor in the space with the "most accurate AI available ever developed."</p><p>"How is that possible?" you may ask. "How are there 1000 document AI vendors who all claim to have the most accurate AI on the planet?" "People wouldn't just go on the internet and lie, would they?"</p><h2><strong>Our benchmark approach</strong></h2><p>Alright, let's drop the pretense. We ran a benchmark, and we did pretty well. Here's the thing: we're not reinventing the wheel with something brand new in AI. We offer different AI pipelines optimized for different use cases, and we wanted to objectively evaluate how they perform on a challenging open-source document dataset.</p><h3><strong>Methodology</strong></h3><p>We used the Contract Understanding Atticus Dataset (CUAD), a collection of 500 legal contracts with over 13,000 annotations across 41 different legal provisions. For our evaluation:</p><ul><li><p>We tested our two main document AI pipelines (Advanced and Flash)</p></li><li><p>Each document was processed through our unmodified production pipelines</p></li><li><p>We extracted the same data points defined in the CUAD ground truth</p></li><li><p>We used identical prompts across all models with zero customization for this dataset</p></li><li><p>Accuracy was measured as the percentage of correctly extracted data points compared to the ground truth</p></li></ul><h2><strong>Findings</strong></h2><p>Several interesting patterns emerged from our evaluation:</p><ul><li><p><strong>OCR remains critical</strong> - Even in a legal contract setting with primarily text content, adding an OCR step to the pipeline instead of relying solely on an LLM-based approach improved accuracy by approximately 10%.<br></p></li><li><p><strong>Our Advanced pipeline achieved 98.5%<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> extraction accuracy</strong> across the 500 documents and thousands of data points.<br></p></li><li><p><strong>Gemini 2.0 Flash</strong>, despite the substantial OCR-killing hype, still lags in standalone accuracy. It remains a solid option for simpler use cases, but the performance gap is noticeable in complex document understanding tasks.</p></li></ul><h2><strong>Document markdown performance is a commodity</strong></h2><p>Let's get to the heart of the matter. Cloudsquid isn't doing anything particularly novel on the model and OCR side. Our pipeline is straightforward: best-in-class OCR + best-in-class model. We ran this benchmark with zero additional optimizations tuned for this dataset.</p><p>This leads to several observations about the current state of document AI:</p><ol><li><p><strong>Marginal performance differences</strong> - Different approaches in AI pipeline setup are currently separated by tiny increments in performance. While these incremental gains might still matter in certain contexts, they're rapidly eroding as foundation models improve.</p></li><li><p><strong>Technical moat illusion</strong> - Startups that emphasize fine-tuning, preprocessing, training their own OCR, or any of another half dozen esoteric techniques you&#8217;ve seen discussed in hacker news threads are often engaged in marketing exercises designed to make document AI sound more complicated than it is. They want to create an illusion of a technical moat so that developers won&#8217;t try to build it themselves.</p></li><li><p><strong>Benchmark skepticism</strong> - In our experience, customers don't particularly trust accuracy studies. They generally assume everyone is using similar technology and base their purchasing decisions on other factors like price, integration capabilities, user experience, and scalability.</p></li></ol><h2><strong>Where the Real Innovation Lies</strong></h2><p>What's really interesting about the CUAD benchmark is the diverse and numerous data extractions required and the quality of the prompts used to test against the ground truth. It provides an efficient way to evaluate models.</p><p>Achieving nearly 99% accuracy with zero tweaks to our pipeline or prompt adjustments feels impressive. However, the more compelling area for innovation lies in building systems around the model to:</p><ol><li><p>Create high-quality prompts tuned to the document</p></li><li><p>Iterate and evaluate results quickly</p></li><li><p>Adapt to different document types automatically</p></li><li><p>Tightly integrate outputs into workflows and business logic</p></li></ol><p>The majority of inaccuracies in data extraction still stem from shortcomings at the prompting and evaluation level rather than issues in converting documents into machine-readable formats. This is where engineering efforts should be focused, not on marginal OCR improvements or custom model training. Creating intelligent systems that optimize the interaction between documents, models, and actual enterprise workflows and their corresponding systems.</p><h2><strong>Conclusion</strong></h2><p>While we could have produced yet another "we're #1" benchmark post, we believe greater value comes from transparency about where the real challenges and opportunities in document AI truly lie. The performance ceiling of current technologies is very high, but consistent real-world implementation remains challenging and limited for LLM based vendors.</p><p>For the pragmatic and experienced evaluator, the question shouldn&#8217;t be "which vendor has the best accuracy on paper?" but rather "which solution can consistently deliver high accuracy across my specific document types with minimal configuration overhead?"</p><p>We're betting that the future belongs to systems that can intelligently adapt to document variations and integrate with business workflows and logic rather than those claiming a few extra fractions of percentage points on controlled benchmarks.</p><p>If you&#8217;re interested in how we ran this, happy to share the specific points. We can also walk you through exactly how we set up our AI pipelines in the product, it&#8217;s no secret sauce.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>More exact extraction performance</p><p><strong>OCR + LLM Pipeline</strong><br><br>Overall Precision: 0.985, Overall Recall: 0.946<br>Overall F1 Score: 0.964<br>Overall similarity score: 0.919</p><p><strong>Gemini Flash Pipeline</strong><br><br>Overall Precision: 0.986, Overall Recall: 0.874<br>Overall F1 Score: 0.923<br>Overall similarity score: 0.90</p></div></div>]]></content:encoded></item><item><title><![CDATA[A Prompting Guide for Structured Outputs / JSON mode]]></title><description><![CDATA[Why Structured Outputs for Data Extraction?]]></description><link>https://newsletter.cloudsquid.io/p/a-prompting-guide-for-structured</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/a-prompting-guide-for-structured</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Fri, 14 Mar 2025 11:53:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F771c9a89-ac0e-462a-afa5-1709dfd1a327_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1><strong>Why Structured Outputs for Data Extraction?</strong></h1><p>When working with language models, receiving data in a well-defined format (like JSON) ensures that downstream systems can process the results automatically. Instead of dealing with paragraphs of text, you get a fixed set of fields that map directly to your use case. This approach:</p><ul><li><p>Helps integrate the model&#8217;s responses into business workflows without cleanup</p></li><li><p>Prepares and transforms the data for direct use in an application</p></li><li><p>Reduces ambiguity and hallucinations in output</p></li><li><p>Makes validation easier</p></li></ul><h1>Who This Guide is For</h1><p>Anyone who needs to reliably extract specific information from text using an LLM and wants to receive that information in a structured format. Most likely you are a technical person setting up a data extraction pipeline from scratch, or a user of a platform like Cloudsquid that abstracts the code-based steps to allow easy batch data processing or pipeline setup.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Examples include:</p><ul><li><p>Retrieving critical legal terms from customer contracts</p></li><li><p>Pulling product details from technical manuals</p></li><li><p>Getting line items from an invoice or purchase order</p></li><li><p>Processing ID documents or other information for KYC checks</p></li></ul><p>This guide is not intended specifically for cloudsquid customers but as a general-purpose guide for structured data extraction prompting. Many online guides focus primarily on technical implementation and schema structure rather than deeply exploring how to write comprehensive, performant prompts. For cloudsquid-specific guidance, see our prompting guide in our docs page.</p><h1>Theoretical Considerations</h1><h3>How to Think About Prompts</h3><p>Think of prompts as instructions you'd give to someone unfamiliar with the task. Ask yourself: "Could someone perform this extraction accurately using only these instructions?" Clearly specify:</p><ul><li><p><strong>What</strong> you want (e.g., "Extract the price for installation labor.")</p></li><li><p><strong>How</strong> you want it formatted (e.g., "Output as a decimal value.")</p></li><li><p><strong>Any constraints</strong> (e.g., "If multiple values appear, return null.")</p></li></ul><p>Be explicit&#8212;vagueness often results in hallucinated outputs. Providing constraints and fallbacks limits this issue.</p><h3>What LLMs Are Not Good At Doing</h3><ul><li><p><strong>Complex Math &amp; Logic</strong>: If your task requires calculations, averages, or complicated logic, LLMs might make mistakes. It&#8217;s better to have the LLM extract relevant components of data, then perform complex calculations externally or with specialized tools. One thing to note, reasoning models are much better at math but you will most likely be using a more basic model with structured outputs or JSON mode for data extraction tasks.</p></li><li><p><strong>Resolving Contradictory Data</strong>: Clearly instruct how to handle contradictory information to avoid random guesses.</p></li></ul><h1>Setting Up a System Prompt</h1><h3>Purpose of a System Prompt</h3><p>A system prompt sets foundational rules for data extraction, independent of individual prompts.</p><h3>Example System Prompt (Legal context example)</h3><p>"You are a legal clerk assisting in data extraction. Always follow these rules:</p><ol><li><p>If extracting exact legal terms, retain original language and wording.</p></li><li><p>Only extract numeric values with an exact document match.</p></li><li><p>Return null or an empty string if conflicting values exist."</p></li></ol><div><hr></div><h1><strong>Individual Prompts</strong></h1><h3><strong>How to Describe a Field You Want to Extract</strong></h3><ul><li><p><strong>Name</strong>: Specify the exact field name (e.g., "title" vs. "product_title").</p></li><li><p><strong>Prompt: </strong>Aim for precision with added details and context to help the model fully understand the task. For example you could include examples, locations in the document, or words that are descriptive of the task like &#8220;Gross Salary&#8221; vs. &#8220;Salary&#8221;</p></li><li><p><strong>Format or Data Type</strong>: If it&#8217;s a date, say something like "date": "YYYY-MM-DD". For numbers, specify if you need integers or floats.</p></li><li><p><strong>Fallbacks</strong>: If data for that field doesn&#8217;t exist, specify what to do. For example, &#8220;If no date is found, return null.&#8221;</p></li></ul><h3><strong>Writing Prompts, Bad vs. Good</strong></h3><h3><strong>Bad Prompt</strong></h3><p>Extract all the details about products that you can find from the quote</p><p><strong>Why it&#8217;s bad</strong>: It&#8217;s too vague, doesn&#8217;t specify structure, doesn&#8217;t explain the required fields, and doesn&#8217;t handle missing data.</p><h3><strong>Good Prompt (including schema for structured output mode)</strong></h3><p>Extract all product line items from the provided quote. Each product line item includes:</p><p>1. Product Description: A textual description of the product.</p><p>2. Product SKU: The unique identifier or stock-keeping unit (SKU) for the product.</p><p>3. Quantity: The number of units of the product (as a number).</p><p>4. Price Per Item: The price for one unit of the product (as a decimal).</p><p>Adhere strictly to the following schema:</p><p>{</p><p>  "type": "object",</p><p>  "properties": {</p><p>    "product_line_items": {</p><p>      "type": "array",</p><p>      "items": {</p><p>        "type": "object",</p><p>        "properties": {</p><p>          "product_description": { "type": "string" },</p><p>          "product_sku": { "type": "string" },</p><p>          "quantity": { "type": "number" },</p><p>          "price_per_item": { "type": "number" }</p><p>        },</p><p>        "required": [</p><p>          "product_description",</p><p>          "product_sku",</p><p>          "quantity",</p><p>          "price_per_item"</p><p>        ]</p><p>      }</p><p>    }</p><p>  },</p><p>  "required": ["product_line_items"]</p><p>}</p><p><strong>Note: </strong>The above example is the full input including the schema which needs to be passed to the model directly with the prompt, the model then ensures the output conforms to the schema. This might vary depending on the foundational model, this example is specific to OpenAI.</p><h3><strong>Accepted Ranges and Validations</strong></h3><p>In some cases, you may want to limit or validate numeric fields. For example:</p><ul><li><p><strong>Price Range</strong>: &#8220;If the price is below 0 or above 999.99, return null for price.&#8221;</p></li><li><p><strong>Rating</strong>: &#8220;Ratings should be between 1 and 5. If the extracted rating is out of range, set it to 5 if it&#8217;s above 5, or to 1 if it&#8217;s below 1.&#8221;</p></li></ul><p>By including such rules, you decrease the chance of invalid data.</p><h3><strong>Default Values for Extractions</strong></h3><p>Real-world data can be messy, and you may not always find a particular field. Provide defaults:</p><ul><li><p><strong>Strings</strong>: Use an empty string ("").</p></li><li><p><strong>Numbers</strong>: Use 0 or null, depending on your system&#8217;s preference.</p></li><li><p><strong>Arrays</strong>: Use an empty array ([]).</p></li></ul><p>Example instruction:</p><p>If you cannot find the manufacturer in the text, set "manufacturer": "".</p><h3><strong>Extracting Lists or Arrays</strong></h3><p>For fields where multiple entries might appear, instruct the model to provide a list:</p><p>"tags": ["tag1", "tag2", ...]</p><p>If there&#8217;s a maximum:</p><p>Include only the first 5 tags you find. If none are found, return an empty array.</p><p>This helps keep the output standardized.</p><h3><strong>Using Categories to Force a Specific Output</strong></h3><p>Sometimes data must fit one of a few predefined options (e.g., "Low", "Medium", or "High" for a risk rating). The LLM might invent new categories like "Very High". To avoid this:</p><ul><li><p><strong>Explicitly restrict</strong> it: &#8220;Possible values for risk_level are only: Low, Medium, High. If no relevant data is found, set risk_level to Low.&#8221;</p></li><li><p><strong>Validate</strong> on your side too. If the LLM tries returning something else, you can revert to your default or handle the error.</p></li></ul><h3><strong>Summarization &amp; Generation Tasks</strong></h3><p>While structured extraction is your main goal, you might also want short summaries or creative text under fixed keys:</p><p>"summary": "A single sentence summary of the text."</p><p>"headline": "A catchy 5-10 word headline describing the document."</p><p>Be clear with length limits:</p><p>&#8220;Summaries should be under 30 words. Truncate if longer.&#8221;</p><div><hr></div><h1><strong>Additional Tips &amp; Topics</strong></h1><h3><strong>Nested Objects vs. Flat Data</strong></h3><p>If your data is hierarchical (e.g., an address with street, city, zip), sometimes it&#8217;s clearer to keep those fields nested:</p><p>"location": {</p><p>"street": "123 Main St.",</p><p>"city": "Example City",</p><p>"zip": "12345"</p><p>}</p><p>Otherwise, a flat structure may be easier for quick lookups:</p><p>"street": "123 Main St.",</p><p>"city": "Example City",</p><p>"zip": "12345"</p><p>Choose based on how your system will use the data.</p><h3><strong>Testing &amp; Iterating Prompts</strong></h3><ul><li><p>Test with examples that span a range of real-world data for each use case.</p></li><li><p>Check if the model&#8217;s output adheres to the constraints (e.g., does it really truncate the description? Does it respect max array sizes?).</p></li><li><p>Adjust your prompt until you consistently get the structure you want.</p></li></ul><h3><strong>Handling Large Inputs</strong></h3><p>If your input text is too long (e.g., multiple pages of instructions or a large PDF), consider chunking the text and running multiple extractions. You can then merge or reconcile the results afterward.</p><div><hr></div><h1><strong>Conclusion</strong></h1><h3><strong>Key Takeaways</strong></h3><ol><li><p><strong>Be Explicit</strong>: LLMs rely on clear, direct instructions to produce consistent JSON or other structured outputs.</p></li><li><p><strong>Provide Fallbacks</strong>: Ensure you specify default or null values for missing data.</p></li><li><p><strong>Validate</strong>: Even with a good prompt, always validate the output to handle unexpected results against a large enough sample size of data. Consider using a tool to run evals if you need to test on an ongoing basis.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.cloudsquid.io/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading cloudsquid blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[cloudsquid raises $1m pre-seed]]></title><description><![CDATA[The death of the human API]]></description><link>https://newsletter.cloudsquid.io/p/cloudsquid-raises-1m-pre-seed</link><guid isPermaLink="false">https://newsletter.cloudsquid.io/p/cloudsquid-raises-1m-pre-seed</guid><dc:creator><![CDATA[Mike McCarthy]]></dc:creator><pubDate>Mon, 04 Nov 2024 10:15:01 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3402d4f9-4bd4-4445-b4e0-6f4b88b6e61b_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Internally, businesses communicate through applications and integrated APIs. Externally, they rely on a flood of unstructured text and documents. The result is expensive skilled workers spending most of their day on repetitive, manual data entry tasks.</p><h2><strong>Receive PDF &#8594; extract data &#8594; validate outputs &#8594; manually input to systems fields.</strong></h2><p>This inefficient workflow, <strong>using humans as APIs</strong>, spans industries, job roles, and regions. In the U.S. alone, the white-collar labor market&#8212;worth $9.1 trillion&#8212;is bogged down by low-value, data-heavy tasks. It&#8217;s more than just wasted time; it&#8217;s lost potential.</p><h2><strong>Legacy AI solutions have limitations</strong></h2><p>Existing OCR based document AI solutions are built to handle simple, repetitive, and transactional tasks. They require extensive data labelling and training, and can process text or documents that follow rigid, predictable formats. They don&#8217;t understand the context of the document; they categorized. A small deviation&#8212;an extra field, a misaligned table&#8212;can derail the entire process. They also perform poorly on complex, mixed-content documents that combine text, tables, and images.</p><p>These tools are still useful for automating specific back-office workflows, but are too rigid to handle real world variability like humans can.</p><h2><strong>LLMs change the data extraction and transformation Paradigm</strong></h2><p>Unlike their OCR predecessors, LLMs don&#8217;t just categorize unstructured data&#8212;they understand it. They excel in complex environments, capable of handling diverse content like documents that mix text, images, and tables.&nbsp;</p><p>Prompting combined with rule-based guardrails surpasses human accuracy, even in scenarios where variability is high. You no longer have to rely on rigid templates or constant retraining&#8212;LLMs adapt to the document, not the other way around.</p><h2><strong>Going past demo and into production</strong></h2><p>The promise of LLMs to solve unstructured data challenges is clear. We spoke with many product teams rushing to build Generative AI functionalities for data extraction in-house. From vertical software startups to large enterprises, they all struggled with critical last-mile issues around accuracy and reliability, preventing them from moving to production.</p><p>Creating an AI pipeline from scratch to handle complex documents at scale, designing interfaces to refine and test prompts, and implementing features like observability to monitor performance is an impractical challenge. Even a basic version would take a dedicated engineering team months to build, so they don&#8217;t.</p><h2>Why we&#8217;re building cloudsquid</h2><p>Our vision is to solve these data challenges at the infrastructure level for technical teams. Developers and data teams should be focused on building valuable end-user experiences from newly accessible data streams&#8212;not on rebuilding essential data infrastructure from the ground up. Unstructured data ETL will become foundational for AI feature development, and we&#8217;re building it to enable teams to harness Generative AI with the speed, security, accuracy, and scalability needed for production.</p><p>We&#8217;re thrilled to have HTGF and Backbone Ventures join us in this journey, along with experienced AI product leaders Reetu Kainulainen and Udi Miron. With their support, we&#8217;re poised to scale our engineering team and core platform. Expect much more in the coming months as we expand cloudsquid&#8217;s capabilities.</p><p></p>]]></content:encoded></item></channel></rss>