AI Engineer NYC 2026 Online Talks
Reliable, Smart Workflows for Finance, Wealth and Insurance — Karthic Rao, Perpetual
Loading slides…
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
“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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.”
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Develops the learning question left open here: how execution traces, diagnostic feedback and human annotations can improve prompts, agent programs and evaluators.
Full transcript
Loading transcript…