<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Imaginist - Medium]]></title>
        <description><![CDATA[The Imaginist Agentic AI Platform specifically and tools provide comprehensive tool sets and services to create intelligent enterprise-scale AI Insurance and Finance applications - Medium]]></description>
        <link>https://medium.com/imaginist?source=rss----6ac47821cbb8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Imaginist - Medium</title>
            <link>https://medium.com/imaginist?source=rss----6ac47821cbb8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:24:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/imaginist" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Not Every AI Decision Needs an LLM: Testing Laya on Insurance Workflow Decisions]]></title>
            <link>https://medium.com/imaginist/not-every-ai-decision-needs-an-llm-testing-laya-on-insurance-workflow-decisions-0613bbe2a628?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/0613bbe2a628</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[insuretech]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Gopika V Pillai]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 10:30:17 GMT</pubDate>
            <atom:updated>2026-10-26T10:30:16.238Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Speed, token usage, cost and accuracy: what we measured when we ran Laya on real insurance documents at </em><a href="https://imaginist.ai/"><em>Imaginist</em></a><em>.</em></p><p>When a policyholder’s message or a broker’s submission arrives in an insurance workflow, a lot happens before anyone writes a reply. The platform has to decide whether it’s a claim or a renewal query, what kind of document it is looking at, whether the information is complete, and whether a human should step in.</p><p>None of these are writing tasks. Each one is a small decision with a short list of possible answers. Many teams answer them by sending the text to a hosted LLM and asking it to pick one.</p><p>That works. At scale, it starts to hurt.</p><h3>Three problems with using an LLM for small decisions</h3><p><strong>Latency.</strong> Every decision is a round trip to a generative model, and workflows chain several decisions together, so the delays stack up.</p><p><strong>Token spend.</strong> Every call carries instructions, a schema, and examples as input, plus reasoning and JSON as output. You pay for hundreds of tokens to get back a single word.</p><p><strong>Variability.</strong> The same input can return different answers on different runs, or occasionally malformed output. That makes regression testing painful.</p><h3>Enter Laya</h3><p>Laya is an open-weights (Apache-2.0) model from Convai Innovations, and it works differently from a chat model. It never writes text. You give it an input and a set of questions with fixed answer choices. It returns one of those choices with a probability, in a single forward pass.</p><p>It’s built on a ModernBERT encoder with a decision head. The English checkpoint uses ModernBERT-large; the multilingual checkpoint, which covers 100+ languages, uses a smaller base-size encoder. It also exposes an API compatible with TypeSafe’s Jev, so it can be self-hosted behind the same interface.</p><p>For insurance workflows, that shape matters in four ways:</p><p>• Outputs are typed, so there’s no free-text parsing and no broken JSON.</p><p>• Compute per decision is predictable.</p><p>• Probabilities let you send low-confidence cases to a human or a larger model.</p><p>• It can be self-hosted, so policyholder data can stay inside your own infrastructure.</p><h3>Turning rules into questions</h3><p>The key change isn’t the model. It’s how you ask.</p><p>Take a rule like: “If the policyholder asks for a human, or disputes a claim decision, escalate.” Rather than asking one model to judge that whole sentence, split it into two narrow questions:</p><p>1. Did the user explicitly ask to speak to a person? <strong>Yes / No</strong></p><p>2. Is the user disputing a claim or underwriting decision? <strong>Yes / No</strong></p><p>A few lines of code then combine the answers into a routing decision. Each question can be tested on its own, and thresholds and business rules live in code, not buried in a prompt.</p><h3>What we tested</h3><p>We started with one decision from our document-intake pipeline: what type of document is this? We added Laya as a classifier backend in our agent platform and ran it on 15 parsed documents from 6 real insurance submissions: 6 application forms, 6 financial reports and 3 loss runs. Laya had to answer one question with three choices: application_form, financial_report or loss_run.</p><p>We compared the English and multilingual checkpoints at five input lengths. The input length (max_len) is how many tokens Laya reads; longer documents are cleaned up and then cut to fit.</p><h3>How we kept the test fair</h3><p>• <strong>Same data, frozen labels.</strong> Every setup classified the same 15 documents. The correct label for each came from its source file and was fixed before any model ran.</p><p>• <strong>Class sizes in mind.</strong> Loss runs were the smallest class (3 of 15), so we tracked results per document type, not just overall accuracy.</p><p>• <strong>Same conditions.</strong> Each of the 10 setups ran in its own process on the same CPU machine (16 cores, 23 GB RAM, no GPU), one after another, one document at a time. A warm-up document ran first so model loading wasn’t counted.</p><p>• <strong>Repeat runs.</strong> Every document was classified twice in every setup, to check that answers don’t change between runs.</p><p>• <strong>No tuning.</strong> Single-label mode, label names only, no fine-tuning.</p><h3>The results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFaNz2cS04e6Rs8KeEFxNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJWmjmmd_9eoMe_tUigwHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-IIYTxbKHx7FcPK1yhNiPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxtt5PhVF-6DJ8JvtDaULg.png" /></figure><h3>Speed</h3><p>• Median time per decision: 890 ms (English checkpoint, 512 tokens, CPU only)</p><p>• p95 time per decision: 910 ms</p><p>• Throughput: about 1.1 decisions per second from a single CPU process, without batching</p><p>• Reading the full 8,192 tokens instead of 512 raised the median to 6.1 s and the slowest document to 24.8 s</p><h3>Token usage</h3><p>Laya doesn’t generate text, so there are no output tokens and no long instruction prompt on every call.</p><p>• Billable tokens per decision: 0</p><p>• Tokens Laya reads per decision: about 314 from the document plus about 130 for the question, processed on our own hardware</p><h3>Cost</h3><p>• Cost per 1,000 decisions: about $0.19 of CPU time (0.24 CPU-hours at an assumed $0.77/hour)</p><p>• At 8,192 tokens the same work cost about $1.71 per 1,000 decisions, with no gain in accuracy</p><p>The cost curve matters more than the headline number. API pricing scales linearly with volume. Self-hosted cost stays mostly flat until you need another instance, so the more you run, the better the economics get.</p><h3>Quality</h3><p>• Accuracy: 87% (13 of 15 documents) for the English checkpoint at 512 tokens, and 13 of 15 at every length up to 4,096.</p><p>• By type: 6 of 6 financial reports, 3 of 3 loss runs, 4 of 6 application forms.</p><p>• Multilingual checkpoint: 6 to 9 of 15, depending on the input length.</p><p>• Consistency: Laya returned identical labels and scores on 100% of repeated runs, in all 10 setups.</p><p>• Confidence: every wrong answer from the English checkpoint scored 0.44 or lower. At a 0.5 threshold it accepted 12 of 15 answers, all correct, and left 3 for review.</p><h3>What didn’t work (yet)</h3><p><strong>Calibration.</strong> Laya’s confidence scores can be overconfident out of the box, and the multilingual checkpoint showed it: it gave wrong answers with confidence as high as 1.00, so a threshold can’t catch its mistakes. We haven’t recalibrated either checkpoint yet.</p><p><strong>The multilingual checkpoint on English documents.</strong> It labelled almost everything a financial report, finding at most 1 of 6 application forms and 2 of 3 loss runs at any input length.</p><p><strong>Application forms.</strong> They were the hardest type for both checkpoints. Insurance applications contain financial figures and claims-history questions, so they share vocabulary with the other two types.</p><p><strong>Longer inputs.</strong> More text did not mean better answers. Above 512 tokens the English checkpoint only got slower and used more memory (up to 6.8 GB), and at 8,192 tokens it made one more mistake.</p><p><strong>Label descriptions.</strong> Adding a one-sentence description to each label did not help the English checkpoint (12 of 15 instead of 13). Our loss-run description overlapped with content found in applications, and we only tried one wording.</p><p><strong>Long answer menus.</strong> Typed-decision models degrade as the option list grows, and Laya’s authors say quality drops past roughly 20 choices. This test used three options; bigger taxonomies should be split into stages.</p><p><strong>It’s a base, not a zero-shot expert.</strong> We haven’t fine-tuned it. Every result here is zero-shot, using only the label names.</p><h3>What these results don’t prove</h3><p>The test used 15 real documents from 6 insurance submissions, so the error bars are wide: 13 of 15 has a 95% confidence interval of roughly 62–96%. It covered one decision with three document types, and loss runs had only three examples. The labels came from file names. Timings are from one CPU machine without batching, and the cost uses an assumed VM rate for compute only, not storage, networking or engineering time. We also haven’t yet run the same documents through an LLM, so this article doesn’t claim a speed or cost ratio against one.</p><h3>The takeaway</h3><p>Not every step in an AI workflow needs a generative model. For a small typed decision like document type, Laya’s English checkpoint classified 13 of 15 real insurance documents correctly in about 890 ms each on CPU, with no billed tokens and the same answer on every repeat run. Its confidence scores also told us which answers to double-check.</p><p>Larger models still belong where open-ended reasoning and writing matter. The shift is toward treating each decision as a testable, versioned component instead of a prompt.</p><p><strong>Next up:</strong> running the same documents through an LLM for a direct comparison, testing on more application forms, trying better-worded label descriptions, and evaluating the multilingual checkpoint on non-English documents.</p><p><em>Which decisions in your AI pipeline are really just classification in disguise? I’d love to hear what you’ve moved off LLMs, and what you’ve kept on them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0613bbe2a628" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/not-every-ai-decision-needs-an-llm-testing-laya-on-insurance-workflow-decisions-0613bbe2a628">Not Every AI Decision Needs an LLM: Testing Laya on Insurance Workflow Decisions</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TemplateRenderAgent: Transforming Agent Outputs into Visual Experiences]]></title>
            <link>https://medium.com/imaginist/templaterenderagent-transforming-agent-outputs-into-visual-experiences-8b7e08b44400?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/8b7e08b44400</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[imaginist]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <dc:creator><![CDATA[Rijojacob]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 17:46:55 GMT</pubDate>
            <atom:updated>2026-08-17T17:52:12.934Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Modern agentic systems use multiple specialized agents for tasks such as data retrieval, reasoning, analysis, and orchestration. Once these agents generate the required data, it needs to be presented in a clear and user-friendly format.</p><p><strong>TemplateRenderAgent acts as the presentation layer of an agentic workflow.</strong> It receives structured data from agents, datasets, pipelines, or external sources and transforms that data into visually formatted outputs using customizable templates.</p><p>It can be used to create <strong>reports, dashboards, cards, tables, invoices, organization charts, summaries, and custom UI layouts</strong>.</p><h3>What is TemplateRenderAgent?</h3><p>TemplateRenderAgent is an agent component designed to render structured data using <strong>Jinja, HTML, and CSS</strong>.</p><p>Unlike retrieval or reasoning agents, TemplateRenderAgent focuses on <strong>presentation rather than data processing or decision-making</strong>. It takes the output produced by other agents and converts it into a format that can be easily understood by users.</p><p>A typical workflow is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwSOlVUvwMCgjv7KaaCzyg.png" /></figure><h3>Example</h3><p>Suppose another agent provides the following data:</p><pre>{<br>  &quot;customer_name&quot;: &quot;Acme Corp&quot;,<br>  &quot;invoice_id&quot;: &quot;INV-001&quot;,<br>  &quot;total_amount&quot;: 2500.75<br>}</pre><p>A TemplateRenderAgent template can be:</p><pre>&lt;h2&gt;Invoice {{ invoice_id }}&lt;/h2&gt;<br>&lt;p&gt;Customer: {{ customer_name }}&lt;/p&gt;<br>&lt;p&gt;Total Amount: ${{ total_amount }}&lt;/p&gt;</pre><p>TemplateRenderAgent replaces the template variables with the corresponding values and produces the final output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*tGjWxjI1v9x3cLVwrzIcZA.png" /></figure><h3>Key Capabilities</h3><p>TemplateRenderAgent provides the following capabilities:</p><ul><li>Create and manage reusable templates</li><li>Build layouts using Jinja, HTML, and CSS</li><li>Render dynamic data into templates</li><li>Receive data from other agents</li><li>Connect with datasets and pipelines</li><li>Map incoming data to template variables</li><li>Preview templates in real time</li><li>Validate variables and layouts</li><li>Reuse templates across workflows</li><li>Support agent-to-agent handoffs</li><li>Generate presentation-ready outputs</li></ul><h3>Creating a TemplateRenderAgent</h3><p>To create a TemplateRenderAgent, with Imaginist Agentic AI Studio:</p><ol><li>Open <strong>Team Builder</strong>.</li><li>Set the team type to <strong>Agent</strong>.</li><li>Drag and drop <strong>TemplateRenderAgent</strong> onto the canvas.</li><li>Assign a unique agent name.</li></ol><p>The agent name is used for orchestration, routing, and communication between agents.</p><h3>Template Management</h3><p>TemplateRenderAgent provides tools for creating and testing templates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Np9lRtTIGBv7N-1QRuxhqQ.png" /></figure><h3>Code Writer</h3><p>The Code Writer is used to:</p><ul><li>Create and edit templates</li><li>Define Jinja variables</li><li>Add HTML structure</li><li>Add CSS styling</li><li>Configure default data</li></ul><h3>Visualizer</h3><p>The Visualizer is used to:</p><ul><li>Preview the rendered output</li><li>Test template changes</li><li>Validate template variables</li><li>Detect missing fields</li><li>Verify the final layout</li><li>Preview mapped data</li></ul><p>Together, these tools provide a complete environment for template development.</p><h3>Organization Chart: A Real-World Example</h3><p>A practical example is generating an organization chart from organizational data.</p><p>First, create an organization chart template and configure its <strong>layout, fields, and data mappings</strong>.</p><p>For example, a user can ask:</p><blockquote>Show the organization chart for Ethan Cole.</blockquote><p>TemplateRenderAgent receives the organizational data, applies the configured template and mappings, and generates the organization chart visually in the chat.</p><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-joph-X1ktqLwmxU0nXUpw.png" /></figure><p>The same data can also be presented using different layouts by changing the template configuration without modifying the upstream agent or data source.</p><h3>Creating Custom Templates</h3><p>Users can create completely custom templates using <strong>Jinja, HTML, and CSS</strong>.</p><p>For example:</p><pre>&lt;div class=&quot;invoice&quot;&gt;<br>  &lt;h2&gt;{{ invoice_id }}&lt;/h2&gt;<br>  &lt;p&gt;{{ customer_name }}&lt;/p&gt;<br>&lt;/div&gt;</pre><p>This allows the same TemplateRenderAgent to support different visual formats and business requirements.</p><h3>Default Data</h3><p>The Code Writer supports a <strong>JSON Data</strong> mode for defining sample data during template development.</p><p>Default data can be used for:</p><ul><li>Template development</li><li>Preview rendering</li><li>Testing</li><li>Fallback rendering</li></ul><p>Example:</p><pre>{<br>  &quot;invoice_id&quot;: &quot;INV-001&quot;,<br>  &quot;customer_name&quot;: &quot;Acme Corp&quot;,<br>  &quot;total_amount&quot;: 2500.75<br>}</pre><p>When runtime data is not available, TemplateRenderAgent can use the default data to preview the template.</p><h3>Data Input and Variable Mapping</h3><p>TemplateRenderAgent can receive structured data from different sources and use that data to populate template variables.</p><h3>Pipeline and Dataset Mode</h3><p>Use this mode when the required data needs to be retrieved from a dataset or pipeline.</p><ol><li><strong>Dataset</strong> → Provides the source data</li><li><strong>Retriever / VectorQuerier</strong> → Retrieves the required data</li><li><strong>Retrieved Data</strong> → Provides the data for rendering</li><li><strong>Data Mapping</strong> → Maps the data to template variables</li><li><strong>TemplateRenderAgent</strong> → Applies the configured template</li><li><strong>Rendered Output</strong> → Generates the final visual result</li></ol><p>For example, a pipeline may return:</p><pre>{<br>  &quot;customer_name&quot;: &quot;Acme Corp&quot;,<br>  &quot;invoice_id&quot;: &quot;INV-001&quot;,<br>  &quot;total_amount&quot;: 2500.75<br>}</pre><p>TemplateRenderAgent uses these values to populate the configured template.</p><p>This approach is useful for:</p><ul><li>Dynamic reports</li><li>Knowledge-based documents</li><li>Search-driven outputs</li><li>Data-driven dashboards</li><li>Dataset-based templates</li></ul><h3>Template Variable Mapping</h3><p>Template variables act as placeholders for incoming data.</p><p>For example:</p><pre>&lt;h2&gt;Invoice {{ invoice_id }}&lt;/h2&gt;<br>&lt;p&gt;Customer: {{ customer_name }}&lt;/p&gt;<br>&lt;p&gt;Total: ${{ total_amount }}&lt;/p&gt;</pre><p>These variables can be mapped to the corresponding data fields:</p><pre>{{ invoice_id }}     → invoice_id<br>{{ customer_name }}  → customer_name<br>{{ total_amount }}   → total_amount</pre><p>TemplateRenderAgent then replaces the variables with the actual values.</p><p>In simple terms:</p><blockquote><strong>Data mapping determines where the data comes from, while the template determines how that data is displayed.</strong></blockquote><h3>Common Use Cases</h3><ol><li><strong>Agent Response Visualization</strong></li><li><strong>Dashboard Generation</strong></li><li><strong>Report Creation</strong></li><li><strong>Invoice Rendering</strong></li><li><strong>Notification Templates</strong></li><li><strong>UI Component Generation</strong></li><li><strong>Multi-Agent Workflow Presentation</strong></li></ol><h3>When Should You Use TemplateRenderAgent?</h3><p>TemplateRenderAgent is useful when structured data needs to be transformed into a <strong>consistent and visually formatted output</strong>.</p><p>Use it when:</p><ul><li>Multiple agents produce structured data</li><li>Consistent presentation is required</li><li>Reports need to be generated automatically</li><li>Dashboards require dynamic data</li><li>Agent outputs need to be user-friendly</li><li>Presentation logic should remain separate from business logic</li><li>The same data needs to be displayed using different layouts</li></ul><h3>Conclusion</h3><p>TemplateRenderAgent acts as the <strong>presentation layer of an agentic system</strong>. It takes structured information from agents, datasets, pipelines, or external sources and transforms it into polished visual outputs through customizable templates.</p><p>With support for <strong>Jinja, HTML, CSS, data mapping, live visualization, template validation, reusable templates, and agent-to-agent workflows</strong>, it separates data processing from presentation.</p><p>In simple terms:</p><ol><li><strong>Agents</strong> → Generate the required data</li><li><strong>TemplateRenderAgent</strong> → Formats the data using the configured template</li><li><strong>Users</strong> → View the final visual output</li></ol><p>This makes TemplateRenderAgent useful for building <strong>dashboards, reports, invoices, organization charts, documents, notifications, and other dynamic user-facing experiences</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b7e08b44400" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/templaterenderagent-transforming-agent-outputs-into-visual-experiences-8b7e08b44400">TemplateRenderAgent: Transforming Agent Outputs into Visual Experiences</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why we built a Risk Analysis Agent instead of another spreadsheet]]></title>
            <link>https://medium.com/imaginist/why-we-built-a-risk-analysis-agent-instead-of-another-spreadsheet-13ccb4130a21?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/13ccb4130a21</guid>
            <category><![CDATA[risk-analysis]]></category>
            <category><![CDATA[insuretech]]></category>
            <category><![CDATA[cyber-risk-management]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ai-risk-managment]]></category>
            <dc:creator><![CDATA[Jumanajumi]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 17:41:11 GMT</pubDate>
            <atom:updated>2026-08-17T17:41:09.688Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From manual spreadsheets to a configurable agent: pluggable domains, typed signals, and a scoring pipeline built to extend without breaking</em></p><h3>Underwriting still runs on spreadsheets</h3><p>Most commercial risk assessment — D&amp;O, EPL, cyber, pick a line — still runs the way it did fifteen years ago. An underwriter opens a submission, pulls numbers into a spreadsheet, cross-references a loss run PDF, searches a litigation database by hand, and leans on judgment built from years of pattern-matching. It works, in the sense that experienced people get to reasonable answers. It just doesn’t scale, and it doesn’t compound.</p><p>Three things go wrong over and over. The data is fragmented — financials, loss runs, filings, and questionnaire answers all live in different shapes and different places, so assembling one view of a risk is manual every single time. The scoring is inconsistent — two underwriters can look at the same file and land on different numbers, because the weighting of what matters lives in someone’s head rather than in a system. And there’s no provenance — when a score gets questioned six months later, reconstructing why is expensive, sometimes impossible.</p><p>None of that is really a data problem. It’s a configuration problem. “What to look at, and how much it matters” is scattered across people and documents instead of being written down somewhere a system — and a reviewer — can actually inspect.</p><h3>A configurable risk intelligence agent</h3><p>So that’s what we built: a <strong>Risk Analysis Agent</strong> that takes a flat submission as input and hands back a full assessment — a composite 0–100 score, a confidence interval, a severity band, a breakdown down to the individual signal, a narrative, and provenance for every value that went into it.</p><p>Three things feed that assessment. <strong>Structured submission data</strong> — the fields a broker or applicant already gives you: financials, headcount, loss runs, questionnaire answers. <strong>External data</strong> — signals the system goes and gets for itself at run time: SEC filings, litigation dockets, wage-and-hour enforcement records, WARN Act layoff notices, open web research. And <strong>quantitative scoring </strong>— the pipeline that turns all of that into comparable, weighted, explainable numbers.</p><p>“Configurable” is the important word there. Which signals exist, where they come from, how much they’re worth — all of that is data, not code. That one decision shapes everything else in this post.</p><h3>Risk domains as pluggable pieces</h3><p>The engine follows one rule: the scoring code carries no per-product logic. It doesn’t know what EPL or D&amp;O or Cyber even are. Everything specific to a line of business — its domains, its factors, its signals, their weights and normalization rules — lives in a taxonomy document, and the engine just walks it.</p><pre>engine_type e.g. &quot;insurance&quot;<br> → product e.g. &quot;DO&quot;, &quot;EPL&quot;, &quot;CYBER&quot;<br>  → domain e.g. &quot;LITIGATION_ENFORCEMENT&quot;<br>    → factor e.g. &quot;SUIT_AND_ENFORCEMENT&quot;<br>     → signal e.g. &quot;FED_SUIT_FREQ&quot;</pre><p>That hierarchy exists to keep three concerns apart, on purpose. What needs to be measured lives in the taxonomy — which signals exist, how they roll up, what each is worth. How the data gets collected is a separate registry of adapters, each one responsible for exactly one external source and nothing about scoring. And how the score gets calculated is a single generic pipeline, shared across every product, that reads the taxonomy’s configuration instead of hard-coding it.</p><p><strong>How a submission becomes a score</strong></p><p>Structured data and external adapters feed a config-driven pipeline; the taxonomy governs what’s measured and how it’s weighed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNdRTGbLMUSXH4EeAo9ixw.png" /></figure><p><em>The dashed line is a config dependency, not a data flow — the taxonomy tells the engine what exists and how to weigh it, it never contains logic itself.</em></p><p>The payoff shows up the moment you onboard a new line of business: adding one means writing configuration, and maybe one small adapter class if the source is new — never touching the scoring engine itself. I’ll walk through exactly that a bit further down.</p><h3>Three ways a signal gets its value</h3><p>A signal is the atomic unit of the taxonomy — one measurable thing, like litigation frequency or layoff intensity. Every signal is exactly one of three types, depending on where its value comes from:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWt7YUkB1dswBJFeLeLNkA.png" /></figure><p>No matter where a signal comes from, it goes through the same step before scoring: turning its raw value into a number between 0 and 100. A percentage, a dollar amount, a yes/no answer, a text category — they all end up on that same scale. Numbers get checked against set ranges, so a layoff rate above 15% of headcount scores much higher than no layoffs at all. Yes/no answers each map to their own fixed score. And categories — whether they come from the submission or from an adapter — get matched against a lookup table of scores.</p><p>A signal with no value available doesn’t throw an error. It’s just excluded from scoring, and from the coverage number that later feeds confidence. A submission missing a loss run degrades the assessment; it doesn’t break it.</p><h3>From signal to a single number</h3><p>Getting from dozens of individual signals to one composite score happens in four steps, each one rolling the level below it up into something coarser.</p><p><strong>Signal to factor</strong>. The simplest way to combine a few signals is to average them. But that breaks down in two cases: two risky signals that make each other worse (a plain average understates them), and two signals that are really just saying the same thing (a plain average double-counts them). So for factors where we know this happens, we combine signals using the <strong>Choquet integral</strong> instead of a plain average:</p><pre>Cμ(f) = Σ [ f(σᵢ) − f(σᵢ₊₁) ] × μ({σ₁, ..., σᵢ})</pre><p>In words: rank the signals highest to lowest, so σ₁ is the top-scoring one and f(σᵢ) is its score. Walk down that ranking one signal at a time, and each step only adds the <em>gap</em> between it and the next signal down — never the raw score itself. What that gap gets multiplied by is μ, the &quot;capacity&quot;: a number from 0 to 1 saying how much that whole top group is worth together. Two signals known to reinforce each other get a high μ, so together they count for more than either alone. Two overlapping signals get a low μ, so the second one barely adds anything once the first is already counted. Where we haven&#39;t defined that relationship for a pair, the factor just falls back to a plain weighted average. Alongside the score, we also work out how much each individual signal contributed to it, so any factor score can be explained afterward, not just produced.</p><p><strong>Factor to domain</strong>. A domain’s factors get combined into one number too, and again we don’t want a plain average — a domain where one factor is genuinely disqualifying shouldn’t get smoothed over just because two other factors look fine. So instead we use a <strong>weighted power mean</strong>:</p><pre>domain score = ( Σ (factorᵢᵖ × weightᵢ) / Σ weightᵢ ) ^ (1/p)</pre><p>In words: raise each factor’s score to the power p, take the weighted average of that, then undo the power at the end. When p is 1, this is just a normal weighted average. Push p higher, and raising numbers to a power stretches the bigger ones apart from the smaller ones — so a high-risk factor&#39;s score dominates the sum more than its weight alone would suggest, and the domain score gets pulled up toward the worst factor rather than settling in the middle. We call that knob <strong>risk_aversion</strong>: turn it up for domains where one bad factor should be disqualifying on its own.</p><p><strong>Domain to composite</strong>. Once every domain has a score, we don’t average those either. Instead we start from a baseline risk level for the industry and let each domain’s score nudge it up or down — the same way a new fact updates a belief, rather than just getting blended into an average:</p><pre>composite = α / (α + β) × 100</pre><p>α and β start at an industry baseline — think of them as accumulated &quot;votes&quot; for risky and safe. Each domain casts a vote sized by <strong>weight × confidence</strong>: a risky-looking domain (score above 50) adds its vote to α, a safe-looking one adds to β. A domain backed by strong evidence (high confidence) casts a bigger vote than the same score built on thin data. The composite is just the share of votes that landed on &quot;risky.&quot; Instead of stopping at one number, this also gives us a likely range around it — an honest &quot;somewhere between X and Y&quot; instead of false precision. And if any one domain scores 75 or higher, we check that the composite hasn&#39;t been watered down below what that domain deserves on its own, and lift it back up if it has — so one badly-scoring domain can&#39;t get hidden by decent scores everywhere else.</p><p>And finally, <strong>composite to band </strong>— the score lands in one of five severity bands.</p><p><strong>The severity scale</strong></p><p><em>Where a composite score lands decides the band on the final assessment.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9UjCeSLBIfJwMbENqups5w.png" /></figure><p><em>A composite score of 63, with a moderate-width credible interval, lands the submission in Elevated — a meaningful step up from a 58 in Moderate.</em></p><p>We picked these two techniques for the same underlying reason: each closes off one of the easy ways a scoring system quietly goes wrong. A plain weighted sum treats every combination of signals as independent, so it can’t tell “two unrelated minor issues” from “two issues that compound.” A plain average of domain scores treats every submission as equally well-evidenced, so a thin file and a thoroughly documented one come out looking equally confident. Choquet scoring and Bayesian composition exist specifically to close those two gaps.</p><h3>Wrapping the engine as an agent</h3><p>Choquet scoring, power means, Bayesian updating — all of that lives inside an engine that, on its own, is just a library. The <strong>Risk Analysis Agent</strong> is what turns it into something that plugs into a bigger workflow. It’s configured with one or more attached domain components, which is the only place its <strong>engine_type </strong>and <strong>product </strong>come from — every attached domain has to agree, or construction fails right away, before anything runs.</p><blockquote>One word, two meanings. A domain is the actual thing defined in the taxonomy — WORKFORCE_DISRUPTION and everything under it. A domain component is just how an agent picks one, by id.</blockquote><p>From there, the full taxonomy for that product loads and narrows to just the signals the attached domains selected, keeping each one’s real weight and normalization intact. An incoming submission gets validated against the engine’s own input model — permissive on shape, strict only on the handful of fields that are structurally required. Every derived signal’s adapters run once, batched by adapter type rather than once per signal, and an adapter that can’t run — a missing key, a missing field — becomes a documented limitation on the output instead of a crash. Then the full scoring pipeline runs, and the agent checks whether the evidence behind it is actually sufficient — interval width, whether the domain’s declared critical signals resolved, factor coverage — before deciding whether to present the score as confident or flag it as thin.</p><p>What comes back is one JSON object: the composite score and its credible interval, the severity band, a full breakdown down to individual signals, a generated narrative, an evidence section with provenance for every value, and — if the agent’s configured with a handoff — a route to whichever agent should act on it next.</p><p>The score, honestly, is only half of what this produces. The other half is being able to say, for any number, exactly which signals produced it and how sure the system actually is.</p><h3>Adding a domain without touching the engine</h3><p>The real test of “config, not code” is what it actually takes to onboard a new risk domain, end to end. Here’s what that looked like when we added <strong>Employment Practices Liability (EPL)</strong> as a product, and gave its <strong>WORKFORCE_DISRUPTION </strong>domain a signal for recent layoff activity — mass layoffs are one of the strongest frequency drivers of EPL claims.</p><p>1.<strong>Declare the signal in the taxonomy</strong></p><p>Everything the engine needs sits in one JSON block: what the signal is called, where its value comes from, and how a raw value turns into a 0–100 score.</p><pre>{<br>  &quot;domain_id&quot;: &quot;WORKFORCE_DISRUPTION&quot;,<br>  &quot;domain_weight&quot;: 0.3,<br>  &quot;risk_aversion&quot;: 2.0,<br>  &quot;critical_signals&quot;: [&quot;WARN_INTENSITY&quot;],<br>  &quot;factors&quot;: [{<br>    &quot;factor_id&quot;: &quot;REDUCTION_ACTIVITY&quot;,<br>    &quot;signals&quot;: [{<br>      &quot;signal_id&quot;: &quot;WARN_INTENSITY&quot;,<br>      &quot;signal_name&quot;: &quot;WARN Layoff Intensity&quot;,<br>      &quot;data_type&quot;: &quot;Derived&quot;,<br>      &quot;acquisition&quot;: {<br>        &quot;adapters&quot;: [{ &quot;id&quot;: &quot;warn_intensity&quot;, &quot;type&quot;: &quot;warn_notice&quot; }],<br>        &quot;aggregation&quot;: { &quot;method&quot;: &quot;first_valid&quot; }<br>      },<br>      &quot;weight&quot;: 0.6,<br>      &quot;normalization&quot;: {<br>        &quot;method&quot;: &quot;THRESHOLD&quot;,<br>        &quot;thresholds&quot;: [<br>          { &quot;max&quot;: 0,    &quot;score&quot;: 20 },<br>          { &quot;max&quot;: 0.05, &quot;score&quot;: 55 },<br>          { &quot;max&quot;: 0.15, &quot;score&quot;: 75 },<br>          { &quot;min&quot;: 0.15, &quot;score&quot;: 90 }<br>        ]<br>      }<br>    }]<br>  }]<br>}</pre><p>2 . <strong>Write the adapter, if the source is new</strong></p><p>warn_notice didn&#39;t exist yet, so it needed a small adapter class. Every adapter implements exactly two methods: build() constructs it from the submission&#39;s runtime context, or explains why it can&#39;t, and fetch() returns values keyed by signal_id.adapter_id.</p><pre>from autogenstudio.risk.adapters.base import DataAdapter<br>from autogenstudio.risk.adapters.registry import AdapterRegistry<br><br>@AdapterRegistry.register<br>class WarnNoticeAdapter(DataAdapter):<br>    adapter_type = &quot;warn_notice&quot;<br>    label = &quot;WARN Act Notices&quot;<br>    required_fields_any_of = [&quot;company_name&quot;]<br><br>    @classmethod<br>    async def build(cls, context):<br>        if not context.get(&quot;company_name&quot;):<br>            return None, &quot;no company_name in submission&quot;<br>        return cls(company_name=context[&quot;company_name&quot;]), None<br><br>    async def fetch(self, signals, **kwargs):<br>        notices = await self._query_warn_firehose(self.company_name)<br>        intensity = self._decay_weighted_intensity(notices)<br>        key = f&quot;{signals[0].signal_id}.{signals[0].acquisition.adapters[0].id}&quot;<br>        return {key: intensity}</pre><p>3 . <strong>Wire it into a domain component</strong></p><p>A domain component is what an agent actually attaches to. It pins the engine_type/product, and picks which signals from the full taxonomy this particular agent cares about:</p><pre>{<br>  &quot;domains&quot;: [{<br>    &quot;domain_id&quot;: &quot;WORKFORCE_DISRUPTION&quot;,<br>    &quot;engine_type&quot;: &quot;insurance&quot;,<br>    &quot;product&quot;: &quot;EPL&quot;,<br>    &quot;selected_signal_ids&quot;: [&quot;WARN_INTENSITY&quot;, &quot;APP_RIF_DISCLOSED&quot;]<br>  }]<br>}</pre><p>Every domain attached to one agent has to agree on engine_type/product — that agreement is how the agent decides which engine to build the moment it&#39;s constructed.</p><p>4 . <strong>Run a submission through it</strong></p><p>From here the agent doesn’t need anything else. Send it a flat submission:</p><pre>{<br>  &quot;company_name&quot;: &quot;Example Logistics Co&quot;,<br>  &quot;total_ee&quot;: 640,<br>  &quot;rif_past_12mo&quot;: true,<br>  &quot;rif_planned_12mo&quot;: false<br>}</pre><p>…and it comes back with a scored, explained assessment:</p><pre>{<br>  &quot;risk_analysis&quot;: {<br>    &quot;composite_score&quot;: {<br>      &quot;score&quot;: 63.4,<br>      &quot;risk_band&quot;: &quot;ELEVATED&quot;,<br>      &quot;confidence_interval&quot;: { &quot;lower&quot;: 57.1, &quot;upper&quot;: 69.2, &quot;level&quot;: 0.9 },<br>      &quot;evidence_sufficient&quot;: true<br>    },<br>    &quot;domains&quot;: {<br>      &quot;WORKFORCE_DISRUPTION&quot;: {<br>        &quot;score&quot;: 71.2,<br>        &quot;confidence&quot;: 0.82,<br>        &quot;factors&quot;: {<br>          &quot;REDUCTION_ACTIVITY&quot;: { &quot;score&quot;: 75.0, &quot;scoring_method&quot;: &quot;CHOQUET&quot; }<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>Nothing in the engine or the Choquet/Bayesian math changed at any point in these four steps. The new domain just appeared in the taxonomy the next time it loaded, wired into the same pipeline every other domain already runs through.</p><h3>What an assessment actually looks like</h3><p>The JSON from the walkthrough is what the agent returns; in the platform, that same output renders as three views — the top-line assessment, a grid of scored domains, and a drill-down into any one domain’s factors and signals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-HwRBNvQtQYq3VgaP9Ccg.png" /><figcaption>The score shown as a gauge, next to the strengths and findings behind it — the explanation, not just the number. Each scored domain — Workforce Disruption,HR Controls, Litigation &amp; Enforcement Histroty others — with its own score, weight, and confidence.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AorZ-Lm68w1o2BdTpEoEMw.png" /><figcaption>Opening a domain shows exactly the breakdown described earlier: factor scores, then the individual signals underneath, each with its own contribution.</figcaption></figure><h3>The score doesn’t have to stop at a band</h3><p>A 0–100 score with a severity band is one way to close out this pipeline, but it’s not the only one. Applied to cyber risk specifically, the same underlying approach — signals scored, combined through a Choquet integral, rolled up by domain — can go one step further and come out the other end in dollars.</p><p>Instead of stopping at a bounded score, each factor score gets mapped onto a node in an Open FAIR loss tree (Loss Event Frequency × Loss Magnitude) as a PERT distribution, and a Monte Carlo simulation turns the whole thing into an Annualized Loss Exposure: a mean dollar figure, a 90th/99th-percentile tail, and a full loss-exceedance curve, broken out per scenario — ransomware, data breach, business email compromise. “Elevated” becomes something closer to “$12.2M expected annual loss, $37M at the 90th percentile.”</p><p>The building blocks carry over almost exactly. Signals still get combined with interaction in mind — a known-exploited vulnerability paired with a high exploit-probability score compounds superadditively, the same way two reinforcing signals do in a factor score here. Attested controls still earn credit that reduces risk, but that credit gets capped the moment observed evidence contradicts the attestation — a fresh stolen-credential hit voids the credit for MFA, an actively exploited vulnerability voids credit for patching — which is the same “observed outranks attested” principle behind treating “no data” and “wrong data” as different failures earlier in this post. And the domain rollup is the same weighted power mean.</p><p>What changes is just the last mile: instead of a band, the output is a distribution. That’s really one more argument for keeping “how it’s scored” separate from “what the final number looks like” — the shape of the output turned out to be a config decision too, not something the engine needed an opinion about.</p><h3>Where this goes from here</h3><p>A few things are already underway. Covering more data sources — more filing types, more litigation and enforcement records, more industry-specific research. Giving adapter failures real categories instead of a generic error message, so “why didn’t this resolve” has a clear answer — missing credentials, a rate limit, no matching record, a source being down — instead of just a string of text. Supporting more product lines, since the same taxonomy structure that already covers D&amp;O, EPL, and Cyber works for any line where risk breaks down into domains, factors, and signals. And improving the starting assumptions over time, since every submission that turns into a known outcome is one more data point to calibrate against.</p><p>None of that needs a rewrite of the engine. That’s really the point of building it this way — the hard decision, keeping what’s measured, how it’s collected, and how it’s scored separate, only had to be made once. It’s also, in hindsight, how the three problems from the very start actually got solved: the adapter registry is what pulls financials, filings, litigation records, and web research into one flat shape before scoring ever sees them, so fragmentation stops being a per-submission chore; the taxonomy is what makes two underwriters land on the same number for the same file, since the weighting lives in versioned config instead of memory; and the evidence section is what makes that number defensible six months later. Everything past that first split is just configuration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13ccb4130a21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/why-we-built-a-risk-analysis-agent-instead-of-another-spreadsheet-13ccb4130a21">Why we built a Risk Analysis Agent instead of another spreadsheet</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orchestrating a Submission-to-Quote Workflow with Multi-Agent Systems]]></title>
            <link>https://medium.com/imaginist/orchestrating-a-submission-to-quote-workflow-with-multi-agent-systems-4d9112e42bee?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/4d9112e42bee</guid>
            <category><![CDATA[imaginist]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[insurance-automation]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[insurance]]></category>
            <dc:creator><![CDATA[Gopika V Pillai]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 17:37:41 GMT</pubDate>
            <atom:updated>2026-08-17T17:37:40.067Z</atom:updated>
            <content:encoded><![CDATA[<p>In the evolving landscape of insurance underwriting, automating the Submission-to-Quote (S2Q) process is key to improving speed, accuracy, and scalability. Multi-agent systems — teams of specialized AI agents working collaboratively — offer a powerful approach to orchestrating complex workflows like S2Q. In this post, we’ll explore how different multi-agent orchestration patterns and agent types come together to build an efficient, scalable, and maintainable S2Q pipeline.</p><h3>1. Introduction</h3><p>Multi-agent systems are collections of autonomous agents that collaborate to achieve complex tasks. Agent orchestration is about structuring these teams to work efficiently — sometimes in parallel, sometimes sequentially, and sometimes dynamically routing tasks based on context.</p><p>To ground these concepts, we’ll use the <strong>Submission-to-Quote (S2Q)</strong> workflow common in insurance underwriting. This involves:</p><ul><li>Intake of a new insurance submission,</li><li>Processing various attachments and forms,</li><li>Validating extracted data,</li><li>Performing risk assessment,</li><li>Generating a tailored insurance quote.</li></ul><p>By following this concrete example, you’ll see how multi-agent orchestration patterns and agent types solve real-world challenges in insurance automation.</p><h3>2. The Submission-to-Quote Workflow at a Glance</h3><p>Here’s a high-level view of the S2Q workflow stages:</p><ul><li><strong>Submission Intake:</strong> Receive submission and its attachments (Statements of Values, loss runs, ACORD forms, etc.).</li><li><strong>Attachment/Document Processing:</strong> Extract structured data from each attachment.</li><li><strong>Validation:</strong> Verify data completeness and accuracy.</li><li><strong>Risk Assessment:</strong> Analyze risk exposure based on validated data.</li><li><strong>Quote Generation:</strong> Generate an insurance quote tailored to the submission details.</li></ul><h3>Workflow Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ER7TxEI-6EJcsFCxlSlN2g.png" /></figure><p>This architecture uses <strong>different orchestration patterns</strong> at various stages to optimize throughput and reliability.</p><h3>3. Concurrent Team: Parallel Processing of Attachments</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u15XnX351mvt8oC9LRuUFA.png" /></figure><p>Submissions often arrive with multiple attachments, each requiring specialized extraction logic. For example:</p><ul><li>Statements of Values (SOVs),</li><li>Loss runs,</li><li>ACORD forms,</li><li>Other supporting documents.</li></ul><p>Each document type demands a different parser and extraction approach. To handle this efficiently, we apply the <strong>Concurrent Team</strong> pattern:</p><h3>What is the Concurrent Team Pattern?</h3><p>It involves agents working <strong>in parallel</strong>, independently processing parts of a larger task, then aggregating results.</p><h3>Applying Concurrent Teams to Attachment Processing</h3><p>Multiple <strong>Document Processor Agents</strong> are assigned to different attachment types:</p><ul><li>One agent extracts values from SOVs.</li><li>Another agent parses loss runs.</li><li>A third agent handles ACORD forms.</li><li>Additional agents handle other document types.</li></ul><p>All run simultaneously, speeding up overall processing.</p><h3>Benefits</h3><ul><li><strong>Speed:</strong> Parallel processing dramatically reduces latency.</li><li><strong>Fault Tolerance:</strong> Failure in one document processor doesn’t block others.</li><li><strong>Modularity:</strong> Easy to add new Document Processor Agents for new document types.</li></ul><p>After extraction, results are aggregated into a unified data set for the next stage.</p><h3>4. Sequential Team: Validation → Risk Assessment → Quote Generation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D1sfMXt_3XKiqFIbk3VmEQ.png" /></figure><p>Once all data is extracted, the workflow moves into a <strong>linear pipeline</strong> where each step depends on the previous output:</p><h3>What is the Sequential Team Pattern?</h3><p>A sequence of agents where each agent waits for the previous one to finish before starting.</p><h3>Applying Sequential Teams to S2Q</h3><ul><li><strong>Validation Agent:</strong> Checks if all required data fields are present and logically consistent.</li><li><strong>Risk Analysis Agent:</strong> Assesses the submission’s risk exposure based on validated data.</li><li><strong>Quote Agent:</strong> Uses the risk profile and validated data to generate a quote.</li></ul><p>The pipeline ensures that:</p><ul><li>Only valid data proceeds to risk assessment.</li><li>The quote is generated only after risk is fully assessed.</li></ul><h3>Why Sequencing Matters</h3><p>Each step depends on the prior output’s correctness. Skipping or reordering stages risks inaccurate quotes or underwriting errors.</p><h3>5. Selector / Swarm Teams: Dynamic Routing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A8VEosE43Gjy-9Vjnronnw.png" /></figure><p>Insurance submissions can vary widely, requiring <strong>dynamic decision-making</strong> in the workflow:</p><ul><li>Different submission types (property, casualty, etc.) need different handling.</li><li>Missing or inconsistent data may require looping back to the submitter.</li><li>Complex underwriting rules may trigger escalation to human underwriters.</li></ul><h3>What are Selector and Swarm Teams?</h3><ul><li><strong>Selector Teams</strong>: Choose one agent or path dynamically based on conditions.</li><li><strong>Swarm Teams</strong>: Agents operate on a handoff basis rather than broadcast/consensus. Each agent is configured at creation time with a predefined set of possible handoff targets — the specific agents it’s allowed to transfer control to. During execution, the currently active agent decides which single agent to hand off to next, based on the applicable condition, and control moves to that agent. If an agent’s handoff set includes multiple candidates, it evaluates the conditions and picks one to hand off to — not all of them. Execution proceeds as a chain of one-at-a-time handoffs rather than a fan-out to multiple agents.</li></ul><h3>Applying to S2Q</h3><ul><li><strong>Selector Team:</strong> Routes submissions to specialized pipelines based on type.</li><li><strong>Swarm Team:</strong> When data is incomplete, swarm agents may simultaneously attempt data enrichment from different sources or request clarifications. The best or earliest response is taken.</li><li>Escalation decisions can be made by selector agents that evaluate risk thresholds or validation failures.</li></ul><p>This dynamic routing adds flexibility and robustness to the workflow.</p><h3><strong>6. Agent Types Involved in the Workflow</strong></h3><p>Here’s how specific agent types map to stages of the S2Q workflow:</p><ul><li><strong>Workflow Assistant Agent</strong>: Kicks off the S2Q workflow when a new submission is received, triggering the downstream agent pipeline.</li><li><strong>User Proxy Agent</strong>: Serves as the human-in-the-loop interface — sends notifications and routes cases to a human when underwriter approval or manual review is needed before the workflow can proceed.</li><li><strong>Document Processor Agents</strong>: Handle parsing, classification, extraction, and writing of structured data from each attachment, running in parallel across documents.</li><li><strong>Rule Validation Agent</strong>: Performs data validation checks sequentially after extraction.</li><li><strong>Risk Analysis Agent</strong>: Evaluates risk exposure based on validated data.</li><li><strong>Query Assistant Agent</strong>: Retrieves information from external sources — open APIs, Elasticsearch, databases, etc. — to support data enrichment and clarification.</li><li><strong>Quote Agent</strong>: Generates the quote based on the combined risk, validation, and enrichment outputs.</li></ul><p>Each agent type encapsulates a specialized function, enabling modularity and scalability.</p><h3>7. Workflow Termination Strategies (Brief, Applied)</h3><p>Termination strategies determine when a multi-agent process is considered complete:</p><ul><li><strong>Max Message Termination:</strong> The concurrent Document Processor Agents terminate when all attachments are processed or a max number of retries reached.</li><li><strong>Text Match Termination:</strong> Validation halts if critical errors are detected, triggering escalation.</li><li><strong>OR Termination:</strong> Sequential pipeline can stop early if a fatal validation error occurs, avoiding wasted computation.</li></ul><p>These strategies ensure efficient resource use and clear workflow progression.</p><h3>8. Why This Matters: Choosing the Right Pattern</h3><p>In the context of insurance S2Q workflows:</p><ul><li><strong>Concurrent Teams</strong> excel when processing independent, heterogeneous data sources — attachments arriving together but processed separately.</li><li><strong>Sequential Teams</strong> are essential when data dependencies dictate strict processing order, such as validating before risk assessment.</li><li><strong>Selector/Swarm Teams</strong> introduce agility required for real-world variability — routing, missing data loops, and escalations.</li></ul><p>Choosing the right orchestration pattern is key to building scalable, maintainable multi-agent systems that mirror real business workflows.</p><h3>9. Conclusion</h3><p>By combining orchestration patterns — Concurrent, Sequential, Selector, and Swarm — with specialized agent types, we can design an end-to-end Submission-to-Quote pipeline that:</p><ul><li>Processes submissions rapidly and accurately,</li><li>Validates and assesses risk reliably,</li><li>Adapts dynamically to varying submission types and data quality,</li><li>Delivers tailored quotes efficiently.</li></ul><p>This approach is not limited to S2Q and can extend naturally to other insurance workflows like claims processing and policy renewals, offering a blueprint for intelligent, automated insurance operations.</p><p>If you’re building AI-driven automation in insurance, understanding and applying these multi-agent orchestration patterns is a critical skill to master.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d9112e42bee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/orchestrating-a-submission-to-quote-workflow-with-multi-agent-systems-4d9112e42bee">Orchestrating a Submission-to-Quote Workflow with Multi-Agent Systems</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMs Make Poor Rule Engines. Use Them to Write the Rules Instead.]]></title>
            <link>https://medium.com/imaginist/llms-make-poor-rule-engines-use-them-to-write-the-rules-instead-1a318ca7e6f3?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/1a318ca7e6f3</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[business-rule-engine]]></category>
            <category><![CDATA[rule-engine]]></category>
            <dc:creator><![CDATA[Sreejith IV]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 17:31:22 GMT</pubDate>
            <atom:updated>2026-08-17T17:31:21.092Z</atom:updated>
            <content:encoded><![CDATA[<p>Business rules sit at the core of insurance workflows, governing how submission intake and claim processing get automated by determining whether a submission is eligible, how a premium gets adjusted, and what conditions trigger a change in payout.</p><p>Rules like these are almost always complex. A carrier might say: “If the company has performed well over the last five fiscal years, consider it financially stable and reduce the premium by X percent.” The intent is clear, but implementation is not. What does “performed well” mean in code? Revenue growth above a threshold? Consistent EBITDA margins? No years in the red? This is how underwriters think and write policy.</p><p>That is what made an LLM seem like the right tool. If the model could read the policy language, interpret the intent, and make the call in-context, we could skip the painful translation step entirely. Feed it the submission and the rule, get a decision back.</p><figure><img alt="LLM-assisted rule validation taking submission and guidelines as input, producing decisions that are non-deterministic, unauditable, and prone to hallucination." src="https://cdn-images-1.medium.com/max/955/1*8uQm6wShHJwkmKnNhZsb5g.png" /></figure><p>For example, we fed the profit margin rule a submission: Five years of financials, some years clearing 5%, some not.</p><p>In the first pass, it cleared as financially stable. Second pass it did not. Same input, different output.</p><p>We tried fixing it with more prompt tuning, better harness engineering, and more explicit instructions for edge cases helped at the margins. But none of it made the model deterministic.</p><p>Rule evaluation requires the same input to produce the same result every time. Even with careful prompt and harness engineering, an LLM cannot consistently make the same decision twice at scale. That is a limitation of the overall approach here.</p><p>The bigger problem was that incorrect answers looked just like correct ones. The model could drop a clause, add a condition that wasn’t in the policy, or interpret a threshold differently from what was intended. The result would still look clean and structured. There was nothing in the output to indicate that the model had made a mistake.</p><p>In insurance, that is a serious problem. If a premium is adjusted based on a condition the policy never specified, or a claim is approved because a rule was silently skipped, the mistake may not surface until an audit. By then, it is already a compliance issue.</p><p>And even if we tune the process well enough that it mostly works, someone still has to verify the decisions. At that point we have traded automation for a manual review queue. That is close to where we started.</p><p>Cost and latency were another problem at scale. Each evaluation meant sending the policy document and submission data through the model, often repeating the same large context across rules and submissions. A typical check might involve sending the context, getting a response, calling a function, returning the result, and then continuing with the next condition. A single rule could require several round trips, and that overhead quickly adds up across a full submission.</p><figure><img alt="LLM validator making multiple round trips to fetch fiscal data and check thresholds before producing a decision, with each hop adding network latency and processing time" src="https://cdn-images-1.medium.com/max/1024/1*SP1U8nPsrCNq0rcQ8_-ykA.png" /></figure><p>All these problems came from using the LLM to evaluate rules, something it is inherently not suited for. Its strength is interpreting dense, ambiguous policy language and turning it into structured intent. The profit margin rule is a good example. Turning “performed well over five fiscal years” into code requires interpretation. That is where the LLM shines.</p><p>So, we moved it upstream. Instead of making the decision, the LLM writes the logic that will make the decision. The Insurance team then reviews the proposed rule, clears up any ambiguity, and approves it. The rule only runs after a human has verified exactly what it does.</p><figure><img alt="Rule compiler architecture: human readable underwriting guidelines flow through a frontend compiler (text extraction, LLM-generated intermediate representation, validation, compilation to DSL) into a rule engine backend (parser, AST, interpreter) that produces a modified object and execution trace for the agent or underwriter." src="https://cdn-images-1.medium.com/max/1024/1*QSFeuTnPaybYm-HUicZFeQ.png" /></figure><p>The conversion process has two sides, with each stage having a specific job.</p><p>On the frontend, it starts with the raw policy document. A text extractor pulls the policy text out of whatever format the document came in. This becomes the LLM input. The LLM reads the policy and produces an intermediate representation, a structured version of the rule that captures the conditions, thresholds, and actions described in the document.</p><p>That intermediate representation is then validated to check that it is complete, well-formed, and follows the expected structure. Once it passes validation, a compiler converts it into the final DSL, which is the format the rule engine can execute.</p><p>On the backend, the rule engine takes the DSL and parses it into an AST (Abstract Syntax Tree). The interpreter then executes that AST against the submission or claim. The result is the modified object, along with an execution trace showing each condition that was evaluated and the outcome. That trace is returned to the agent or underwriter so they can see how the rule was applied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*aUbNeaUe8DGQP1pino3yrQ.png" /></figure><p>From that point, execution moves to a rule engine. The same submission that was taking minutes now processes in milliseconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gD1GjFa2Iuqai9fbI0BNkg.png" /></figure><p>At <a href="https://www.imaginist.ai/">Imaginist</a>, this is the system we built and the one we run on today. Part 2 of this blog walks through the full pipeline, from the raw policy document to LLM parsing, DSL generation, validation, and finally execution.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a318ca7e6f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/llms-make-poor-rule-engines-use-them-to-write-the-rules-instead-1a318ca7e6f3">LLMs Make Poor Rule Engines. Use Them to Write the Rules Instead.</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fine-Tuning LayoutLMv3 for Intelligent Document Processing]]></title>
            <link>https://medium.com/imaginist/fine-tuning-layoutlmv3-for-intelligent-document-processing-c6c5edd13453?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/c6c5edd13453</guid>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[document-intelligence]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[imaginist]]></category>
            <category><![CDATA[model-finetuning]]></category>
            <dc:creator><![CDATA[Prashanth Chandran]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 17:55:34 GMT</pubDate>
            <atom:updated>2026-08-14T17:55:35.998Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How we trained a model to read and understand documents the way humans do — extracting structured data from invoices, forms, and more.</em></p><h3>What Problem Are We Solving?</h3><p>Businesses deal with huge volumes of documents every day — invoices, purchase orders, contracts, forms. Getting structured data out of these documents is a pain. Traditional approaches like regex rules or template matching break easily when a vendor changes their invoice layout or a new document type comes in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*DB62G4nZAz-juUz7nukxKw.png" /></figure><p>What we really need is a model that can read a document the way a human does: understanding not just <em>what</em> the text says, but <em>where</em> it sits on the page — because layout carries meaning. “Total” in the bottom-right corner of an invoice means something very different from “Total” in a table header.</p><p>That’s exactly what <strong>LayoutLMv3</strong> does. It’s Microsoft Research’s third-generation model for Document AI, and it’s become a core part of how we extract structured data at Imaginist.ai. This post walks through how we fine-tuned it on our business document dataset, step by step.</p><blockquote><strong><em>📌 Note:</em></strong><em> Our training data is proprietary, but throughout this guide we reference publicly available datasets (FUNSD, CORD, SROIE) that you can use as drop-in replacements to follow along.</em></blockquote><h3>How LayoutLMv3 Works</h3><p>LayoutLMv3 combines three types of information from a document and processes them together in a single Transformer model:</p><ul><li><strong>Text tokens</strong> — the words extracted by OCR, with standard word embeddings.</li><li><strong>Layout embeddings</strong> — the bounding box coordinates of each word, normalised to a 0–1000 scale. This tells the model <em>where</em> each word lives on the page.</li><li><strong>Image patch tokens</strong> — the document image is split into small 16×16 pixel patches and projected linearly into the model. No heavy CNN backbone needed.</li></ul><p>All three streams are concatenated and fed into a shared Transformer encoder. This joint processing is what gives the model its power — it learns to connect text meaning with visual position.</p><blockquote><strong><em>Why v3 over v1/v2?</em></strong><em> Earlier versions depended on a CNN image backbone (Faster R-CNN / ResNeXt), which was slow, memory-heavy, and required the Detectron2 library to run. LayoutLMv3 replaces all of that with simple linear patch projections, making it much easier to fine-tune on a single GPU.</em></blockquote><h3>What it learns during pre-training</h3><p>Before fine-tuning, the model is pre-trained with three tasks that teach it to deeply understand documents:</p><ul><li><strong>MLM (Masked Language Modeling):</strong> Predict masked text tokens — the classic BERT-style task.</li><li><strong>MIM (Masked Image Modeling):</strong> Reconstruct masked image patches, teaching visual layout understanding.</li><li><strong>WPA (Word-Patch Alignment):</strong> Predict whether a text token and an image patch correspond to the same region — building precise cross-modal alignment.</li></ul><h3>Datasets You Can Use</h3><p>If you don’t have your own annotated data, these four public datasets are the standard starting points for LayoutLM models. All are available on Hugging Face Datasets.</p><p><strong>FUNSD</strong> — 199 annotated scanned forms. Great for form key-value extraction. Labels: question, answer, header, other.</p><p><strong>CORD</strong> — 1,000 store receipts annotated with 30 semantic labels. Best starting point if your task involves receipts.</p><p><strong>SROIE</strong> — 626 training + 347 test scanned receipts. Key fields: company, date, address, total.</p><p><strong>RVL-CDIP</strong> — 400,000 document images across 16 classes. Use this for document type classification tasks.</p><p>For invoice and business document extraction, FUNSD and CORD are the closest public proxies to what we work with at Imaginist.ai.</p><h3>Preparing Your Data</h3><h3>Step 1: Run OCR to get words and bounding boxes</h3><p>LayoutLMv3 needs three things per word: the word text, its bounding box (normalised to 0–1000), and an NER label for training. The first step is running OCR on your document images. We use <strong>Google Document AI</strong> — it produces highly accurate text extraction along with precise bounding polygon data for every word, which maps cleanly onto what LayoutLMv3 expects.</p><p>The key step is converting Document AI’s bounding polygons (returned as normalised vertex coordinates in the 0–1 range) into LayoutLMv3’s required 0–1000 integer scale.</p><pre>from google.cloud import documentai_v1 as documentai<br>from PIL import Image</pre><pre>def run_ocr(image_path, project_id, location, processor_id):<br>    client = documentai.DocumentProcessorServiceClient()<br>    processor_name = client.processor_path(project_id, location, processor_id)</pre><pre>    with open(image_path, &quot;rb&quot;) as f:<br>        raw_document = documentai.RawDocument(<br>            content=f.read(),<br>            mime_type=&quot;image/png&quot;,   # or &quot;application/pdf&quot;<br>        )</pre><pre>    request = documentai.ProcessRequest(<br>        name=processor_name, raw_document=raw_document<br>    )<br>    result = client.process_document(request=request)<br>    document = result.document</pre><pre>    words, boxes = [], []<br>    for page in document.pages:<br>        img_w = page.dimension.width<br>        img_h = page.dimension.height<br>        for token in page.tokens:<br>            text_anchor = token.layout.text_anchor<br>            word = &quot;&quot;.join(<br>                document.text[seg.start_index:seg.end_index]<br>                for seg in text_anchor.text_segments<br>            ).strip()<br>            if not word:<br>                continue</pre><pre>            # Bounding polygon vertices are normalised (0–1); scale to 0–1000<br>            verts = token.layout.bounding_poly.normalized_vertices<br>            xs = [v.x for v in verts]<br>            ys = [v.y for v in verts]<br>            norm_box = [<br>                int(min(xs) * 1000), int(min(ys) * 1000),<br>                int(max(xs) * 1000), int(max(ys) * 1000),<br>            ]<br>            words.append(word)<br>            boxes.append(norm_box)</pre><pre>    return words, boxes</pre><blockquote><strong><em>⚠️ Bounding box normalisation is critical.</em></strong><em> If you forget to scale boxes to 0–1000, the model will silently fail with no obvious error. This is one of the most common gotchas when starting out.</em></blockquote><h3>Step 2: Annotate with BIO labels</h3><p>For entity extraction (Named Entity Recognition), each word gets a BIO label: B- marks the beginning of an entity, I- marks continuation, and O means it&#39;s not an entity. We use <strong>Label Studio</strong> for annotation.</p><p>Each document is stored as a JSON file with this structure:</p><pre>{<br>  &quot;id&quot;: &quot;doc_0001&quot;,<br>  &quot;words&quot;: [&quot;Invoice&quot;, &quot;No.&quot;, &quot;INV-2024-0042&quot;, ...],<br>  &quot;bboxes&quot;: [[42, 68, 132, 89], [138, 68, 172, 89], ...],<br>  &quot;ner_tags&quot;: [&quot;O&quot;, &quot;O&quot;, &quot;B-INVOICE_ID&quot;, ...],<br>  &quot;image_path&quot;: &quot;images/doc_0001.png&quot;<br>}</pre><blockquote><strong><em>💡 Typical entity types for invoices:</em></strong><em> </em><em>INVOICE_ID, </em><em>VENDOR_NAME, </em><em>VENDOR_ADDRESS, </em><em>PO_NUMBER, </em><em>INVOICE_DATE, </em><em>DUE_DATE, </em><em>LINE_ITEM_DESC, </em><em>SUBTOTAL, </em><em>TAX, </em><em>TOTAL. Define labels based on what your downstream application actually needs.</em></blockquote><h3>Setting Up the Environment</h3><p>One of the biggest quality-of-life improvements in LayoutLMv3 is that it no longer needs Detectron2. The standard Hugging Face transformers library is all you need.</p><pre># Core dependencies<br>pip install transformers datasets seqeval Pillow easyocr</pre><pre># For training<br>pip install accelerate</pre><pre># Optional: experiment tracking<br>pip install wandb</pre><pre># Verify your GPU is available (run this in a Colab cell)<br>python -c &quot;import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))&quot;</pre><p>We train on Google Colab using a T4 GPU (available on Colab free) or a V100/A100 on Colab Pro. On a single Colab GPU, set per_device_train_batch_size to 2 and use gradient accumulation to simulate a larger effective batch size.</p><h3>Preprocessing &amp; Tokenization</h3><p>LayoutLMv3 has a unified processor that handles both text tokenization and image feature extraction in one call. One thing to be careful about: a single word can be split into multiple sub-word tokens by the tokenizer. You need to make sure labels and bounding boxes are correctly propagated to each sub-token.</p><pre>from transformers import LayoutLMv3Processor<br>from PIL import Image</pre><pre>processor = LayoutLMv3Processor.from_pretrained(<br>    &quot;microsoft/layoutlmv3-base&quot;,<br>    apply_ocr=False   # We supply our own OCR output<br>)</pre><pre>LABEL2ID = {<br>    &quot;O&quot;: 0,<br>    &quot;B-INVOICE_ID&quot;: 1, &quot;I-INVOICE_ID&quot;: 2,<br>    &quot;B-VENDOR_NAME&quot;: 3, &quot;I-VENDOR_NAME&quot;: 4,<br>    &quot;B-TOTAL&quot;: 5, &quot;I-TOTAL&quot;: 6,<br>    # ... add all your entity types<br>}</pre><pre>def encode_example(example):<br>    image = Image.open(example[&quot;image_path&quot;]).convert(&quot;RGB&quot;)<br>    word_labels = [LABEL2ID[t] for t in example[&quot;ner_tags&quot;]]</pre><pre>    encoding = processor(<br>        image,<br>        example[&quot;words&quot;],<br>        boxes=example[&quot;bboxes&quot;],<br>        word_labels=word_labels,<br>        truncation=True,<br>        padding=&quot;max_length&quot;,<br>        max_length=512,<br>        return_tensors=&quot;pt&quot;,<br>    )<br>    return {k: v.squeeze() for k, v in encoding.items()}</pre><blockquote><strong><em>💡 Label propagation:</em></strong><em> The processor automatically assigns the word label to the </em>first<em> sub-token and pads subsequent ones with </em><em>-100 (PyTorch&#39;s ignore index). You don&#39;t have to handle this manually.</em></blockquote><h3>Training the Model</h3><p>We use Hugging Face’s Trainer API, which handles the training loop, evaluation, and checkpointing for us.</p><pre>from transformers import (<br>    LayoutLMv3ForTokenClassification,<br>    TrainingArguments, Trainer<br>)</pre><pre># Load the pre-trained model with our label set<br>model = LayoutLMv3ForTokenClassification.from_pretrained(<br>    &quot;microsoft/layoutlmv3-base&quot;,<br>    num_labels=len(LABEL2ID),<br>    id2label={v: k for k, v in LABEL2ID.items()},<br>    label2id=LABEL2ID,<br>)</pre><pre>args = TrainingArguments(<br>    output_dir=&quot;./layoutlmv3-output&quot;,<br>    learning_rate=1e-5,<br>    lr_scheduler_type=&quot;cosine&quot;,<br>    warmup_ratio=0.1,<br>    per_device_train_batch_size=2,    # Keep low for Colab GPU<br>    per_device_eval_batch_size=2,<br>    gradient_accumulation_steps=8,   # Effective batch size = 16<br>    num_train_epochs=15,<br>    weight_decay=0.01,<br>    evaluation_strategy=&quot;epoch&quot;,<br>    save_strategy=&quot;epoch&quot;,<br>    load_best_model_at_end=True,<br>    metric_for_best_model=&quot;eval_f1&quot;,<br>    fp16=True,                          # Half-precision for speed<br>    logging_steps=25,<br>)</pre><p>For the training loop, we use seqeval to compute entity-level F1 — this is the right metric for NER tasks (more on this in the next section).</p><pre>from seqeval.metrics import f1_score<br>import numpy as np</pre><pre>ID2LABEL = {v: k for k, v in LABEL2ID.items()}</pre><pre>def compute_metrics(p):<br>    predictions, labels = p<br>    predictions = np.argmax(predictions, axis=2)</pre><pre>    true_labels, true_preds = [], []<br>    for pred_seq, label_seq in zip(predictions, labels):<br>        true_labels.append([ID2LABEL[l] for l in label_seq if l != -100])<br>        true_preds.append([ID2LABEL[p] for p, l in zip(pred_seq, label_seq) if l != -100])</pre><pre>    return {&quot;eval_f1&quot;: f1_score(true_labels, true_preds)}</pre><pre>trainer = Trainer(<br>    model=model, args=args,<br>    train_dataset=train_dataset,<br>    eval_dataset=eval_dataset,<br>    tokenizer=processor,<br>    compute_metrics=compute_metrics,<br>)</pre><pre>trainer.train()<br>trainer.save_model(&quot;./best-layoutlmv3&quot;)</pre><h3>Running Inference</h3><p>At inference time, the pipeline mirrors training: run OCR → normalise bounding boxes → pass through the processor → run the model → decode predictions back to word-level entities.</p><pre>from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor<br>from PIL import Image<br>import torch</pre><pre>model = LayoutLMv3ForTokenClassification.from_pretrained(&quot;./best-layoutlmv3&quot;)<br>processor = LayoutLMv3Processor.from_pretrained(&quot;./best-layoutlmv3&quot;, apply_ocr=False)<br>model.eval()</pre><pre>def extract_entities(image_path):<br>    image = Image.open(image_path).convert(&quot;RGB&quot;)<br>    words, boxes = run_ocr(image_path)</pre><pre>    encoding = processor(<br>        image, words, boxes=boxes,<br>        truncation=True, max_length=512, return_tensors=&quot;pt&quot;<br>    )<br>    with torch.no_grad():<br>        outputs = model(**encoding)</pre><pre>    predictions = outputs.logits.argmax(-1).squeeze().tolist()<br>    token_boxes  = encoding[&quot;bbox&quot;].squeeze().tolist()</pre><pre>    entities, current = [], None<br>    for pred, box in zip(predictions, token_boxes):<br>        label = model.config.id2label[pred]<br>        if label.startswith(&quot;B-&quot;):<br>            if current: entities.append(current)<br>            current = {&quot;type&quot;: label[2:], &quot;box&quot;: box}<br>        elif label.startswith(&quot;I-&quot;) and current:<br>            pass<br>        else:<br>            if current: entities.append(current)<br>            current = None<br>    if current: entities.append(current)<br>    return entities</pre><h3>The full pipeline at a glance</h3><pre>Document Image → OCR (Document AI) → Normalise BBoxes 0–1000 → LayoutLMv3 Processor → Fine-tuned Model → Entity JSON</pre><h3>Tips for Production</h3><h3>OCR is the bottleneck</h3><p>The model’s forward pass is fast. Google Document AI handles OCR reliably and at scale, but it does add network round-trip latency. For high-throughput workloads, consider batching document requests, running OCR asynchronously, and caching results so you’re not re-processing the same document twice.</p><h3>Multi-page documents</h3><p>LayoutLMv3 processes one page at a time (max 512 tokens). For multi-page documents, run the model page by page and merge entity predictions across pages in a post-processing step.</p><h3>Class imbalance</h3><p>Most tokens in a document are labelled O (not an entity), which causes class imbalance. We address this with weighted cross-entropy loss — giving higher weight to rare entity types so the model doesn&#39;t just learn to predict O for everything.</p><pre>import torch.nn as nn</pre><pre>class_counts = torch.tensor(<br>    [token_label_counts[i] for i in range(num_labels)], dtype=torch.float<br>)<br>class_weights = 1.0 / (class_counts + 1e-6)<br>class_weights = class_weights / class_weights.sum() * num_labels<br>class_weights = class_weights.to(device)</pre><pre>loss_fct = nn.CrossEntropyLoss(weight=class_weights, ignore_index=-100)</pre><h3>Model versioning</h3><p>We version all fine-tuned models on the Hugging Face Hub (private repo) and tag each release with the dataset version, training date, and evaluation metrics. In production, we log per-document confidence scores and route low-confidence predictions to a human review queue.</p><h3>Key Takeaways</h3><p>LayoutLMv3 has become a core part of our document intelligence stack at Imaginist.ai. Fine-tuning it took roughly three weeks of end-to-end effort — annotation, preprocessing, tuning, and production integration — but the improvement over regex and rule-based approaches was dramatic.</p><p>Here’s what we’d tell any team starting this journey:</p><ul><li><strong>Start with a public dataset</strong> (CORD or FUNSD) to validate your pipeline before investing in proprietary annotation.</li><li><strong>OCR quality is the ceiling.</strong> A perfectly annotated dataset can’t fix bad OCR. Get your OCR right first.</li><li><strong>Use entity-level F1, not token accuracy.</strong> Token accuracy is misleading because most tokens are O. Entity-level F1 from seqeval is the right metric.</li><li><strong>Bounding box normalisation matters.</strong> Make absolutely sure your boxes are scaled to 0–1000. Silent failures here are very hard to debug.</li><li><strong>Watch per-entity F1 during training.</strong> If a specific entity type has low F1, it probably needs more annotated examples before you invest time in hyperparameter tuning.</li></ul><p><strong>Resources:</strong> <a href="https://huggingface.co/microsoft/layoutlmv3-base">LayoutLMv3 on HuggingFace</a> · <a href="https://huggingface.co/docs/transformers/model_doc/layoutlmv3">Transformers docs</a> · LayoutLMv3 paper (Huang et al., ACM MM 2022) · FUNSD dataset · CORD dataset</p><p><em>© 2025 Imaginist.ai · Engineering Blog</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6c5edd13453" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/fine-tuning-layoutlmv3-for-intelligent-document-processing-c6c5edd13453">Fine-Tuning LayoutLMv3 for Intelligent Document Processing</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Document Intelligence for Insurance]]></title>
            <link>https://medium.com/imaginist/document-intelligence-for-insurance-01c7a4dda156?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/01c7a4dda156</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-agentic-workflow]]></category>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[document-intelligence]]></category>
            <category><![CDATA[agentic-workflow]]></category>
            <dc:creator><![CDATA[Prashanth Chandran]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 17:55:20 GMT</pubDate>
            <atom:updated>2026-08-14T17:55:22.277Z</atom:updated>
            <content:encoded><![CDATA[<h3>Executive Summary</h3><p>Insurance remains one of the most document-intensive industries in the world. Every stage of the insurance lifecycle — submissions, underwriting, claims, renewals, and audits — generates and consumes documents at extraordinary scale. Despite a decade of digitization efforts, 30–40% of all insurance transactions still originate as paper or scanned forms, and 85–90% of all documents require manual or AI-assisted extraction.</p><p>This article examines how modern document intelligence architectures address this challenge. We evaluate four leading model architectures spanning three generations of Document AI, explain our rationale for selecting Google Cloud Vision OCR + LayoutLMv3 for structured form extraction and IBM’s Granite-Docling for unstructured document processing, and walk through the production agentic pipeline that integrates them. The pipeline incorporates document fingerprinting for automatic form recognition, a self-improving learning loop that expands the system’s recognition vocabulary with every new form it encounters, and a five-layer architecture that progresses from layout understanding through precision OCR, structured extraction, LLM-based reasoning, and agentic orchestration.</p><p>Our key finding is that no single model dominates across all insurance document types. Structured forms with fixed layouts require fine-tunable, spatially-aware encoders; unstructured documents with variable layouts require models optimized for document conversion and layout understanding. The production stack must combine both approaches within a unified agentic framework — and must be designed to improve continuously as new form types are encountered.</p><h3>The Document Problem in Insurance</h3><p>Despite significant digitization over the past decade, a substantial portion of insurance documentation still arrives as scanned images, faxed forms, or unstructured PDFs. These documents span two fundamentally different categories:</p><p><strong>Structured forms</strong> with fixed layouts and known field positions (e.g., ACORD forms or submission forms), where the extraction challenge is mapping text to predefined fields with high accuracy.</p><p><strong>Unstructured documents</strong> with variable layouts where critical data could appear anywhere on the page (e.g., loss runs, financial statements, broker emails), where the challenge is understanding document structure, reading order, and semantic meaning.</p><p>Each category demands a different extraction approach — and getting this wrong means manual rekeying, processing delays, and underwriting errors that directly impact loss ratios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*0njLpuzUUuFsSjU-L1vWTA.png" /></figure><h3>Commercial Lines Insurance: The Hardest Document Challenge</h3><p>Professional liability lines — Directors &amp; Officers (D&amp;O) liability, Errors &amp; Omissions (E&amp;O), Marine, Cyber — are among the most document-heavy segments in insurance. Submissions typically arrive through brokers as email attachments containing multi-document PDF packages: ACORD application forms, historical loss runs, audited financial statements, board meeting minutes, supplemental questionnaires, and broker specification sheets.</p><p>Unlike personal lines where submissions follow predictable templates, specialty submissions have no standard structure. Every broker packages them differently, every carrier requests different supplemental information, and document quality ranges from clean digital PDFs to faxed scans with degraded image quality.</p><p>The intake burden falls on underwriting operations teams. Before an underwriter can evaluate risk, assistants must manually index each document in the package, identify the form types, extract key risk parameters — policy limits, retroactive dates, prior claims history, revenue figures — and rekey them into the carrier’s underwriting platform. Industry estimates place annual processing time at several hours to days per submission, depending on the complexity of the account and the completeness of the broker package. This is precisely the problem intelligent document processing is built to solve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*lpreH0mzeESLSLHJ0oChNQ.png" /></figure><h3>Evolution of Document AI with LLMs</h3><p>AI adoption in insurance surged 87% in 2025, with generative and agentic AI accounting for 68% of new deployments. Claims management leads adoption at 37%, followed by underwriting at 21%. At the core of this shift is document intelligence — the ability to convert unstructured PDFs, scanned forms, and multi-document submission packages into structured, actionable data.</p><p>The technology has evolved through three distinct generations:</p><p><strong>Generation 1 — Template-Based OCR (2015–2019):</strong> Delivered high precision on known form formats but could not adapt to new layouts. Each new form type required manual template creation, making the approach brittle and expensive to maintain at scale.</p><p><strong>Generation 2 — Layout-Aware Models (2020–2023):</strong> Led by Microsoft’s LayoutLMv3 and NAVER’s Donut, these models learned to jointly understand text, spatial position, and visual structure. They could generalize across form variants and handle multi-modal inputs (text + image + layout coordinates).</p><p><strong>Generation 3 — LLM-Augmented Document Intelligence (2024–present):</strong> Combines layout understanding with large language model reasoning, producing models that don’t just extract fields but can reason across documents, validate data against business context, and handle multi-step extraction tasks. DocLayLLM and Granite-Docling represent this generation.</p><p>We evaluated four architectures from across these generations to identify the right production stack for insurance document processing. The following sections walk through each model, our evaluation criteria, and the rationale behind our architecture choices.</p><h3>Document Architectures</h3><h3>LayoutLMv3 (Microsoft, 2022)</h3><p>LayoutLMv3 is an encoder-only multimodal Transformer that jointly attends to text tokens, 196 image patches, and 2D bounding-box coordinates using bidirectional attention. Pre-trained with masked language modeling, masked image modeling, and word-patch alignment objectives, it learns to associate text with its spatial position and visual context on the page.</p><p>Key characteristics:</p><ul><li>Achieves 93.56 F1 on the FUNSD benchmark (LARGE variant, 368M parameters), representing state-of-the-art performance on form understanding tasks.</li><li>Detects checkbox states via image patches, a critical capability for insurance forms.</li><li>Supports fine-tuning for domain-specific form extraction — the key differentiator for our use case.</li><li>Requires external OCR (we use Google Cloud Vision) to provide text tokens and bounding box coordinates as input.</li><li>Licensed CC BY-NC-SA 4.0 (non-commercial weights; the architecture itself is Apache 2.0). Production deployment requires training custom weights on proprietary data, which we do through our Intelligent Doc Training pipeline.</li></ul><h3>Donut (NAVER CLOVA, 2022)</h3><p>Donut is an OCR-free encoder-decoder model that reads directly from raw pixel input. A Swin Transformer encoder processes document images at 2048×1536 resolution; a BART-based decoder generates structured JSON output representing the extracted fields.</p><p>Key characteristics:</p><ul><li>Scores 95.30% on RVL-CDIP document classification, demonstrating strong visual understanding.</li><li>Handles checkboxes, stamps, and handwriting natively without a separate OCR step.</li><li>At approximately 200M parameters with an MIT license, it is the most deployment-friendly option for organizations with limited fine-tuning infrastructure.</li><li>Fine-tuned per form type with a defined output schema, producing structured JSON for each document class.</li><li>Trades character-level precision on dense text for pipeline simplicity — a meaningful tradeoff for forms with extensive fine-print clauses.</li></ul><h3>DocLayLLM (CVPR 2025)</h3><p>DocLayLLM bridges LayoutLMv3’s encoder with Llama 3–8B’s reasoning capabilities. It initializes visual and layout encoders from LayoutLMv3 weights and projects them into the LLM embedding space via MLP projectors. Chain-of-thought pre-training and annealing teach the model step-by-step document reasoning.</p><p>Key characteristics:</p><ul><li>Outperforms prior models zero-shot across most document understanding benchmarks, excelling at multi-line extraction common in insurance forms (e.g., itemized loss histories, multi-year financial tables).</li><li>At approximately 8.5 billion parameters, it is the most capable but also the heaviest option, requiring significant compute for both inference and fine-tuning.</li><li>Non-commercial license limits direct production use, but the encoder-decoder bridge architecture serves as an important architectural blueprint that we benchmark against.</li><li>When commercially-licensed models matching this pattern emerge, they will likely represent the definitive architecture for insurance document intelligence.</li></ul><h3>Granite-Docling (IBM, 2026)</h3><p>Granite-Docling is a compact 258M-parameter vision-language model that replaces multi-stage document processing pipelines with a single forward pass. A SigLIP2 encoder paired with a Granite 3 decoder generates DocTags markup that preserves tables, equations, reading order, and hierarchical document structure.</p><p>Key characteristics:</p><ul><li>Part of the Docling ecosystem (37K+ GitHub stars), with MCP integration for agentic workflows and support for vLLM/ONNX deployment.</li><li>Apache 2.0 licensed, OCR-free, and production-ready — the most permissively licensed option in our evaluation.</li><li>Optimized for document conversion and layout understanding rather than field-level extraction. This makes it ideal for unstructured documents where the goal is to produce a structured representation, not extract specific form fields.</li><li>512×512 input resolution limits fine-print accuracy on dense forms, which is why we pair it with GCV OCR + LayoutLMv3 for structured extraction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*Fvhm_YoRsQV1icHMijNfHw.png" /></figure><h3>Architecture Selection Rationale</h3><p>For structured insurance documents — submissions, claims, ACORD forms — we selected <strong>Google Cloud Vision OCR + LayoutLMv3</strong> as the primary extraction pipeline. LayoutLMv3’s multimodal architecture (text + layout + vision) delivers the highest accuracy on form extraction tasks, and critically, it supports fine-tuning on domain-specific forms. This means we can train it on carrier-specific ACORD variants, D&amp;O supplemental questionnaires, and state-specific filings, achieving extraction accuracy that generic models cannot match. Google Cloud Vision OCR provides the character-level precision, confidence scores, and handwriting recognition that LayoutLMv3 consumes as input.</p><p>For unstructured documents — loss runs, financial statements, medical reports, legal briefs — we use <strong>Granite-Docling (Apache 2.0)</strong> for automatic layout understanding, table extraction, section parsing, and reading order detection. These documents have no fixed template, so LayoutLMv3’s form-field approach does not apply. Docling’s strength lies in converting complex, variable-layout PDFs into structured representations that downstream agents can reason over.</p><h3>Why Not a Single Model?</h3><p>A natural question is why we don’t use a single model for both document types. The answer is architectural: structured form extraction requires a fine-tunable encoder that can learn field-to-label mappings with sub-pixel spatial precision, while unstructured document processing requires a model optimized for layout understanding and semantic parsing at the document level. LayoutLMv3 excels at the former; Granite-Docling excels at the latter. Attempting to use LayoutLMv3 on unstructured loss runs or Granite-Docling for precise field extraction on ACORD forms would produce inferior results in both cases.</p><h3>Alternative Models</h3><p><strong>Donut (MIT licensed)</strong> remains a viable alternative for end-to-end structured extraction including checkbox states, particularly for organizations where fine-tuning infrastructure is limited or where the OCR-free pipeline simplicity is a priority.</p><p><strong>DocLayLLM’s encoder-decoder bridge pattern</strong> continues to serve as the architectural blueprint we benchmark against. Its chain-of-thought reasoning capability is particularly compelling for complex multi-page extraction tasks. When commercially-licensed models matching this pattern emerge, they will likely represent the next evolution in our production stack.</p><h3>Production Architecture</h3><p>The production system is an agentic document intelligence pipeline that ingests insurance documents, splits processing by structure type, validates against business rules, and learns from every new form it encounters. The architecture comprises five layers:</p><p><strong>Layer 1 — Layout Understanding:</strong> Granite-Docling performs document type classification, page segmentation, table detection, and reading order analysis across both structured and unstructured documents.</p><p><strong>Layer 2 — Precision OCR:</strong> Google Cloud Vision extracts character-level text with confidence scores and handwriting recognition on structured forms.</p><p><strong>Layer 3 — Structured Extraction:</strong> LayoutLMv3, fine-tuned per form type, performs field-level extraction including checkboxes, signature detection, and multi-value fields. Fine-tuning through our Intelligent Doc Training pipeline is the key differentiator — each new form type produces domain-specific weights that improve extraction accuracy over time.</p><p><strong>Layer 4 — Reasoning:</strong> RAG-based agents perform cross-document validation, coverage gap analysis, and risk assessment, synthesizing extracted data from both structured and unstructured processing paths.</p><p><strong>Layer 5 — Orchestration:</strong> Agentic workflows via MCP integration coordinate the intake agent, risk profiling agent, pricing agent, compliance agent, and decision orchestrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*Pw8GkXtTb2hAJYzM_ya2nQ.png" /></figure><h3>Pipeline Stages</h3><p><strong>Stage 1: Ingestion</strong></p><p>Documents arrive through multiple channels: Kafka/API integrations, email inboxes, broker portals, and submission agents. An event listener triggers processing for each incoming document, normalizing the input regardless of channel.</p><p><strong>Stage 2: Pre-Processing</strong></p><p>Three agents work in sequence. The Workflow Agent orchestrates the pipeline and manages state transitions. The Doc Quality Verifier assesses image quality, readability, and page orientation, flagging low-quality scans for re-scanning before extraction. The Doc Classifier identifies the document type using Granite-Docling’s classification capabilities. A Process Verification Agent confirms that all mandatory documents for the submission type are present, flagging incomplete packages for broker follow-up.</p><p><strong>Stage 3: Structured Extraction</strong></p><p>For ACORD forms, claims documents, and other structured submissions:</p><ul><li>The Doc Processor Agent invokes Google Cloud Vision OCR + fine-tuned LayoutLMv3 for spatial field extraction, mapping text to form fields using the model’s learned spatial attention.</li><li>Field-level confidence scoring validates extraction quality. Fields below the confidence threshold are flagged for human review.</li><li>The Doc Fingerprinting Agent checks whether the form layout is already known.</li><li>Known forms flow to the Doc Write Agent for database persistence.</li><li>Unknown forms route to the Intelligent Doc Training studio where human operators define new field mappings, producing training data that generates fine-tuned weights for future extraction.</li></ul><p><strong>Stage 4: Unstructured Extraction</strong></p><p>For loss runs, financial statements, medical reports, and other variable-layout documents:</p><ul><li>The Doc Extraction Agent, powered by Granite-Docling, handles layout understanding and data extraction without OCR dependencies.</li><li>Extracted content is indexed into a vector store via the RAG Index Agent.</li><li>The RAG Agent makes extracted content searchable and available for downstream reasoning tasks.</li></ul><p><strong>Stage 5: Validation and Disposition</strong></p><p>Both processing paths converge at the Submission Claims Business Rules Agent for domain-specific validation:</p><ul><li>Low-confidence results route to underwriters via a human-in-the-loop review queue with pre-populated suggestions.</li><li>High-confidence submissions proceed to the Process Automated Workflow Agent for straight-through processing.</li><li>All extractions are versioned with full audit logs, enabling compliance review and model performance tracking.</li></ul><h3>Document Fingerprinting</h3><p>When a D&amp;O submission or any structured document enters the pipeline, the Doc Fingerprinting Agent answers one question: <em>have we seen this form layout before?</em></p><p>The agent takes two inputs — the document image or PDF, and metadata from the intake channel covering the broker, product code, submission type, and source. Rather than analyzing the content of a form, the agent analyzes its <strong>structural layout</strong> — where field labels are positioned, how sections are arranged, what the grid structure of the tables looks like, and where checkboxes and signature blocks sit.</p><p>From this analysis, two hashes are derived:</p><p><strong>Form Layout Hash</strong> — Captures the spatial DNA of the document including field section arrangement, table grids, and checkbox and signature blocks.</p><p><strong>Provider Hash</strong> — Captures the provider’s identity derived from intake metadata such as the broker, product code, submission type, and source channel.</p><p>These two hashes are combined into a single <strong>Final Fingerprint</strong> — a combination hash uniquely identifying this form as submitted by this specific provider. This means the same physical form submitted by two different providers will produce two distinct fingerprints, enabling provider-aware form definition management.</p><p>When a new form enters the pipeline, the agent computes its Final Fingerprint and checks it against the Form Definition Registry. If the fingerprint is found, the registry already holds a form definition for this exact layout and provider combination, and processing continues immediately using the existing field mappings with no human intervention required. If the fingerprint is not found, the form routes to the Intelligent Doc Training Studio where a human defines the field mappings from scratch. Once complete, a new form definition is created and stored in the registry keyed to this fingerprint, and the system will recognize it automatically on all future submissions.</p><h3>Fingerprint Details and Comparison</h3><p>Users can view the full breakdown of any computed fingerprint through the Fingerprint Details panel. This provides a structural summary of the document at the time of processing — covering the number of pages, table count and column-row composition, checkbox count, text content blocks and field labels, signature blocks, line structures and dividers, and any other layout elements relevant to the document type.</p><p>We also support direct comparison between any two form fingerprints. Four outcomes are possible:</p><p><strong>Exact</strong> — Both the Form Layout Hash and the Provider Hash are identical. The two submissions are the same form from the same provider with no differences, and the existing form definition applies fully.</p><p><strong>Different Provider</strong> — The Form Layout Hash is the same, but the Provider Hash differs. The structural layout is identical, but the submissions come from different providers such as a different broker or source channel.</p><p><strong>Minor Change</strong> — The fingerprints differ with small divergence detected in the Form Layout Hash. The layout is similar but not identical to a known form, which occurs frequently in insurance where carriers modify standard ACORD forms with supplemental questions, different field ordering, or state-specific addenda. The agent creates a new version of the closest matching form definition, inheriting the base field mappings and flagging only the structural differences for human review.</p><p><strong>Different</strong> — The Form Layout Hash has no meaningful match in the registry, indicating an entirely different form with no recognizable structural relationship to any known definition. The document routes to the Intelligent Doc Training Studio for full manual mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*kioM1zbRsCFfM5cJVtHyqg.png" /></figure><h3>Intelligent Doc Training Studio</h3><p>The Intelligent Doc Training Studio is the self-improving engine at the heart of the pipeline. When the fingerprinting agent encounters an unknown or variant form, the system routes it to this training interface where human operators can:</p><ul><li>Visually map document elements directly to data source fields using a drag-and-drop interface.</li><li>Define extraction schemas for new form types, specifying field names, data types, validation rules, and spatial regions.</li><li>Correct extraction errors on existing form types, providing ground truth annotations that feed back into the training loop.</li></ul><p>These corrections and mappings are processed through a continuous improvement pipeline:</p><ul><li>Human annotations are collected and validated for quality.</li><li>Data augmentation techniques (rotation, scaling, noise injection, synthetic field variations) expand the training set from limited examples.</li><li>Fine-tuning jobs execute on scheduled MLDevOps recurrent pipelines, producing updated LayoutLMv3 weights for the specific form type.</li><li>Updated weights are deployed to the extraction pipeline, immediately improving accuracy for that form type.</li><li>Performance metrics are tracked across fine-tuning iterations, ensuring each update demonstrably improves extraction quality.</li></ul><p>This closed-loop architecture means the system gets measurably better with every document it processes. The initial deployment may require significant human oversight, but as the form registry grows and fine-tuned weights accumulate, straight-through processing rates increase steadily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Mri1JcCPAuj5psD3yOSKEA.png" /></figure><h3>Document Training and Fine Tuning</h3><p>Document Studio allows you to make correction to document mapping and adding new field mapping .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*FcpteJfHvhanzUNniSwbJA.png" /></figure><h3>Key Findings and Recommendations</h3><h3>No Single Model Dominates</h3><p>Our evaluation confirms that no single Document AI model addresses all insurance document processing needs. Structured forms require fine-tunable, spatially-aware encoders with high field-level precision. Unstructured documents require models optimized for layout understanding and document conversion. The production stack must combine both.</p><h3>Fine-Tuning Is the Differentiator</h3><p>The most significant accuracy gains come not from switching between base models but from domain-specific fine-tuning. A LayoutLMv3 model fine-tuned on carrier-specific ACORD variants consistently outperforms larger, more capable models used zero-shot. Organizations investing in document intelligence should prioritize fine-tuning infrastructure over model scale.</p><h3>The Self-Improving Loop Compounds Value</h3><p>The document fingerprinting and intelligent training pipeline creates a compounding advantage. Each new form type encountered, mapped, and trained becomes a permanent capability. Over time, the proportion of documents requiring manual intervention decreases while extraction accuracy increases — a self-reinforcing flywheel.</p><h3>Licensing Constrains Production Choices</h3><p>The non-commercial licenses on LayoutLMv3’s pre-trained weights and DocLayLLM mean that production deployments must either train custom weights from scratch (as we do) or use commercially-licensed alternatives. Granite-Docling’s Apache 2.0 and Donut’s MIT licenses make them the most deployment-friendly options. Licensing should be evaluated as a first-order architectural constraint, not an afterthought.</p><h3>Agentic Orchestration Unlocks Full Value</h3><p>Document extraction in isolation produces limited value. The five-layer architecture — progressing from layout understanding through OCR, structured extraction, reasoning, and orchestration — enables the system to not just extract data but validate it against business rules, flag anomalies, and route decisions through automated workflows. The agentic layer transforms document intelligence from a data entry replacement into a decision support system.</p><h3>Conclusion</h3><p>Insurance document processing sits at the intersection of two technical challenges: extracting structured data from fixed-layout forms with high field-level accuracy, and understanding variable-layout documents well enough to make their content searchable and actionable. Neither challenge is solved by a single model, and neither is solved by extraction alone — the extracted data must be validated, enriched, and routed through business workflows to deliver value.</p><p>Our production architecture addresses this by combining Google Cloud Vision OCR + LayoutLMv3 for structured extraction with Granite-Docling for unstructured processing, wrapped in an agentic pipeline that handles ingestion, classification, fingerprinting, validation, and continuous learning. The document fingerprinting system ensures that every new form type encountered expands the system’s capability, while the Intelligent Doc Training Studio creates a closed loop between human expertise and model improvement.</p><p>The results are measurable: reduced manual rekeying, faster submission-to-bind cycles, lower error rates in underwriting data, and a system that gets demonstrably better with every document it processes. For specialty lines like D&amp;O, where 75–90% of submission documents are unstructured and processing times are measured in days, the impact on operational efficiency and underwriting quality is substantial.</p><p>Looking ahead, the emergence of commercially-licensed models following DocLayLLM’s encoder-decoder bridge pattern will likely represent the next inflection point. These models will combine LayoutLMv3-class spatial precision with LLM-class reasoning, potentially collapsing our two-model approach into a single architecture. Until then, the dual-model approach with continuous fine-tuning delivers the strongest production results for insurance document intelligence.</p><p><em>About Imaginist — Imaginist is a secure enterprise AI software provider specializing in building intelligent application services for the insurance and financial services sector. The Imaginist Agentic AI Platform provides comprehensive toolsets and services to create intelligent enterprise-scale AI applications, integrations, and collaborative workflows.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01c7a4dda156" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/document-intelligence-for-insurance-01c7a4dda156">Document Intelligence for Insurance</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insurance Submission Processing]]></title>
            <link>https://medium.com/imaginist/insurance-submission-processing-171c525cf87f?source=rss----6ac47821cbb8---4</link>
            <guid isPermaLink="false">https://medium.com/p/171c525cf87f</guid>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[imaginist]]></category>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[underwriting]]></category>
            <dc:creator><![CDATA[Prashanth Chandran]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 17:54:31 GMT</pubDate>
            <atom:updated>2026-08-14T17:54:30.615Z</atom:updated>
            <content:encoded><![CDATA[<h3>Challenges in Submission intake in the Insurance Industry</h3><p>Insurance companies have invested heavily in digital transformation over the years, yet for many organizations, the very first step of the value chain, submission intake remains manual and inefficient. Companies have progressed from File based applications to digitized semi-automated submission intake systems, but still there are significant inefficiencies across the process that’s holding them back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*nGqmZIpHO16v1sEF" /></figure><h3>Higher cost and effort due to multiple human handovers</h3><p>According to the McKinsey study on insurance 40% of underwriter time is spend on manual tasks. Most companies are leveraging support teams to reduce the load on underwriters. Support teams manually analyze the documents and feed the data into various intake systems. Manual operations increase the cost per application and limit the number of applications that can be processed per month. According to the insurance reports manual underwriting processes are costing traditional insurers about 13 billion USD per year globally in lost efficiency and leakage. Manual processing of the application forms and associated document driven workflows requires long training cycles causing additional financial strain on companies</p><p>Traditional Optical character recognition (OCR) and Robotic Process Automation (RPA ) systems work well when you have a standard application format and very structured input intake process. Traditional OCR is coordinate based, it looks for text at specific coordinates on page, if a customer uses nonstandard form or handwritten note the system breaks, it requires human oversight to correct misreads.</p><p>Similarly traditional RPA relines on structured data, if the customer sends the document with different date format or sends the data in a different location in document the RPA bot breaks</p><p>Manual processing of submission forms and support documents introduces 15% error or compliance risk. Manual processing results in inconsistent risk selection and weak auditability. All these inefficiencies result in increased processing time and longer waiting time for the clients, in most cases day to week. Today’s customers are accustomed to instant digital experiences. Customers abandon products that require long decision cycles.</p><h3>Scalability</h3><p>The most significant impact is on scalability of business; manual dependency prevents business teams from scaling the business. Underwriters struggle to review all the incoming submissions which results in losing potential business.</p><h3>Leveraging GenAI in Submission processing</h3><h3>Deterministic vs Nondeterministic use cases.</h3><p>In underwriting, there are several deterministic and non-deterministic use cases. for e.g. validating the D&amp;B number of the account is a deterministic flow, while analyzing various data formats and documents is nondeterministic in nature, especially due to lack of standardization of the application forms send by the brokers, these non-deterministic use cases can be handled by agentic AI. This approach allows the insurance company to get maximum return of investments with agentic AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4dR30ed2-S6lt_Cm" /></figure><p>Agentic AI use case</p><p>Recently, one large insurance company selling commercial insurance leveraged generative ai to improve their submission intake process. Instead of adopting AI as an individual toolset for employees the company adopted a strategy to leverage AI in core business process. They picked underwriting function for creating a pilot deployment.</p><p>Start small</p><p>They started with a Proof of concept to leverage ai agents in submission processing. The proof of concept showed measurable improvements in processing speed, reduced manual handling, and cleaner downstream workflows. Based on those results, the approach was expanded and rolled out more broadly across the organization.</p><p>Challenges in Submission Processing for the insurance company</p><p>The transformation was especially evident in how submissions were handled. Commercial insurance intake typically involves handling large volumes of financial statements, loss runs, sov files , application forms and other supporting documents submitted by brokers and agents. Underwriters and support staff historically spent significant time reviewing these materials, extracting information and re-entering the same data into multiple internal systems.</p><p>This process was slow, repetitive, and error-prone, it limited the number of submissions that could realistically be reviewed. This impacted on conversion rates and broker experience. As volumes increased across lines of business, these bottlenecks became even more visible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*qK36EJYDutpjk8zM" /></figure><p>Improved submission processing using Agentic AI</p><p>By applying GenAI-driven extraction and workflow automation, much of this manual effort was eliminated. The existing process was heavily manual, slow, and constrained underwriting capacity. A large portion of time was spent reviewing documents, extracting data, and re-entering the same information across multiple systems</p><p>Key data could be identified, structured, and routed automatically, allowing underwriters to focus on decision-making rather than document handling. The result was a significant reduction in intake effort up to 40% along with faster turnaround times and more consistent experience for brokers.</p><p>What started as a targeted experiment ultimately reshaped how submission intake was approached, demonstrating that AI could be embedded into core insurance operations in a practical, scalable way.</p><p>The original goal was to reduce the effort involved in submission intake for both renewals and new business..</p><p>After introducing GenAI into the intake workflow, processing times dropped significantly — on the order of 40–50%. This applied consistently across renewals and new submissions. The reduction in manual effort translated directly into lower operational costs, estimated between $3 to 5M annually.</p><p>One of the more important outcomes was throughput. By removing intake bottlenecks, underwriting teams were able to process materially more submissions without increasing headcount. Submission throughput increased by roughly 30%, which had a direct impact on gross written premium. Based on observed conversion patterns, this translated into an estimated $6 M GWP uplift.</p><p>Another key improvement was coverage. Previously, not all incoming submissions could be reviewed due to capacity limits, which led to missed opportunities and revenue leakage. With automated intake and extraction in place, all submissions could be processed consistently, reducing leakage and improving overall capture rates.</p><p>Broker experience also improved. Faster turnaround times, fewer follow-ups for missing information, and more consistent responses led to higher satisfaction and increased quote requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*-6YdP1hXILklkSmI" /></figure><p>Native AI insurance Agentic Platform Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*2alaovWOCDLsc32O" /></figure><ul><li>Insurance Agents Layer: Insurance Document Agents, Submission intake agents, Claim FNOL Agents, Insurance Integration agents etc.</li><li>Agentic Teams Layer: Collaborative insurance application agent groups that work together with delegator and worker patterns to accomplish insurance business functions.</li><li>Agentic Workflow and Team Orchestrator Layer: Coordination engine managing agent collaboration, task distribution, and workflow execution.</li><li>LLM Models Layer: Flexible integration with multiple LLM providers including OpenAI, Anthropic Claude, Google, Meta Llama, Cohere, and Oracle Cloud AI models.</li><li>Tools, Pipeline, Components, Integration, and UX Cards Layer: Modular building blocks for constructing agentic applications including data connectors, processing pipelines, and user interface components. Prebuild insurance UX screens for deployment.</li><li>Observability Layer: Comprehensive monitoring of all agent operations, token consumption, data flows, and business process execution.</li><li>Security and Governance Layer: Enterprise-grade security controls including access control policies, data protection mechanisms, and audit logging.</li><li>Guardrails Layer: Input and output validation for LLM interactions, PII protection, and content safety enforcement.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*Czo8zrrEYZR0AotV" /></figure><p>The above diagram shows the high-level tasks that are performed by the agentic submission processing system. Multiple agents perform various specialist tasks document classification, data extraction, document storge etc.</p><p>#Insurtech #GenerativeAI #Underwriting #OperationalEfficiency #SubmissionProcessing</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=171c525cf87f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/imaginist/insurance-submission-processing-171c525cf87f">Insurance Submission Processing</a> was originally published in <a href="https://medium.com/imaginist">Imaginist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>