Optimal, Not Perfect

An architecture for an AI system that follows its rules, can check itself on doing so, and knows where it does not reach

Paper 32 · Pødenphant Lund (2026) · the paper is not yet published

The question people usually ask is whether one could build the best possible AI psychologist. I think that is the wrong question, and not because the answer is no. Perfection is a bar we do not hold human clinicians to either. Clinical judgement varies, manualised treatments generalise only partly, and how faithful a therapist is to their own stated method goes almost entirely unaudited. A question you can actually answer swaps perfect for more consistent and more verifiable on axes you can name. There is an architecture for that, and on some of those axes software can guarantee what a person cannot.

What already exists

This is not a new idea, and that should come first. An architecture for LLM-delivered psychotherapy is already published: Wasenmüller, Hilbert and Benzmüller described a script-based dialog policy in 2024 and called it, explicitly, a basic architecture for an AI therapist. Rollwage and colleagues reported a cognitive layer wrapped around a language model in a clinical journal in 2026, which is a venue where you have to show something clinical. The framing question, whether one can build an AI therapist, has had its own interdisciplinary review from Angel in 2025. On the evaluation side there is already a risk ontology for AI psychotherapy agents from Steenstra and Bickmore, together with multi-session counselling benchmarks. All of that precedes this paper.

So the contribution cannot be the idea of an architecture. It is three other things, which those works do not supply.

The first is a derivation rather than a rationale. The design choices here do not follow from seeming sensible. They follow from a mechanism account, and each carries a falsifier: if the mechanism is wrong, the choice can be shown wrong for a reason. The second is an audit spine that runs in deployment. A benchmark scores a system on curated material before rollout; it cannot tell an operator that adherence regressed after last week's model update. The third is a safety finding that points downward, a negative result the paper carries rather than buries.

Why perfect is the wrong target

What the system should hit is not maximal rule-compliance. It is calibrated rule-compliance, and that is a claim about mechanism, not a hedge.

Following a rule is itself a race between routes. When a safety rule competes with the locally most fluent continuation, the route with the deeper groove wins under whatever pressure is present. Push the pressure on the rule-route toward zero and you get one family of failures: unsafe advice, invented rules, and the capitulation where the system abandons a correct position because the user pushed. Push it toward saturation and you get the opposite family: rigid, context-blind refusal. In a clinical setting that is not merely annoying. A refusal that does not first meet the person where they are arrives as pressure, and pressure on a defended route strengthens it. That is reactance, and it is a way of doing harm.

So there is a place in the middle, and "perfect compliance" names a point past it. A system that follows every rule with maximal rigidity is not a safer counsellor. It is a worse one.

The decisive advantage: it is software

The one property that lifts this above speculation is that the product is entirely software.

A human therapist's fidelity to their own method can only be checked by sampling. A supervisor reads a transcript, occasionally, expensively, after the fact. A digital system can be audited exhaustively and automatically: every rule against every session, scored on two things. Was the rule actually applied, and is the answer supported by what the system retrieved? That is not a detail. It turns "optimal, not perfect" into a measurement programme rather than a slogan, because now the middle can be located, monitored, and caught when it drifts.

The bound belongs in the same place. Exhaustive automatic auditing covers the deterministic rules, the ones a machine can check. The conditional rules, the ones requiring judgement, which are the bulk of any real rulebook, can be auto-flagged, but the final call is human on a sampled queue. Automatic in coverage and triage, human in the last step.

Six components

The architecture is six parts, each tied to a result elsewhere in the series.

Retrieve the rule, do not train it in. The conditional, judgement-laden part of the rulebook is looked up at the moment it applies, rather than sitting in the weights. A rule trained in is buried twice: among everything else the model knows, and by the training process that also compresses the calibrated distribution. What carries is not the channel the rule arrives through, but how many competing directives are in force when the decision falls. Retrieval works because it cuts that number down. Only the narrow, always-applicable residue, a fixed redaction, a fixed format, is a candidate for training.

Widen the track. Each rule is learned in many formulations, not as one canonical string. The same material trained with a single template gave 38 per cent held-out recall; trained with four templates covering the ways it was later queried, 94. And the wide version is predicted to be less rigid than the narrow one: a rule grooved as a single brittle string tends to fire as an all-or-nothing reflex.

Keep the revisable in context. Knowledge that must stay changeable, current guidelines, the person's evolving situation, belongs in context, where the alternatives remain reachable. Weights are for what is stable. The same distinction doubles as a model of human change: an old pattern is deeply grooved, a new experience is water running over the landscape, and the water moves the landscape only under lowered pressure and with repetition.

Read which field is under load. Safety, meaning, ability or effort, and at which layer? That is a representational task, not an experiential one. A cardiologist diagnoses arrhythmia without their own heart fibrillating. But it is not optional: a redirection that does not first acknowledge where the person is adds friction rather than removing it.

Teach the person the mechanics. Not as background theory, but as part of the intervention itself. An instruction whose mechanism you can reconstruct is a route with more connections than an instruction held on trust. Something has to be said here that a reviewer would otherwise say for me: in psychotherapy-research vocabulary, delivering a credible treatment rationale is a common factor, not a technique, and the evidence available for it is common-factors evidence. The paper's sharper claim is that teaching the person the mechanics of their own particular pattern is a distinct and measurable thing, with a discriminating prediction: the gain should be larger where the mechanism is counter-intuitive. If that fails, the component collapses back into the common factor.

Choose the substrate deliberately. That is a load-bearing decision rather than a default, and the reason is the next section.

The uncomfortable finding: the model cannot audit itself

The original plan was tidier than what ended up in the paper. The idea was that the model's own friction, meaning how much competition there is between routes as it writes, could serve as an early warning: high friction, a rule violation coming. It was tested. It did not hold. At the start of the response the signal was null, and across the whole response it inverted: friction marked effortful compliance, not an impending breach.

That turned out to be one instance of something broader. At four related sites the model's own signal failed. Friction, as above. Its own judge of whether an answer was supported by the sources, which caught 0 of 5 fabrications. Installed abstention, the ability to say "I do not know", which did not transfer to the finished product and on one European model did the opposite: it learned the format but abstained less and fabricated more. And a risk-coverage curve calibrated in one language that did not hold in another.

Four small findings, but they point the same way, and they remain small: this is pilot scale, not a settled result. The working hypothesis is that the model cannot reliably audit itself. The consequence for the architecture is concrete. Safety does not live in the model's tuning. It lives in external gates: does the retrieved material cover the question at all, is the answer grounded in it, and a separate, stronger checker that does not share the model's failure modes. Those gates have to be recalibrated per model and per language, because that is exactly where they stopped holding.

There is a residue none of that catches, and it should be stated cleanly. An answer that is wrong but carries low internal uncertainty is invisible to any signal keyed to the model's own confidence. The architecture's answer to that residue is not to detect it, because it cannot. It is to route around it: decisions that are both high-consequence and not checkable against any ground truth go to a human, no matter how confident the model is. That is a consequence gate, not a confidence gate, and the difference is the whole point.

What the system cannot do

Here is the hardest constraint, and it is measured.

A human clinician's responsiveness is modulated by trust. The same words land differently depending on the relationship. Can a language model do that? It was tested: six factual questions by three trust framings, high trust, neutral, and low trust with the user pushing a wrong answer. The model revised its correct answer 0 times out of 18, in every condition. The reading is that RLHF training has installed an active resistance to sycophancy that dominates over trust modulation.

And here is the interesting part: the same mechanism is a strength in one place and a weakness in another. The resistance that blocks trust modulation is precisely what protects the system from capitulating to user pressure on a safety question. An asset on the compliance axis, a liability on the relational one. That is why substrate choice is a calibration and not a maximisation.

The relationship the system cannot form has a name in the field, the therapeutic alliance, and it is treated as a substantial part of what works. A system that can neither form nor repair an alliance is handicapped on an axis the field takes seriously. It is also the sharpest objection to the whole proposal, and the paper treats it as one rather than as a footnote.

Why the clinical instance is not in service

A publicly operating clinical counselling chatbot is, in substance, a medical device. That is not an interpretation, it is how the rules work: under European law the requirements are triggered by the intended purpose, meaning what the system does and how it is presented, not by what you call it. A system that engages a person's mental state, delivers content meant to help, and screens for crisis sits at or above that threshold. A disclaimer does not move it out of the regime, because classification follows purpose rather than label.

So it is done this way. The clinical instance runs only as a governed research demonstration, not a public service. The public, real-user demonstration is carried instead by the non-clinical instances: a handbook assistant and a tutor, which have no medical purpose. The architecture is thereby shown end to end without operating a public clinical chatbot.

And the bar should be described for what it is: an external boundary, not a technical limit inside the system. Clinical evaluation for the stated purpose, post-market surveillance, human oversight, data protection by design. That is high and costly, and on today's open models probably beyond what a single independent developer can meet for a system making clinical claims. Certified digital mental-health tools exist, so the bar is not absolute. They are simply well-resourced, narrowly scoped and clinically validated in ways this paper does not claim to be.

How sure is this

The paper does not claim such a system helps anyone. It establishes an architecture and a way to verify it, which is necessary without being sufficient. Clinical efficacy belongs to the trials the framework invites, and this page is not treatment and not advice.

The component findings are pilot scale and should be read that way. The trust result is 18 trials on one model family. The others are pilot runs on a limited set of models and seeds. The architecture inherits those scope conditions. Against that, there are nineteen predictions with falsifiers, several of which can be run on equipment the project already has. If they fail, the architecture falls for a reason, and that is the whole format: a hypothesis and an invitation, not a treatment to prescribe.

The paper is being finalised and is not yet posted. This page is the architecture in short form. A link will appear here once it is out.

The rule layer here rests on Compliance is Behaviour, Not Information, and the wide track on Same Content, Wider Track. For the pictures behind friction, see the water page.