Summarizes a deterministic, constraint-based approach for building AI agents in regulated finance, where the LLM only generates prose, numbers are cryptographically sealed, and auditability is ensured through separated layers.
Last time I learned how to use a graph as a workflow for AI agents. This time I learned something different from a friend. I think it's brilliant, but I'm looking for other opinions. What do you think about this? This is a summary of an article that I wrote for my own learning. The article is free available and contains code examples. The use case is for the finance industry (Europe, strict laws). I do not sell anything. You can read it. I do not track visitors at all. I just want to learn it. What do you think about this? Link to full article in the comment. Here is the summary: 1. Action Space: Open Discovery vs. Closed-World * **AI Agents usually:** The agent acts autonomously, dynamically searching for its capabilities (tools) at runtime and deciding freely how to solve a task. This often leads to unpredictable behavior or the agent accessing unauthorized tools. * **This Approach:** The agent operates within a pre-defined, strictly limited decision space. It can only perform actions explicitly listed on a "guest list" (declarative permission). While it can plan within this frame, it can never "invent" new capabilities. 2. The Role of the LLM: Generalist vs. Pure Copywriter * **AI Agents usually:** The Large Language Model (LLM) handles everything: it manages the process, performs calculations, makes decisions, and writes the final text. * **This Approach:** The LLM sits at the very end of the chain and **formulates prose only**. It has no decision-making or mathematical authority. Before the LLM is even called, the data passes through a strict ontology-like pack (validity check) and a deterministic rule engine (calculation). 3. Handling Numbers: Hallucination Risk vs. Physical Impossibility (sealed facts) * **AI Agents usually:** The LLM generates the report including the numbers. There is always a risk that the model will hallucinate or slightly alter figures. * **This Approach:** The LLM does not write a single number. A deterministic rule engine calculates the values and seals them with a cryptographic fingerprint. The model only provides text with **placeholders** (e.g., `"The loss was {loss_percent}%"`). Standard code then injects the sealed numbers into the placeholders. Numerical hallucination is therefore physically impossible. 4. Evaluations (Evals): AI-Judge vs. Deterministic fail-closed * **AI Agents usually:** To find errors, a second AI is often used (LLM-as-a-Judge) to read, interpret, and score the output of the first AI. Or Evals are implemented that test the output after the fact. * **This Approach:** There is no second AI judging the text. The check (**fail-closed**) is pure code. It compares the generated text against hard rules. If the check fails, the text is discarded and regenerated with stricter constraints. 5. Auditability & Traceability (Compliance) * **AI Agents usually:** The decision-making process is a black box. For regulators (like BaFin), it is extremely difficult to trace *why* the AI chose a specific threshold or reached a certain conclusion. * **This Approach:** The architecture is cleanly separated into three auditable layers: * **Ontology-like:** Defines vocabulary and validity (readable by business units). * **Decision Space:** Defines permissions (without calculation logic). * **Rule Engine:** Classic code for calculations. An auditor can test and sign off on these layers individually, ensuring that AI-generated prose and hard mathematics never get blurred. **In summary:** While traditional agentic approaches try to maximize intelligence and autonomy (catching errors afterward via AI Evals), this approach sets **hard, deterministic boundaries upfront**. The AI is not an independent actor but a tightly constrained tool within a pre-approved system, which is very helpful in highly regulated sectors like finance.
Explores how to architect AI agents for regulated industries like SaMD class II, balancing non-deterministic agent usefulness with deterministic safety zones to satisfy regulatory compliance.
A discussion about designing AI agent systems in heavily regulated environments, focusing on the challenge of false positives and how to present model confidence to users without adding cognitive load.
This article argues that the accountability infrastructure developed for automated financial trading over decades provides a blueprint for governing AI agents, drawing on specific regulatory mechanisms like FINRA Rule 5310 and SEC Rule 17a-4.
The article discusses the lack of compliance infrastructure for AI agents in regulated industries and inquires about bottlenecks such as identity verification and integration.
A software developer questions the practical value of AI agents, expressing concerns about control, accountability, and whether manual automation combined with LLMs is more reliable than delegating to autonomous agents.