Optimal, Not Perfect
A test-bed for AI systems that must follow rules and be checked on doing so, with counselling as the leading case
Paper 32 · Pødenphant Lund (2026) · working paper, no DOI yet
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 follows is not an AI psychologist. It is a test-bed for advisory systems that have to follow rules, and the counselling conversation is the heaviest case to try it on.
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 bare rationale. The design choices are motivated by a mechanism, a competition between directives and a split of rules into two types, and each choice carries a falsifier: if the mechanism does not hold, the choice can be shown wrong for a reason rather than merely outperformed. 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.
The three have to be measured against what an operator already assembles today: guardrails on the way in and out, policy alignment, a self-check for hallucination, and a reject option. Two of them hold against that baseline. The audit spine does something a guardrail log does not, since the log records that something was blocked but not whether the rule in force was actually applied. The consequence gate routes on how much is at stake rather than on the model's own confidence, which is exactly the point when that confidence cannot be trusted. The derivation is the weakest of the three. Retrieve the open set, train the closed residue, widen the track, treat abstention as a decision: that overlaps substantially with ordinary practice. What is new there is the split by rule type and the falsifiers, not the individual choices.
Why the two streams compose
The system draws on two places. One is classical psychology together with the clinical side of friction theory: what works on a person, and why. The other is the papers that measure language models: how to make a model follow a rule, recall correctly, dose how far the present context may override what was trained in, and where it does not reach.
What licenses putting them together? Not that the two substrates are the same. It is a shared vocabulary. Friction theory describes a bounded choice as the same sequence in both places: several routes are weighed at once, evidence accumulates, one crosses the threshold and is taken, and it leaves a trace that makes it easier next time. A person's old pattern against the new one, and a model's rule against the most fluent continuation, can both be described that way. That they are therefore the same kind of event follows from the vocabulary rather than from a measurement, and the architecture does not rest on it.
What the shared language does earn is relevance. It makes the language-model findings a motivated source of design choices for a tool people will use, rather than something merely adjacent to it. And the split is kept throughout: it is the engineering choices the model findings cover, how a rule is encoded and retrieved, how wide the track should be, how an intervention is dosed. The picture of the person, the four fields and the pressure that governs when a choice locks in, comes from the clinical theory and rests on human evidence, not on data from a model.
There is one place where the two sides meet in the same prediction, and it is worth looking at, because it shows what "covered" means here. On the language model, a correction given in context overrides a trained-in disposition only when pressure is low and the correction recurs. Clinically, the claim is that a new experience overrides an old pattern only under lowered arousal and with repetition. That is the same sentence in friction theory's vocabulary, and each side can be tested on its own: on the model by varying pressure and repetition, on the person by lowering arousal and repeating. The vocabulary makes the transfer a motivated working rule. It does not make it one result.
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 titled Optimal, Not Perfect: A Test-Bed Architecture for Rule-Governed, Automatically-Auditable AI Advisory Systems, with Counselling as the Leading Case. It is being finalised, has no DOI yet, and is aimed at AI & Society. This page is the architecture in short form; the link will appear here once it is posted.