Skip to content
BionicAdri

Mirror decision models: how ADRI decides, monitors and corrects itself

They are small models that work alongside ADRI's main agent and answer closed questions with a probability. At first they only observe; when they demonstrate that they are more accurate than the code rule, they decide which tool to use, which data to discard or which step to take. That way we spend less, take less time and make fewer mistakes, with every change measured.

Esquema del agente principal de ADRI con un modelo de decisión espejo al lado que revisa la herramienta antes de ejecutarla, con las fases sombra, jueces y mando

We already told what ADRI's harnesses are and what role the decision-maker plays. Here we go down a level: how that decision-maker works "in mirror" alongside the agent, how it stops a tool before it is executed, when it corrects the agent and in which cases it takes the step itself. And how we measure it before giving it power.

What is a mirror decision model

An ADRI agent makes dozens of small decisions in each task. Is this page read with its HTML or does a browser need to be opened? Is this piece of data from the company we are looking for or another? Previously, these questions were resolved with keyword rules written in the code.

The mirror model is a small, fast model that does not write text. It receives two things: the state (what the agent has in front of it) and a typed question. It responds with a closed option and a probability. There are three types of question: yes or no, choosing an option from a list and giving a score. If there are several questions about the same state, they all go in a single call.

The 'typed' part matters. The answer is not a paragraph: it is html_basta or necesita_js, with a 0.93 next to it. The code validates it against the permitted options; if anything else arrives, it is discarded.

Three non-negotiable rules

  1. Facts are decided by code. Whether a tool was called, whether it returned an error, whether a file exists or what permissions a user has: that is not asked to any model. The model only judges meaning.
  2. In security, it can only harden. It can lower a level, add a veto or request confirmation. It can never grant a permission. Some, like the depth of a security audit, can never command.
  3. Nothing commands without measuring. Everything first goes into shadow.

How the shadow works

In shadow mode, the mirror model answers the same question that the code rule already answers, but in the background. The agent does not wait for it: the latency it adds to the user is zero. If there is a bottleneck, that sample is discarded instead of slowing the task down.

Each decision is recorded: what the rule decided, what the model decided, with what probability and how long it took. Personal data is redacted before leaving. The agent's output is identical whether the shadow is on or off.

This is how we accumulate thousands of real cases, and the disagreement between rule and model is exactly what needs to be studied.

How to go from shadow to control

It goes decision by decision:

  1. Shadow with real traffic for days.
  2. Sample: all disagreements and a portion of the agreements.
  3. Judges: two large models from different families label each case independently. Only what both label the same counts.
  4. Comparison: rule accuracy versus mirror accuracy when it is sure.
  5. One-way control, if the mirror wins clearly.

When it is in charge, the mirror only decides if its probability reaches 0.85. Below that threshold, or if it takes too long, fails, or its quota runs out, the usual rule decides. Each control is turned off separately from the settings, without touching code.

An example with numbers. In the automated SEO audit, the mirror decides what language the main text of each page is in. Out of 70 pages judged on 11 October, the rule was right 36% of the time and the mirror 100%. Since that day, the mirror is in charge for that question.

Monitoring the tools before running them

Here is a good part of the savings: many tools are expensive in time or money, and whether to use them or not was a fixed rule.

  • Open a browser or is HTML enough? In a real batch on 10 October, the code requested a browser for 52 pages; the mirror said for 48 that HTML was enough, and 42 browsers were saved. That day, the median wait to get a browser was 142 seconds.
  • Which sources to open? When researching a company, the mirror classifies each link (official website, directory, something else) before opening it. Measured on 3 October with real traffic, when it is sure it is right 97% of the time versus 56% for the rule.
  • Is another search needed? Before launching an additional query, the mirror checks whether the data is already in what has been gathered.
  • Was it a format error? When a tool fails, the system decides whether the error was a format error so it can learn not to repeat it. That lesson is shared across tasks, so a false 'yes' would contaminate it. Here the mirror has a veto: it can remove a 'yes' from the rule if it is sure it is 'no', but never add one.

Correcting the agent when it makes a mistake

The mirror also reviews what the agent produces. Here we are more careful: correcting wrongly is worse than not correcting.

  • Data from another company. When researching an entity, a piece of data taken from a page (a CIF, a template, a phone number) may belong to another company that appears in the same text. The mirror decides whether the data belongs to the entity being searched for and removes the one that does not. After redoing the question and the state, between 10 and 11 October it went from 64% to 91% accuracy, with no high-confidence errors in the test sample.
  • Unsupported claims. At the output of all agents, a judge checks whether the response says it has sent, published or verified something that the tool trace does not support. Today it is in shadow mode: it logs, it does not touch the response.
  • Task progress. Instead of fixed call caps, a control decides whether the agent should continue, change approach or stop and deliver. When it is in charge, it will only add a warning; it will never cut the task short. It is still in shadow mode: in the first measurements it gave false “change approach” with high confidence.

Doing the step itself

The goal is for the small model to do complete steps instead of the large one, only where the data justifies it.

In the SEO audit it already does this: a single call per page answers four questions (page type, whether it is a disguised error, language and decorative image). On a second website, an online shop that was not used to write the questions, it got 99% right on page type versus 84% for the rule.

In the browser, it still does not drive. We already have the question ready: which operation is needed (click, type, scroll, finish…) and on which element. In the first measurements it disagreed too much with the agent, so we will start with trivial steps.

Sometimes measuring says no. In the scheduler we measured 30 days of tasks: the time was the large model reasoning, not mechanical steps. There was nothing to remove and it was not built.

How much is saved

  • End-to-end time. On 5 and 6 October we repeated 11 real tasks three times, with the controls on and off. With controls they took 863 seconds in total; without them, 1,124 (23% less). Quality, judged blind, came out the same. On very simple tasks, the controls added between 2 and 13 seconds.
  • A research round. With the same brief, on 10 October it went from 17 minutes to 5 minutes and 46 seconds, and calls to the main model from 71 to 36. Note: that improvement adds the controls and other fixes from the same day, such as more browsers in parallel.
  • Cost of the mirror itself. Between 29 September and 1 October, 3,618 decisions cost $0.043 in total. On the server, each decision takes about 63 milliseconds on average; going through our gateway, between 0.3 and 0.9 seconds.

Limits and current status

  • The small model also fails. The difference is that its failure is logged and measured, and that below the threshold the rule decides.
  • When it fails safely, it is usually missing information. If the judges get it right with the same text and the mirror does not, the state we give it is at fault; if the mirror hesitates, the question is usually at fault.
  • Most of it is still in shadow mode. Between 8 and 11 October we logged 74 decision points. On our central server, 16 call the shots. In a new installation, the mirror arrives off and turns on when a decision is made.
  • It does not replace review. A person still validates what matters.

How we protect data along the way is explained in security and compliance. To see the specialists at work, look at what ADRI does or try it in the chat with ADRI.

  • AI agents
  • Typed decisions
  • Shadow mode
  • ADRI

No-obligation demo

See it with your company's data

We show you ADRI working on a real task of yours, in about 15 minutes.

[email protected]+34 604 87 17 35