< Will Bosler

AI Systems and Formal Verification ยท

Confidence in deploying an AI system should be proportional to how well that system can be verified.

0:02 / 0:04

Agents are increasingly capable of completing complex tasks over long time horizons. What often delays the decision to deploy them is not capability but confidence, that is, confidence that the system will reliably complete the work to the required standard.

Verifying knowledge work is difficult and remains an open area of research. However, there is a path forward. We can decompose a piece of knowledge work into atomic predicates that are each simple to verify, and fall back on a hierarchy of fuzzier checks only where necessary. This increases our confidence in the system we deploy.

0:02 / 0:13

Conceptually, we extract a set of criteria from a piece of knowledge work. A solver confirms that these criteria can be jointly satisfied, and we build a verifier for each.

This is packaged as a skill, a self contained piece of software that checks the criteria for the work and confirms it has been completed to the required standard. Because the verification engine is packaged with it, the skill is portable across coding agents.

0:02 / 0:09

Consider an investment memo. A bank prepares one for each new transaction and would like to automate the process. Automation is only valuable if we can verify that each memo meets the bank's standards.

0:02 / 0:13

These standards are derived from three sources. Some are inferred from documents provided by the company. Some are extracted directly from formal rules already documented in policy. Others are given by users, who state that the work must meet a specific criterion.

Together, these form the atomic criteria that represent the piece of knowledge work.

0:02 / 0:13

Once extracted as predicates, the criteria can be formalised. This enables the use of existing solvers, such as Z3 for simpler checks or Lean for more complex proofs. Assuming the translation into logic is accurate, the existing mathematics for validating logic becomes available to us.

Taking the bank's credit policy as an example, each rule is decomposed into base level predicates. These can be recombined into composite rules, but to the system this is standard logic. Once we have the base units, we can construct whatever rules we require.

The key benefit is granularity. Each base predicate is easy to verify, so the system builds on verified knowledge throughout. There is no guesswork, and provenance is maintained end to end.

0:02 / 0:13

This process involves collaboration with people. The system proposes each criterion alongside a plain English description, and the project lead and other stakeholders confirm that it reflects their requirements. Where it does not, they can edit it or request changes.

0:02 / 0:23

With all criteria defined, we test that they can be jointly satisfied. When writing documentation or communicating requirements, it is easy to request things that cannot all hold at once.

The solver checks this in advance. If criteria conflict, it identifies which ones, and we decide how to resolve them. Rather than encountering an edge case once the system is live, we surface it up front. This is where formal verification provides the most value.

0:02 / 0:14

Each criterion is then routed to the cheapest and most trustworthy verification method. Many atomic predicates can be confirmed with code alone. Some require a hybrid approach, where code extracts the relevant information and a fast model reviews it. The remainder fall back to an LLM judge.

We should minimise reliance on LLM judges. A judge introduces a recursive problem: we must also verify that the judge behaves as intended. Benchmarking and testing can build confidence, but the goal is a system that works by design, because we have specified what is needed, not because a benchmark says so.

0:02 / 0:17

Some requirements will remain fuzzy, so their judges are hardened prior to deployment. We generate samples, including adversarial examples, run them through our hierarchy of judges and assess what passes. The system is updated until it reaches the required pass rate, analogous to a train and test split. The output is a hardened set of verifiers for that piece of knowledge work.

0:02 / 0:15

The skill is then deployed. As standalone software, it can be shared between teams, served as an endpoint or loaded into a coding agent.

Critically, the verification is independent of the model completing the work. Underlying models will continue to improve at these tasks, and we do not want to constrain them. The verification layer remains stable, which also enables us to adopt new models sooner, with confidence.

0:02 / 0:05

This is a difficult problem and a growing area of research, but a valuable one. The more ways we find to verify what is correct for a task, the more work we can automate. Even marginal improvements can provide a meaningful increase in confidence.