Quaintitative

How it actually works

A working guide to generative and agentic AI in finance

What generative AI and agents actually do in finance, how the machinery works, and the checks that follow directly from it. Not prompt tricks, and not hype.

Twelve topics, from how a model produces an answer to governing an agent that acts on its own, each linking the fuller write-ups on this site and the ebook the material comes from. Openly available.

Financial institutions are being sold generative AI that will transform their work, and agents that will do the work for them. Some of it is useful. Some of it is hype. In finance the difference matters, because these systems can affect customers, records and money.

I do not teach prompt tricks. In class I call that approach prompt and pray, and it does not hold up over time. A good instruction helps, but it will not replace understanding how the system works, or the checks you need before you let it act. This guide explains the machinery, as plainly as I can manage, and the checks that follow directly from it.

I spent years supervising AI risk at the Monetary Authority of Singapore and wrote Singapore's AI risk management guidelines for the financial sector. Before that I inspected quantitative models in banks. The examples here come from finance because that is the work I know. You do not need to build a model to follow it, but you should come away able to ask a team what its system does, what could go wrong, and how it would know.

I keep this openly available rather than behind a sign-up. Each topic opens with a question, so try to answer it before you open the explanation. Use the contents below to jump to a topic, or step through them in order, and each one links to the fuller write-ups on this site and to the ebook it draws on. If you would like to follow me for more of such stuff, come find me on my Substack.

I am keeping this as a live document, last updated 28 October 2026, so drop me a note (at gary@quaintitative.com) anytime if you want to add or correct something. All of this is deliberately boring. That is the point. And if you think I have got something wrong, tell me. I would like to learn more.

What this covers, and what else is here

This guide stays close to the machinery: how generative AI and agents work, where they help in finance, and the checks around one chatbot or one agent. The wider programme that governs all of a firm's AI is written up separately, and openly, here. A few of the highlights:

The companion self-paced courses. AI risk governance for risk and control functions, for the second and third line, and the executive guide for the board and senior management.

The AIRG and the wider Singapore picture. The AIRG explained, the final AIRG, and the complete guide to AI risk management in finance in Singapore.

The AI risks, each set out in full. AI risks in finance, including made-up answers, prompt injection and data leakage.

The use cases in finance. AI use cases in finance, and the use-case explorer to find one by task.

The plain-English ebooks. This guide draws on Agentic and Generative AI for Finance; the full set is on the books page.

Taken together, that is most of what someone who builds, buys or reviews AI in finance needs to get going, openly available, in one place.

Contents

Part one · how it actually works

Part two · generative AI in finance

Part three · agents

Part four · making it safe to use

Part one · Topic 1 of 12

From prediction to generation and action

Machine learning, generative AI and agents, and what changes when a system can act.

What is a language model actually doing, and what changes when it can act rather than just answer?

How the capabilities build. Machine learning predicts from data, such as whether a borrower will repay. Deep learning reads more complex patterns, such as documents or transaction sequences. Generative AI produces content, such as a draft credit memo. Agents use a model to select steps and call tools to carry out a task, such as gathering information, drafting a payment and submitting it for approval. The categories overlap and build on each other, and moving down the list does not automatically make a system better.

How the capabilities build: machine learning predicts, deep learning reads complex patterns, generative AI produces content, and agents select steps and call tools to carry out a task How the capabilities build: machine learning predicts, deep learning reads complex patterns, generative AI produces content, and agents select steps and call tools to carry out a taskGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com Machine learning predicts from data will a borrower repay Deep learning reads complex patterns documents, transaction sequences Generative AI produces content drafts a credit memo Agents select steps, call tools, act gather, draft, submit a payment © Gary Ang · quaintitative.com
How the capabilities build: each adds something, and a more capable approach is not automatically the right one.

What changes when it can act. A chatbot gives a wrong answer on a screen, and a person can still ignore it. An agent takes a wrong action in a system, and it is already done. The convenience and the risk are the same feature. A research assistant that can only read documents has fewer ways to cause harm than one that can also send emails or place orders.

What changes when a system can act: a chatbot gives a wrong answer on a screen a person can still ignore; an agent takes a wrong action in a system that is already done What changes when a system can act: a chatbot gives a wrong answer on a screen a person can still ignore; an agent takes a wrong action in a system that is already doneGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com A CHATBOT a wrong answer on a screen a person can still ignore it add tools AN AGENT a wrong action in a system already executed the convenience and the risk are the same feature © Gary Ang · quaintitative.com
What changes when a system can act: the same wrong interpretation has very different consequences.

Check the whole task. An agent takes several steps for one request, and an early mistake flows into the later ones. If ten steps each succeed ninety-five per cent of the time and every one must succeed, the whole task completes about sixty per cent of the time. So measure success on complete tasks, and check that the system stayed within its permissions. Before reaching for an agent, ask whether the steps could be written as an ordinary workflow; a known sequence is easier to test and control.

Ten steps at ninety-five per cent each: if every step must succeed, the chance of completing the whole task falls with every step, to about sixty per cent after ten Ten steps at ninety-five per cent each: if every step must succeed, the chance of completing the whole task falls with every step, to about sixty per cent after tenGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com 95% 77% 60% steps completed, if every step must succeed © Gary Ang · quaintitative.com
Ten steps at ninety-five per cent each: if every step must succeed, the chance of completing the whole task falls with each step.

Related on this site: agentic and generative AI for finance, the five S's of AI, and governing agentic AI.

In the ebook: Agentic and Generative AI for Finance.

Part one · Topic 2 of 12

How a model produces text, and what training and settings change

Next-token prediction, training, the context window, and why the same prompt can give a different answer.

Why can an answer sound completely right and still be wrong?

One token at a time. A text model works by predicting the next token, a piece of text that might be a word, part of a word, or punctuation. Given the text so far it scores every possible next token, a method picks one, and it runs the loop again on the longer text. It does not have a finished reply stored anywhere before it begins.

The model scores every possible next token: given the text so far, it assigns a probability to each candidate, and a selection method picks one to become the next token The model scores every possible next token: given the text so far, it assigns a probability to each candidate, and a selection method picks one to become the next tokenGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com the payment was declined because ___ the text so far ...insufficient funds 57% ...the card expired 22% ...of a system error 12% ...the bank said no 8% one is picked, and it becomes the next token © Gary Ang · quaintitative.com
The model scores every possible next token, and one is picked to become the next token.
One token at a time, in a loop: the model predicts a token, a method picks one, it is added to the text, and the longer text is fed back for the next prediction One token at a time, in a loop: the model predicts a token, a method picks one, it is added to the text, and the longer text is fed back for the next predictionGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com PREDICT PICK A TOKEN ADD IT TO THE TEXT feed back an answer is this loop run again and again © Gary Ang · quaintitative.com
One token at a time, in a loop: an answer is this loop run again and again.

Fluent is not the same as true. The process does not, by itself, check the answer against an authoritative record, so the same confident tone can carry a correct date and an invented one. These unsupported outputs are often called hallucinations. Tone is no substitute for verification: a confident explanation of a covenant needs checking against the agreement, just as a hesitant one does.

Fluent is not the same as true: a real answer grounded in fact and an invented answer with nothing behind it arrive in the same confident tone, so tone is no substitute for checking Fluent is not the same as true: a real answer grounded in fact and an invented answer with nothing behind it arrive in the same confident tone, so tone is no substitute for checkingGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com A REAL ANSWER grounded in fact AN INVENTED ANSWER nothing behind it same confident tone same confident tone the model predicts likely text, not checked text © Gary Ang · quaintitative.com
Fluent is not the same as true: a real answer and an invented one arrive in the same confident tone.

What training changes, and what it does not. Training happens in stages: pre-training learns the language from a huge corpus, fine-tuning learns the format from good answers, and preference tuning steers the model toward what people prefer. This improves how it follows instructions and refuses unsafe requests, but a helpful manner does not tell you a particular answer is correct, and a restriction that lives only in the model's instructions can fail under an unfamiliar or misleading input.

Three stages of training, each adding something different: pre-training learns the language from a huge corpus, fine-tuning learns the format from good answers, preference tuning learns what people prefer Three stages of training, each adding something different: pre-training learns the language from a huge corpus, fine-tuning learns the format from good answers, preference tuning learns what people preferGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com PRE-TRAINING learn the language from a huge corpus FINE-TUNING learn the format: copy good answers PREFERENCE TUNING learn what people prefer: rank and reward © Gary Ang · quaintitative.com
Three stages of training, each adding something different; none of them makes every answer correct.

The window is all it sees. For one request the model works only from its context window: the application instructions, the user's message, the conversation so far, and any documents fetched for it. It has no memory between calls. More text is not always better, and models often use the start and end of a long input better than the middle, so test whether your system actually uses the material you supply.

The context window is everything the model sees for one request: the application instructions, the user message, the conversation so far, and any documents fetched; it has no memory between calls The context window is everything the model sees for one request: the application instructions, the user message, the conversation so far, and any documents fetched; it has no memory between callsGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE CONTEXT WINDOW the application instructions the user's message the conversation so far documents that were fetched THE MODEL no memory between calls; everything it uses is in the box © Gary Ang · quaintitative.com
The context window is everything the model sees for one request; it has no memory between calls.

Why the same prompt can differ. A decoding setting picks among the scored tokens: greedy decoding always takes the top one, sampling draws in proportion to the odds, and temperature changes how varied that choice is. None of these check whether a statement is true. For wording that must be exact, such as an approved disclosure, keep it in a controlled template rather than asking the model to regenerate it identically.

Two ways to pick the next token: greedy decoding always takes the top token for less varied output, sampling draws in proportion to the odds and can differ each run, which is why the same prompt can give a different answer Two ways to pick the next token: greedy decoding always takes the top token for less varied output, sampling draws in proportion to the odds and can differ each run, which is why the same prompt can give a different answerGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com GREEDY always take the top token same choice every step SAMPLING pick in proportion to the odds varied, different each run this is why the same prompt can give a different answer twice © Gary Ang · quaintitative.com
Two ways to pick the next token, and why the same prompt can give a different answer twice.

Related on this site: the risk of made-up answers, and agentic and generative AI for finance.

In the ebook: Agentic and Generative AI for Finance.

Part one · Topic 3 of 12

Answering from documents

Retrieval-augmented generation, and why the answer is only as good as the fetch.

Where do the facts in an answer come from, and when is the model just guessing?

Its knowledge is frozen. During ordinary use the model's parameters are not updated each time a document changes, so it cannot know last week's fee or your private files unless you put them in its context window. Retraining is often unnecessary for this job; you can supply the relevant document with the question instead.

The model's knowledge is frozen at its training cutoff: what it learned is baked into its parameters, so it cannot know your files or last week's news unless you put them in the context window The model's knowledge is frozen at its training cutoff: what it learned is baked into its parameters, so it cannot know your files or last week's news unless you put them in the context windowGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com WHAT IT LEARNED baked into the parameters frozen at the cutoff training cutoff recent events your private documents anything after the cutoff unless you put them in the context window © Gary Ang · quaintitative.com
The model's knowledge is frozen at its training cutoff; retrieval brings in what it does not hold.

Retrieve, then generate. Retrieval-augmented generation, usually shortened to RAG, searches a document store with the question, selects the passages that match, and asks the model to answer from them. Updating the store makes a new fee available without retraining, but the update must reach the search index, and the search still has to select the right version. The search must also respect permissions: a relevant document is not necessarily one this user is allowed to see.

Retrieval-augmented generation, fetch then answer: the application searches the document store with the question, selects the passages that match, and the model answers from those passages Retrieval-augmented generation, fetch then answer: the application searches the document store with the question, selects the passages that match, and the model answers from those passagesGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com YOUR QUESTION SEARCH THE DOCUMENT STORE THE PASSAGES THAT MATCH THE MODEL ANSWERS FROM THEM retrieval brings in what its frozen knowledge does not hold © Gary Ang · quaintitative.com
Fetch the right text, then answer from it: the application finds the passages and the model answers from them.

The answer is only as good as the fetch. Right passages give a grounded, right answer; wrong passages give a confident, wrong answer that does not look like an error, just a fluent answer to the wrong source. A citation is not proof: the passage may concern a different product, or the model may have left out an exception, so check that the cited text supports the claim. Test retrieval and generation separately, then test the complete interaction, including questions with no supported answer and questions where more than one policy might apply.

The answer is only as good as the retrieval: the right passages give a grounded, right answer; the wrong passages give a confident, wrong answer that does not look like an error The answer is only as good as the retrieval: the right passages give a grounded, right answer; the wrong passages give a confident, wrong answer that does not look like an errorGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com RIGHT PASSAGES grounded, right answer WRONG PASSAGES confident, wrong answer bad retrieval looks like a fluent answer to the wrong source © Gary Ang · quaintitative.com
The answer is only as good as the retrieval; bad retrieval looks like a fluent answer to the wrong source.

Related on this site: making AI safe in practice, and data leakage risk.

In the ebook: Agentic and Generative AI for Finance.

Part two · Topic 4 of 12

Choosing the right tool for the task

When a query, a calculation, or a simpler model does the job better.

Does this actually need generative AI, or would a query or a tested calculation do?

One project, several tasks. An AI portfolio assistant might look up prices, pull financial ratios, build comparison tables, calculate risk measures, and answer open-ended questions. That sounds like one application, but it is several tasks, and they do not all need the same complexity. Looking up prices is a query; ratios a database query; tables and risk measures are code; only the open-ended analysis may need a language model. Pick the method per feature, not per project.

One project, five features, different tools: looking up prices and ratios is a query, comparison tables and risk measures are code, and only the open-ended questions may need a generative model One project, five features, different tools: looking up prices and ratios is a query, comparison tables and risk measures are code, and only the open-ended questions may need a generative modelGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com 1. Look up stock prices a query 2. Pull financial ratios a query 3. Generate comparison tables code 4. Calculate risk measures tested code 5. Open-ended portfolio questions may need GenAI pick the method per feature, not per project © Gary Ang · quaintitative.com
One project, five features, different tools: only the open-ended questions may need a generative model.

Start with input, output, and what if it's wrong. For each task, write down what goes in, the required result, and what happens if the result is wrong. A fixed limit check belongs in ordinary code; estimating default risk may suit a statistical model; summarising a long agreement is where a generative model may help. Where there is an authoritative source or a tested calculation, use it, and if a model calls it, check that it chose the right inputs and reported the result faithfully.

Include the cost of review. Drafting is a useful place to start because a person can check the output before it is used, but review takes time and can fail. A credit memo that reads well may still omit a guarantee or misstate a covenant, and if the reviewer has to redo most of the work, the time saved is small. Measure the whole task, preparation, generation, checking and correction, and test the workload you expect after rollout, not just a handful of carefully reviewed cases.

Related on this site: AI use cases in finance, and the use-case explorer.

In the ebook: Agentic and Generative AI for Finance.

Part two · Topic 5 of 12

Common uses in finance

Sorting applications by the data they process, and the checks each one needs.

Which jobs in finance is this actually good for, and what should you check for each?

The data shapes the task. Sorting applications by the material they process helps you choose methods and tests: rows and columns (credit scoring, transaction monitoring), text (contracts, customer chat, KYC review), images and signals (ID verification, OCR, biometrics), time series (market prices, transaction sequences), graphs (fraud rings, counterparty networks), and multimodal (an insurance claim with forms and photos). Each type leans toward different methods, and each has its own failure to look for. Classify the use by its material first, then check whether the proposed method suits it.

Six data types, and what runs on each: rows and columns, text, images and signals, time series, graphs, and multimodal data, each leaning toward different methods and different checks Six data types, and what runs on each: rows and columns, text, images and signals, time series, graphs, and multimodal data, each leaning toward different methods and different checksGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com Rows and columns credit scoring, transaction monitoring Text contracts, customer chat, KYC review Images and signals ID verification, OCR, biometrics Time series market prices, transaction sequences Graphs fraud rings, counterparty networks Multimodal insurance claims, document plus selfie © Gary Ang · quaintitative.com
Six data types, and what runs on each; text and multimodal are where generative AI added the newest capability.

Where generative AI can help. Document work (extracting covenant terms, comparing policy versions, summarising filings, drafting a credit memo), research assistants that sort transcripts and news, customer-service drafting, coding assistants, and summaries that help review financial-crime alerts. The reviewer needs access to the source and a way to check that material details were not omitted. The risk rises when the answer goes straight to the customer, and a correct summary of an incomplete set of sources can still mislead.

Reuse checks, but not the assumptions. Several uses may retrieve documents, extract fields or draft replies, and can share parts of the evaluation process and common access controls. But each use still needs its own test cases and permissions, a policy assistant for staff and a customer chatbot are not the same. Record the task, owner, data sources, model and connected tools for every live use, and keep vendor features in that inventory too.

Related on this site: AI use cases in finance, AI in credit decisioning, and the use-case explorer.

In the ebook: Agentic and Generative AI for Finance.

Part two · Topic 6 of 12

The prompt and the chatbot

Prompt design as specification writing, and the system around the model.

When an answer is poor, is the fix a better prompt, or something else?

What actually helps. A lot of the advice sold as prompt engineering turns it into a search for special phrases. The useful work is usually much more ordinary: state the task plainly, supply the context it needs, show an example of a good answer, and set the limits, including what to leave out and when to ask for clarification or decline. Writing a good prompt is closer to writing a specification than finding a magic word.

The four things a good prompt does: state the task plainly, supply the context it needs, show an example of a good answer, and set the limits; most of the rest is noise The four things a good prompt does: state the task plainly, supply the context it needs, show an example of a good answer, and set the limits; most of the rest is noiseGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE TASK say plainly what you want done THE CONTEXT give it what it needs to know AN EXAMPLE show the shape of a good answer THE LIMITS what to avoid, how long, what format clear task, needed context, an example, plain limits © Gary Ang · quaintitative.com
The four things a good prompt does; most of the rest is noise.

A prompt can only do part of the work. If the application retrieves the wrong filing, a well-written prompt produces a good summary of the wrong company; if the source is out of date, rewriting the instruction will not update it. Look at the failure before changing the prompt: missing sources may need better retrieval, incorrect arithmetic a calculation tool, uncertain error rates evaluation. Record what changed, and retest on the same cases.

A prompt is also an attack surface. Your instruction, the user's message and a fetched document reach the model as one stream of text, so an instruction hidden in a retrieved document can tell the assistant to ignore its task or disclose information. This is prompt injection. Clear instructions help, but critical restrictions need enforcing outside the model: a document should not be able to grant access to another customer's records.

A prompt is also an attack surface: your instruction, the user message and a fetched document reach the model as one stream of text, so an instruction hidden in any input rides in with the data A prompt is also an attack surface: your instruction, the user message and a fetched document reach the model as one stream of text, so an instruction hidden in any input rides in with the dataGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com YOUR INSTRUCTION THE USER'S MESSAGE A FETCHED DOCUMENT THE MODEL one stream of text it cannot tell data from instruction an instruction hidden in any input rides in with the data © Gary Ang · quaintitative.com
A prompt is also an attack surface: an instruction hidden in any input rides in with the data.

A chatbot is a system, not a model. It is the model plus the surrounding application: the instructions, retrieval, session handling, access controls, response checks and records. The risk lives in how those parts are wired. Before release, try incomplete questions, unsupported requests, conflicting sources, and attempts to obtain another customer's information, and check what the user sees when the model or a connected service fails.

A chatbot is a system, not a model: the model is one part, wired to the prompt, retrieval, guardrails, access controls and records; the risk lives in how those parts are connected A chatbot is a system, not a model: the model is one part, wired to the prompt, retrieval, guardrails, access controls and records; the risk lives in how those parts are connectedGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE SYSTEM PROMPT RETRIEVAL THE LLM GUARDRAILS access controls, records the model is one part; the risk lives in how they are wired © Gary Ang · quaintitative.com
A chatbot is a system: the model is one part, and the risk lives in how the parts are connected.

Related on this site: prompt injection risk, and making AI safe in practice.

In the ebook: Agentic and Generative AI for Finance.

Part three · Topic 7 of 12

How an agent carries out a task

The plan-act-observe loop, the harness, tools, and least privilege.

What is an agent actually doing between your request and its answer?

One request becomes many calls. An agent combines a model with tools and the software that runs the process, often called the harness. The model proposes a next step, the application checks whether it is permitted and runs it, returns the result to the model, and continues until a stopping condition is met. So a request that looks like one question can involve many model calls and several external services, and some of those calls change records or send information outside the system. This plan, act, observe pattern underlies most agent designs.

The agent loop, plan act observe: the model proposes a next step, the application checks and runs the permitted action, the result comes back, and the loop runs until a stopping condition is met The agent loop, plan act observe: the model proposes a next step, the application checks and runs the permitted action, the result comes back, and the loop runs until a stopping condition is metGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com PLAN what to do next ACT call a tool OBSERVE read the result one task is not one call; the loop runs to a stopping condition © Gary Ang · quaintitative.com
The agent loop, plan act observe: one task is not one call, and the loop runs until a stopping condition.

The harness is part of the system. Between calls, the harness decides what the model sees next, trims or summarises a filling context window, and stores material the agent can retrieve later, its memory. Those choices change behaviour as much as the model does: a summary that drops a payment condition can send a capable model down the wrong path. Two applications on the same model can behave very differently, so record the harness version with the model version and retest when either changes.

Tools, and least privilege. A tool is a function the application makes available: search documents, query a database, prepare a payment instruction. The same model supports very different applications depending on the tools and their permissions. Give the agent the narrowest set that does the job, look inside the tool permissions (a database tool with unrestricted queries grants more than its name suggests), check the restrictions where the action runs, and separate preparing an action from executing it, a person releasing a drafted payment rather than the agent releasing it.

Least privilege, the narrowest set of actions that does the job: the agent may draft a payment for a human to release, but releasing the payment stays behind a human gate; the difference is a design decision, not the model Least privilege, the narrowest set of actions that does the job: the agent may draft a payment for a human to release, but releasing the payment stays behind a human gate; the difference is a design decision, not the modelGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE AGENT DRAFT A PAYMENT allowed; a human releases it RELEASE THE PAYMENT behind a human gate assume it can be tricked; decide what it is allowed to do once it is © Gary Ang · quaintitative.com
Least privilege: assume it can be tricked, and decide what it is allowed to do once it is.

Stopping conditions. Set limits on steps, time, spending and actions before the task begins, and decide what happens when each is reached. Confirm the agent cannot extend its own limits, and that stopping it prevents further actions, remembering that ending the loop does not cancel requests already sent to external systems.

Related on this site: the anatomy of an AI investing agent, AI agent patterns, and governing agentic AI.

In the ebook: Agentic and Generative AI for Finance.

Part three · Topic 8 of 12

How agents fail across several steps

Where it breaks when it acts, not just answers.

An agent acts across many steps. Where does it break?

Each step looks fine, the path is wrong. An agent retrieves an out-of-date price, uses it in a calculation, and prepares an order. The calculation may be correct for the price it received, and the order may follow the calculation exactly. The result is still wrong, because the first input was wrong. Checking each component in isolation can miss that sequence, so examine how information passes between steps.

Each step looks fine, the path is wrong: an early mistake flows into later steps, each reasonable given the last, and the whole task ends wrong even though no single step looks like an error Each step looks fine, the path is wrong: an early mistake flows into later steps, each reasonable given the last, and the whole task ends wrong even though no single step looks like an errorGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com Step 1 fine Step 2 fine Step 3 fine Step 4 fine wrong each step reasonable given the last; the whole path wrong © Gary Ang · quaintitative.com
Each step looks fine, the path is wrong: an early mistake flows into later steps that each look sensible.

Three places a failure can start. The model (misreads a figure, invents a field, chooses an unsuitable step), a tool or source (a stale balance, an incomplete record, a failed call that the application must tell apart from a real answer), or an attacker (instructions hidden in a document or email the agent reads). The causes overlap, a misleading tool response can look like valid data and also carry an instruction, so the system needs checks at more than one point.

Three places a failure can start: the model misreads or invents, a tool or source returns stale or failed data, or an attacker hides instructions in the data; the causes overlap, so check at more than one point Three places a failure can start: the model misreads or invents, a tool or source returns stale or failed data, or an attacker hides instructions in the data; the causes overlap, so check at more than one pointGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE MODEL misreads a figure, invents a field validate inputs, check results A TOOL OR SOURCE stale balance, a failed call check status, dates, completeness AN ATTACKER instructions hidden in the data limit access, test the attacks the causes overlap, so check at more than one point © Gary Ang · quaintitative.com
Three places a failure can start; because the causes overlap, check at more than one point.

A reasonable interpretation can exceed the task. Asked to reduce technology exposure, an agent sells current holdings and also cancels future purchases. The issue is not a fabricated fact; it acted on an interpretation no one authorised. Make the scope explicit, which accounts, whether standing instructions can change, and then enforce it in the available actions, not just the prompt.

Watch the scale and the sequence. An action can be permitted once and inappropriate when repeated; reading one customer record differs from downloading thousands. Order matters too, an approval after a payment is released is no control, and a retry of a transaction whose response was lost can send it twice. Keep an accountable owner for the whole use, even where several teams build its parts.

Related on this site: agentic AI risks, agentic AI risk management, and governing agentic AI.

In the ebook: Agentic and Generative AI for Finance.

Part three · Topic 9 of 12

Check the actions as well as the answer

The trajectory, the records, and three levels of review.

The agent says it is done. How do you know it did the right thing, the right way?

The unit of governance is the trajectory. An agent can report a completed payment accurately, the payment did go through, while having used the wrong account to gather information, skipped a required approval, and sent the payment twice. The final reply does not reveal those failures. You inspect the sequence of actions, often called the trajectory: what the system did, in what order, and with whose authority. The unit of governance is no longer the output; it is the trajectory.

Watch the trajectory, not just one call: the unit of governance is the whole path the agent took, plan, tool, plan, tool, answer, not the final reply alone Watch the trajectory, not just one call: the unit of governance is the whole path the agent took, plan, tool, plan, tool, answer, not the final reply aloneGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com PLAN TOOL PLAN TOOL ANSWER the whole path is what you govern a monitored model called by an unwatched agent hides the behaviour © Gary Ang · quaintitative.com
Watch the trajectory, not just one call: a monitored model called by an unwatched agent hides the behaviour.

Record enough to reconstruct the task. Keep the request, the model and application versions, tool calls and their inputs, returned results, approval decisions and retries, each with a timestamp and linked to one task reference. A generated explanation of why an action was proposed is not a substitute for a record of what was actually executed. Protect sensitive content in the logs, and check the records before launch, since a logging tool installed is not evidence that every important step is captured.

Review at three levels. The operation (did each tool read the right account and reject invalid inputs), the sequence (did the required checks and approvals happen before execution, was an approval still valid after the details changed), and the outcome (did the intended payment happen once, for the right amount and recipient, with nothing else changed). A pass at one level does not establish a pass at the others.

Review the task at three levels: the operation, did each tool read the right record; the sequence, did the checks and approvals happen in the right order; the outcome, did the intended change happen once and nothing else Review the task at three levels: the operation, did each tool read the right record; the sequence, did the checks and approvals happen in the right order; the outcome, did the intended change happen once and nothing elseGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com THE OPERATION did each tool read the right record? THE SEQUENCE did checks and approvals happen in order? THE OUTCOME did the intended change happen once, nothing else? a pass at one level does not establish a pass at the others © Gary Ang · quaintitative.com
Review the task at three levels; a pass at one level does not establish a pass at the others.

Enforce restrictions during execution. Validation before launch establishes that the system meets requirements under tested conditions, but the application still checks permissions and limits on each live task. For consequential actions, define when approval is required, show the reviewer the exact action, recipient, amount and evidence, and obtain approval again if those details change. Ask what the agent can do without further approval, and whether that scope matches the firm's tolerance for failure.

Related on this site: runtime governance for agentic AI, governing agentic AI, and agentic AI risks.

In the ebook: Agentic and Generative AI for Finance.

Part four · Topic 10 of 12

Testing answers and actions

Evals: cases from real work, criteria and judges, repeated runs.

How do you test something that can answer a hundred different right ways?

The test set changes shape, not the discipline. You can write the same valid summary in several ways, so comparing its wording with one reference answer will not tell you enough. But you can still build a test set: the document, the request, the facts that must be covered, and criteria for judging the response. These are usually called evals. Generative AI changes how some results are assessed; it does not remove the need for repeatable tests.

The test set changes shape, not the discipline: classical machine learning uses held-out labels and one repeatable score; generative AI uses your own cases, written criteria and judges, repeated runs, and keeps the worst cases The test set changes shape, not the discipline: classical machine learning uses held-out labels and one repeatable score; generative AI uses your own cases, written criteria and judges, repeated runs, and keeps the worst casesGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com CLASSICAL ML held-out labels one score, repeatable GENERATIVE AI your cases, criteria, judges repeated runs, worst cases kept same discipline, different evidence: criteria and judges, not one label © Gary Ang · quaintitative.com
The test set changes shape, not the discipline: criteria and judges instead of a single label.

Build the tests from the work. Use representative questions, documents and tasks, including incomplete requests, outdated sources, conflicting information, and cases where the system should ask for help. For a covenant summary, specify which clauses must appear; for a fee question, record the correct amount, conditions and source. Public benchmarks help shortlist a model, but the release decision needs evidence from your own tasks, and some benchmark material may have appeared in training.

Check the grader. People can assess answers, and another model can help grade larger sets, usually called LLM-as-a-judge. But a model judge can miss errors or favour a response for its length, position or style. Give either grader clear criteria and examples, compare a sample of its grades with people who know the subject, especially where a grade would change the release decision, and record the judge's version and instructions.

Repeat, and weigh the consequences. A single successful run gives limited evidence; repeat tasks whose outputs or action sequences may vary, and report the number of attempts, successes and failures rather than a single rate. Examine the consequences too, one unauthorised transfer may matter more than several incomplete summaries, and an average score can hide that. Set acceptance criteria before reviewing results, keep the failed cases, and rerun after changes to the model, prompts, documents, tools or permissions.

Related on this site: AI testing, evaluation and assurance, and making AI safe in practice.

In the ebook: Agentic and Generative AI for Finance.

Part four · Topic 11 of 12

Checks, oversight and monitoring

Guardrails enforced in the application, workable human review, and watching after launch.

Once it is live and the world changes, what keeps it safe?

Enforce the critical rules in the application. A guardrail is a check around a request, source, proposed action or response that can block the step, remove sensitive information, or refer the case for review. Some use fixed rules, some use a model, and both need testing. For access and payment limits, enforce the rule directly in the service, not in the model's instructions.

Where the guardrails sit: an input filter screens the request, the model answers from approved sources, an output filter redacts or refuses, and a human gate stands in front of anything that cannot be taken back Where the guardrails sit: an input filter screens the request, the model answers from approved sources, an output filter redacts or refuses, and a human gate stands in front of anything that cannot be taken backGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com INPUT INPUT FILTER screen the ask GROUNDED LLM answer from sources OUTPUT FILTER USER HUMAN GATE the irreversible a human on anything you cannot take back © Gary Ang · quaintitative.com
Where the guardrails sit: input filter, grounded answer, output filter, and a human gate for the irreversible.
Instructed, or enforced: an instruction to the model to respect privacy can be talked out of it; a rule enforced in the application holds whatever the model says, so a rule you can talk it out of is not a control Instructed, or enforced: an instruction to the model to respect privacy can be talked out of it; a rule enforced in the application holds whatever the model says, so a rule you can talk it out of is not a controlGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com INSTRUCTED please respect privacy can be talked out of it ENFORCED access check on retrieval holds whatever the model says a rule you can talk it out of is not a control © Gary Ang · quaintitative.com
Instructed, or enforced: a rule you can talk the model out of is not a control.

Make human review workable. A reviewer needs enough time, evidence and authority to make a decision, usually called human-in-the-loop. Putting a person on an approval screen does not establish that they can catch an error. Show the exact action and the supporting records, place the review before the action it controls, and watch how review works: if reviewers rarely change a recommendation, that may mean the output is good, or the checking is weak.

Watch for changes and failures. Choose measures that relate to the task and have an owner who can act on them: input changes, output quality on a reviewed sample, blocked-request patterns, time and cost, and agent actions such as repeated attempts, unusual recipients or approval failures. An indicator you cannot act on is a statistic. A spike in blocked requests could be an attack, a change in usage, or a faulty guardrail update, so investigate it rather than assuming the cause.

Keep the evidence, and practise the response. Retain what you need to investigate an incident, with protection for sensitive content, then practise: can the team identify affected customers, stop further actions, and fall back when the main provider is unavailable? After an incident, add representative failures to the test set, so monitoring feeds back into evaluation.

Related on this site: making AI safe in practice, monitoring after go-live, and guardrails and metrics.

In the ebook: Agentic and Generative AI for Finance.

Part four · Topic 12 of 12

The wider programme

From one system to all of them, and where the governance picks up.

This guide is about one system. How do you govern all of them across the firm?

One system becomes many. A firm runs many chatbots and agents, built by different teams, often on the same few providers. Each has its own checks, but catching the failures that matter across all of them, the shared provider, the common weakness, the use no one registered, is the work of AI governance and risk management.

One system becomes many: a firm runs many chatbots and agents, built by different teams on the same few providers, and catching the failures that matter across all of them is the work of AI governance and risk management One system becomes many: a firm runs many chatbots and agents, built by different teams on the same few providers, and catching the failures that matter across all of them is the work of AI governance and risk managementGary Ang© Gary Ang, Quaintitativehttps://quaintitative.com ONE SYSTEM one chatbot or agent, with its own checks a use a use a use a use a use a use a use a use AI GOVERNANCE AND RISK MANAGEMENT the AIRG, and the wider programme © Gary Ang · quaintitative.com
One system becomes many; catching the failures across all of them is the work of AI governance and risk management.

The machinery here sits inside that programme. This guide has stayed close to the machinery: how the model works, where it helps, and the checks around one chatbot or one agent. The wider programme, the lifecycle from proposal to retirement, the inventory, the organisation-wide risk framework, is where those checks are made consistent across the firm, without the paperwork growing faster than the AI. For finance in Singapore, the MAS AI Risk Management Guidelines set the expectations, finalised in October 2026 and in force from October 2027, phased.

Where to go next on this site. The companion self-paced courses and the full frameworks are openly available here: AI risk governance for risk and control functions for the second and third line, the executive guide for the board and senior management, the AIRG explained and the final AIRG, and the complete guide to AI risk management in finance in Singapore.

In ebooks: the companion books carry the wider programme, AI Risk Management for Risk and Compliance, AI Risk Management for Directors, and Scaling AI Governance.

Want to go deeper?

The ebook this draws on. The full treatment, with the worked finance examples and the references, is in Agentic and Generative AI for Finance. The companion books cover the wider AI risk management programme.

IBF-accredited courses. The deep-dive and technical courses I designed and teach are IBF-accredited and listed on the IBF Programme Finder, delivered through the Association of Banks in Singapore and the Singapore College of Insurance: Banks (deep dive), Banks (technical) and Insurers (deep dive).

Courses I run directly. I also run courses in-house for a single firm now, and maybe as open cohorts one day, including a technical hands-on day on building and testing these systems, and sessions for risk and control functions, leaders and boards. See the courses.

After subsidies, the accredited courses come to roughly S$200 to S$300 a participant. Direct engagements, for cohorts of around 40, come to something similar per person.