Reliable, Smart Workflows for Finance, Wealth and Insurance — Karthic Rao, Perpetual

Read the talk

Reliable, Smart Workflows for Finance, Wealth and Insurance

Karthic Rao explains how Perpetual turns a multiday wealth-management task into a compiled, approved workflow, with models answering bounded questions and a state machine controlling what happens next.

From a talk by Karthic Rao

At a glance

Ideas worth remembering

  • Represent clarification, missing information, waits, follow-ups and evidence retention as workflow behavior; they account for much of the Harper task.

  • Let the planner translate a request, then use deterministic compilation to validate it against supported actions, ask for clarification or refuse it.

  • Approve both the process and each external action's exact payload. Confirm provisional partial-reply judgments before creating bounded child plans.

  • An unknown side-effect outcome requires manual review in this design, rather than an automatic retry.

  • Small, typed model calls support private-model substitution and structured evaluation. The 95% smaller-model allocation is a design target, and training those models from logged judgments remains future work.

Use intelligence where the workflow needs judgment

A regulated workflow has to accommodate an unpredictable world while keeping execution dependable. Karthic Rao, CTO at Perpetual, approaches that problem through production wealth-management work: Perpetual acquires traditional firms and uses AI to increase their throughput and revenue. A policy violation in that setting carries consequences well beyond a failed software task.

Four constraints shape the architecture. Processes need strategies chosen at runtime because every path cannot be scripted beforehand. Client data is sensitive, creating a need for privately hosted inference. Policy violations have serious consequences. Execution therefore needs deterministic controls, with model judgment introduced only where the task actually requires it.

That leads to a deliberately restrained use of models. Much of a wealth-management process can follow known transitions in a state machine. A few points require interpretation before the system can choose a branch. Rao calls this a “sprinkle of intelligence”: spend model capability on those decisions rather than asking an agent to improvise every next step.

0:000:30
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

“Fill out the IRS W-9 for Mr. Harper” becomes days of work

The example begins with one sentence from a wealth advisor: “Fill out the IRS W-9 for Mr. Harper.” The assistant finds the form in the firm's records or on the IRS website, then searches the system of record. Three Harper households appear. Before filling anything, the assistant asks the advisor which household they mean. The first useful action is a clarification.

The form introduces another kind of branching. “Every form is a small program,” Rao says: an answer changes which question comes next. His W-9 walkthrough illustrates several dependencies:

  • Taxpayer identity: The relevant taxpayer may be the person or, for a disregarded entity, its owner. A foreign person exits this process to a W-8.
  • Tax classification: The choice on line 3A, including an LLC's classification letter where applicable, affects which names belong on lines one and two.
  • Verified identifiers: The form needs the appropriate SSN or EIN, never both, obtained from a verified document rather than memory.
  • Exemptions and signature: Exemption codes depend on the entity; the walkthrough excludes S corporations. The process must also establish who signs under penalties of perjury.

These are examples of the form's decision structure, rather than a complete tax-filing procedure. For the people participating, that structure becomes a question to answer, a document to supply, or a signature to provide.

Once the household is resolved, three required values are missing. The assistant checks both the documents on file and the system of record, then emails the client asking for those three values. Execution now depends on someone outside the firm. If no reply arrives within two days, the assistant follows up and raises the issue at the advisor's daily standup. If the client supplies two values, the next request asks for the remaining one.

When all three values arrive, the assistant completes the form and writes the information back to the system of record with the trail showing how it was obtained. The evidence matters alongside the values. Then comes a second wait: the form goes out for e-signature, with another nudge after a day or two if needed. After signature, the assistant files it, sends an acknowledgement and updates the advisor at the next day's standup.

The apparent data-entry task has become a process spanning days, several systems and two people, with repeated follow-ups. Identity ambiguity, incomplete information, approvals and evidence retention are ordinary parts of the work. An automation architecture has to represent them directly.

2:192:49
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:19 · section reference included

Separate interpretation from permission to act

The Harper example exposes two failure modes. A fixed flowchart without a way to resolve ambiguity stalls at “Which Harper?” An agent allowed to improvise the process creates a different problem: the compliance team cannot approve a dependable account of what it will do. Adding more agency or hard-coding more paths does not, by itself, resolve that tension.

Perpetual divides responsibility by what each part must control:

  • Deterministic execution: Decide what runs next, retain facts and their supporting evidence, and control actions that change the world—writing a record, sending an email or filing a form.
  • Model judgment: Interpret an ambiguous instruction, understand a client's reply, or answer another explicitly typed question.

A model's answer becomes input to the deterministic system. The system decides what that answer permits it to do.

The division also applies when new work emerges. A judgment can lead to a smaller plan, but that plan must pass compilation and approval again. This is how the architecture accommodates runtime strategy without giving a model unrestricted control over the ongoing process.

6:036:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:03 · section reference included

Compile the request against the firm's allowed actions

The request first reaches a model-based planner whose job is translation. It produces a typed semantic graph containing intents, entities, facts, artifacts, events and constraints, including any ambiguities. Every node points back to the words in the request that produced it. That connection makes the planner's interpretation inspectable before execution.

A compiler then processes the graph without calling a model. Eleven deterministic stages either produce an execution DAG—a directed acyclic graph of steps—or fail closed. The three verdicts are valid, needs clarification and refused. Multiple Harper households produce a question rather than a guessed identity. A successfully compiled plan is immutable and pinned by its hash.

What makes a proposed action valid? The compiler checks it against a grammar of 42 typed action contracts spanning forms, documents, email, e-signature, calendar and human steps. Form filling must match the forms contract; an unsupported action or an incorrectly connected action is refused. Rao describes about 40 fail-closed conditions, including cycles and unsupported actions. The same contract digest is pinned in the engine, backend and UI so those components agree on each action's meaning. The useful restriction is also the tradeoff: the planner can request only operations already represented in the firm's grammar.

Where can a request stop before execution? The diagram separates translation from validation and preserves the compiler's three outcomes. Only a valid plan advances toward human approval; ambiguity and invalid operations leave through different branches.

One translation, three compiler outcomes

User requestThe instruction supplies the words to which graph nodes refer.
Model plannerTranslates the request into a typed semantic graph and identifies ambiguities.
Deterministic compilerEleven stages validate the graph against the firm's action contracts.
Valid planAn immutable, hash-pinned execution DAG, subject to human plan approval.
Needs clarificationAsk which Harper instead of guessing.
RefusedReject unsupported actions, invalid wiring or cycles.
The model supplies a source-grounded graph. Deterministic compilation determines whether it can become an approvable execution plan.
Read the diagram as text
  • User request. The instruction supplies the words to which graph nodes refer.
  • Model planner. Translates the request into a typed semantic graph and identifies ambiguities.
  • Deterministic compiler. Eleven stages validate the graph against the firm's action contracts.
  • Valid plan. An immutable, hash-pinned execution DAG, subject to human plan approval.
  • Needs clarification. Ask which Harper instead of guessing.
  • Refused. Reject unsupported actions, invalid wiring or cycles.
  • User request → Model planner: Translate.
  • Model planner → Deterministic compiler: Typed semantic graph.
  • Deterministic compiler → Valid plan: Valid.
  • Deterministic compiler → Needs clarification: Unresolved ambiguity.
  • Deterministic compiler → Refused: Invalid graph or action.
8:018:31
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:01 · section reference included

Approve the plan, then approve the actual payload

The compiled W-9 chase makes the distinction concrete. A person approves the plan before execution. Its work includes finding the form, preparing it for the client, rendering a PDF and drafting an email. Drafting uses a model. Sending requires a separate action approval for that particular email. The workflow then waits for a reply, invokes a judge to read it and verifies the returned form. A matching form can be archived behind another gate; a mismatch leads to follow-up.

Which steps did the planner actually request? Rao identifies PDF rendering, attachment and reply judgment as steps added by the grammar because the contracts require them. This matters because a natural-language request can omit operational prerequisites. Compilation supplies those required steps instead of relying on the planner to remember them. In the presented plan, drafting is marked violet and the inserted steps are dashed.

The dashed outlines mark PDF rendering and attachment as grammar-added steps; the same full plan also shows the reply judge and archive gate.Open full source frame
The dashed outlines mark PDF rendering and attachment as grammar-added steps; the same full plan also shows the reply judge and archive gate.

Waiting is also an explicit plan step. The engine's reply wait defaults to 72 hours, while an explicit deadline can range from one minute to 30 days. These are engine settings, distinct from the two-day follow-up in the earlier human example. When a deadline expires, a rule determines the next action. A model does not have to remember to wake up or decide whether enough time has passed.

The approvals cover different decisions. Plan approval authorizes the proposed process. Each external action, such as an email or signature request, has its own gate. That approval is tied to a hash of the exact payload and checked again immediately before sending. Approving the workflow therefore does not grant blanket permission to send whatever content a later model call produces.

Partial replies show how judgment creates new work without rewriting the approved parent. A reply judge can classify a response as partial, but that judgment remains provisional and the step stays blocked. A person confirms it; only then does the step unblock and a follow-up run as a new child plan. The parent remains unchanged, and follow-up is bounded to at most five rounds. Combined with the earlier compilation rule, that gives adaptation a controlled place to occur.

9:269:56
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:56 · section reference included

Let the state machine own execution and uncertain outcomes

After approval, a state machine chooses each step and records its result. Judgment steps invoke one model call with a fixed schema: compose an email, judge a reply, identify missing values, extract fields or verify a document. The model returns a typed answer. The state machine interprets that answer within the workflow's rules and determines what runs next.

Actions with side effects have their own lifecycle: prepare, dispatching, then succeeded—or outcome unknown followed by manual review when the external world does not answer cleanly. There are no automatic retries. This distinction prevents uncertainty from being treated as a definite failure: if the system cannot tell whether an action happened, repeating it could repeat the external effect. The design accepts manual review at that point rather than guessing its way forward.

Chat can supply an approval or answer a question, giving people a conversational way to participate in those explicit steps. The central execution rule remains Rao's short formulation: “The model steers. It never drives.”

11:4612:15
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:46 · section reference included

Small typed judgments create a path toward private inference

Once planning and execution are separated, most remaining model questions are narrow: Is the reply complete? Does the document match? Which field is which? Rao assigns these to a fast, small-model “flash tier,” reserving frontier models for harder cases. In an illustrative run of 20 decisions, 19 go to the smaller tier and one to the frontier tier. The resulting 95% is a design target illustrated by that run, rather than a measured fleet-wide result. Its architectural value is that the smaller tier can run on hardware the firm controls.

Typed judgments also produce more structured learning material than an undifferentiated agent transcript. Each judgment is logged, and provisional judgments receive human confirmation or rejection. Those records can support evaluation and, eventually, post-training the smaller tier on harder cases previously assigned to a frontier model. Logging and evals exist in the system Rao describes; the training loop is forthcoming. A declining frontier share is the intended result of that roadmap.

The final example returns to a typed call from the Harper workflow. Because the caller expects a small, schema-checked answer, Rao presents switching it to a privately hosted model as a configuration change rather than a workflow rewrite. The same interface shape applies across almost all of the calls. That reduces the integration work of moving inference, although schema compatibility alone does not establish that a replacement model will make equally good judgments.

The ending ties private inference back to the original reliability problem. Keep control flow, evidence and side effects deterministic; give models inspectable points at which to interpret information and exercise judgment. Those points make it possible to change the model behind a decision, evaluate its answers and use confirmed examples to reduce dependence on larger models over time. The question to carry into a regulated workflow is where each of those responsibilities belongs.

12:3513:05
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:35 · section reference included

Resources

Read the complete timestamped transcript
  1. 0:00

    Hello, I'm Karthic, CTO at Perpetual. In this presentation, I'll talk about building workflows that are both reliable and intelligent for finance, wealth, and insurance. In regulated domains, workflows must be reliable enough to meet regulatory standards while still being intelligent enough to handle the real world. In fields such as finance and wealth management, this presents both a technical and a compliance issue. Reliability and intelligence are not opposites. It is up to you where you draw the boundary between them, and that is the point of this talk,

  2. 0:30

    deciding where that boundary lies. For us, it's not merely a thought experiment, but a question that surfaces serious consequences. Perpetual is a wealth management roll-up. We acquire running traditional wealth management firms, and we maximize their throughput and revenue with the help of AI. Wealth management is a regulated industry, and that is where we build with AI in production. Everything in this talk is grounded in building for those constraints. Workflows in finance and wealth management come with

  3. 1:00

    four facts, and each of them pushes the architecture in the same direction. First, they're complex, and they need runtime strategies as the process unfolds. You can't script every path in advance. Second, the data is sensitive, so you need a path to move these workflows entirely onto privately hosted models. Third, in a highly regulated industry, a policy violation isn't a bug report. It has severe consequences. So fourth, execution has to be highly reliable and deterministic. Inject

  4. 1:30

    intelligence only where runtime judgment is genuinely required and minimize reliance on LLMs everywhere else.

  5. 1:38

    AI is spreading through regulated industries, but there's still no consensus on an architecture that gives you high reliability with the least use of LLM intelligence. Meanwhile, most of what developers hear from the big labs is how to burn more tokens. But in a regulated industry, token maxing is the wrong goal. These tasks are close to main. You can lay them out in advance and build them into a massive state machine, and that machine needs only a sprinkle of intelligence to navigate it. Most steps just follow the next edge.

  6. 2:08

    Only at a few judgment points does the model pick a branch. So the intelligent way to build is to use intelligence minimally and on purpose.

  7. 2:19

    Let's make this concrete with a real wealth management workflow. A wealth advisor turns to their assistant and says one sentence: "Fill out the IRS W-9 for Mr. Harper." To a person, that's a simple instruction. Watch what it actually triggers when a human being executes it. The task has complexities that go beyond what meets the eye. First, the assistant finds Form W-9 from the firm's records or from the IRS website. Then they look for Mr. Harper in the system of record and find three Harper

  8. 2:49

    households. So they call the advisor, "Which Harper do you mean?" Only once that ambiguity is resolved do they move on to the form. A lookup, an ambiguity, and a human in the loop, all in the first minute of a one-line task.

  9. 3:08

    Filling a form sounds like data entry. It isn't. Every form is a small program. A W-9 first decides who the taxpayer is, the person or the owner if it's a disregarded entity. A foreign person stops right here because they need a W-8 instead. Then how they're taxed. Exactly one box on line 3A and an LLC adds its letter. That decides which name goes on line one and which on line two. Then whose number, an SSN

  10. 3:38

    or an EIN, never both, taken from a verified document, never from memory. Exemption codes apply only to some entities and never to an S corporation. And finally, who signs under penalties of perjury. Each answer changes the next question, and the people involved only ever see three kinds of gates: a question, a document to collect, or a signature.

  11. 4:04

    Now they start filling the form and realize the system of record is missing three of the values it needs. They check the documents on file and the system of record again, still missing, so they start an email thread with the client asking for exactly those three values. The task now depends on someone outside the firm on their timeline.

  12. 4:29

    And now the workflow waits. The request is with the client, and all three values are still missing. If the client doesn't reply within two days, the assistant follows up and brings it to the advisor at the daily standup. If the client replies with only two of the three values, they follow up again for the missing one. When all three arrive, they complete the form and write the new information back to the system of record, including the trail of how they obtained those values. In this industry, how you know a value matters as much as the value itself.

  13. 5:07

    Once the form is filled, it goes out for e-signature. If the client doesn't sign within a day or two, the assistant nudges them again. Once it's signed, they file it for the client, send the acknowledgement, and update the advisor at the next day's standup. One sentence from the advisor became a process that runs for days, crosses several systems, waits on two people, and loops back on itself more than once.

  14. 5:44

    Look at what's inside that one sentence. Ambiguity to resolve,

  15. 5:50

    data to gather, approvals, waits measured in days, follow-up loops, and an evidence trail at the end.

  16. 6:03

    Workflow automation tools exist, but they rarely handle this real-world complexity and ambiguity. A fixed flowchart breaks at the first which Harper, and the lack of a native system of record with an integration and an agent that improvises its way through is exactly what a compliance team can't sign off on. One breaks on ambiguity, the other can't be signed off. Neither handles what's inside that sentence. So what do we do about it? The fashionable framing is more agency and better models. Give

  17. 6:33

    an agent the whole task and wait for the next model to make it reliable. The reflexive answer, especially inside regulated firms, is the opposite. Less agency, more rules. Lock it down and hard code every path. Both are the wrong axis. In regulated verticals, reliability comes from where you place the boundary between the two, between the parts that must be deterministic and the parts that genuinely need judgment. Here's the principle.

  18. 7:03

    Determinism governs control flow, evidence, and side effects. What runs next, what we know, and how we know it, and anything that changes the world, like a record written, an email sent, or a form filed.

  19. 7:21

    Intelligence provides interpretation and judgment. Reading an ambiguous instruction, deciding which Harper, understanding a client's reply. The model answers a typed question, and the deterministic system decides what to do with the answer, and the interplay is recursive. A judgment can open a new, smaller plan that's compiled, gated, and deterministic again. You'll see that in a moment with follow-ups. The boundary between the two is the design. Here's how that works in the workflow engine we've built.

  20. 8:01

    The request goes to a planner. That is a model call, and its only job is translation. It emits a typed semantic graph of intents, entities, facts, artifacts, events, and constraints, each grounded in the words of the request with any ambiguities it found. Every node points back to the words it came from. That graph goes to a compiler that never calls a model. In eleven deterministic stages, it turns the graph into an execution DAG, or it fails closed.

  21. 8:31

    There are only three verdicts: valid, needs clarification, or refused.

  22. 8:38

    Which Harper comes back as a question, not a guess. The plan is compiled, immutable, and pinned by its hash.

  23. 8:56

    The model translates. The plan is compiled. The compiler checks the plan against a grammar, the vocabulary of what the firm is allowed to do. Forty-two typed action contracts across forms, documents, email, e-signature, calendar, and human steps. Each action the planner asks for has to match a contract. Here, form fill finds its forms contract and locks in. If the planner asks for an action that isn't in the grammar or wires one up wrong,

  24. 9:26

    the compiler refuses. There are about forty ways to fail closed, from a cycle in the graph to an unsupported action, and the same contract digest is pinned in the engine, the back end, and the UI. So all three agree on what an action means. That is what a closed domain buys you. The model can only ask for things the firm already knows how to do safely. Here is a compiled plan for a W-9 chase. Send the client the form, wait for it to come back, check it, and file it.

  25. 9:56

    Before anything runs, a person approves the plan itself. Find the form, prepare it for the client to fill, render the PDF, and draft the email. Drafting is a model call, so it is violet.

  26. 10:12

    Sending is an action gate. Nothing leaves the firm until a person approves that exact email. Then the plan waits for a reply, and a judge steps in to read it.

  27. 10:24

    The returned form is verified. If it matches, it's archived behind another gate. If it doesn't, the plan follows up. Now look at the dashed steps.

  28. 10:35

    Rendering the PDF, attaching it, judging the reply. The planner never asked for them. The grammar added them because the contracts require them. In the story, waiting, approvals, and follow-ups were most of the work. Here, they are nodes in the plan, not prompts. A reply wait defaults to seventy-two hours, and an explicit deadline can be anything from a minute to thirty days. When it passes, a rule decides what happens, not a model. One

  29. 11:05

    approval covers the plan, and every external action, like sending an email or a signature request, has its own gate. The approval is tied to a hash of the exact payload, and it's checked again right before sending. When a client replies with only part of what we asked, the reply judge marks it partial. That judgment is provisional. The step stays blocked until a person confirms it. A person confirms it, and the step unblocks. Then the follow-up runs as a new child plan. The

  30. 11:35

    approved parent is never changed, and there are at most five rounds.

  31. 11:46

    Once a plan is approved, a state machine runs it. It picks every step and records every result. When a step needs judgment, it makes one fixed schema model call. Compose an email, judge a reply, spot missing values, extract fields, verify a document. The answer comes back typed, and the state machine decides what to do with it. Side effects get a life cycle of their own. Prepare, dispatching, succeeded, or when the world doesn't answer cleanly,

  32. 12:15

    outcome unknown and manual review. There are no automatic retries. A chat message can approve a step or answer a question. It can change an already approved plan. The model steers. It never drives.

  33. 12:35

    Now look at what is left for the model to do. Outside the planner, the judgments are small and typed. Is this reply complete? Does this document match? Which field is which? They don't need frontier intelligence. A fast, small model, the flash tier, can handle them. In this illustrative run of twenty decisions, nineteen go to the flash tier and one goes to the frontier. That is why we designed for about ninety-five percent of model decisions in a workflow never needing a frontier

  34. 13:05

    model. And the flash tier can run on hardware you control. Only the genuinely hard cases go to a frontier model.

  35. 13:14

    And the five percent is not a permanent tax because every judgment is typed and logged, and the provisional ones are confirmed or rejected by a person. Each frontier decision produces eval grade distribution real training data by construction. That data can post-train the flash tier. Logging and evals exist today. The training loop is next. So the frontier share shrinks release over release until even the hard cases run locally.

  36. 13:51

    Remember the requirement we started with. Because data is sensitive, you need a path to move workflows entirely to privately hosted LLMs. So can this design really get there? Take one typed call from the Harper Bourbonine plan. Every model call is small, typed, and checked against a schema. So pointing it at a privately hosted model is a configuration change, not a rewrite. One line changes, and the same answer comes back. Every other call has that same

  37. 14:21

    small typed shape, so the same change applies to almost all of them. That is how about ninety-five percent local inference becomes viable as an architectural consequence, not a policy promise. That is the path that sensitive data demands, and compliance risk goes down as an engineering roadmap release by release. So if you remember one thing, don't ask whether your system should have more agency or less. Ask where the boundary is. Let

  38. 14:50

    determinism govern control flow, evidence, and side effects. Let intelligence handle interpretation and judgment. At typed points, you can inspect and use every judgment you log to need less of it next time. Ask where the boundary is.

  39. 15:12

    Thank you. I'm Karthic, CTO at Perpetual. If you're building AI into regulated work, I'd love to compare notes