Article
The test that learns from the analysts.
How we turned an analyst team's daily decisions into a test an AI agent passes on every change, and why the learning stays with people.
An agent checked by eye
For an organisation that works with security and research bodies, we built a research agent. It takes a person or an organisation with one anchor, a website or a profile, and searches on its own for websites, social accounts, emails, phone numbers, registration numbers and addresses. Every finding goes to an analyst, who approves or rejects it.
We had around 140 automated test files. They check that the code does what we designed, but not that the agent finds the right things in the real world. Until now, that was checked by one contact at the client, by hand, every round.
An agent checked by eye is still an experiment. What makes it a product is a test that runs on every change and says, in numbers, whether it got better or worse.
The answers were already written
To test an agent like this you need correct answers, and writing them by hand takes weeks. But the client had already written them in their daily work. Every time an analyst approved a finding, they set what the agent must find. Every time they rejected one as “belongs to someone else”, they marked a trap the agent must not fall into.
We built a golden test set from those decisions. The agent gets only a name, a type, a country and one anchor, in a separate test case, and runs as usual. Then we compare what it found with what the analysts decided:
- RedThe agent claimed something an analyst had already rejected, or the run did not finish.
- YellowLess than half of the expected findings, a correct finding not claimed, or a trap returned as an ordinary finding.
- GreenEverything else.
Every run is compared with the previous one. The test runs only in the development environment and approves nothing, so nothing reaches the client's system.
For the pilot we picked eight hard entities on purpose: identical names, people as well as organisations, sites in Turkish and Portuguese, several countries, and an anchor that is only a social account.
What the first run found
Four green, two yellow, two red. 64% of the expected findings were found, for about ten dollars for the whole run.
Both reds were people, for the same reason. The agent treated a name match as proof. It claimed profiles of other people with the same name, including one an analyst had already rejected and one belonging to a well known actor, and even recorded the person as working for the namesake's employer.
The cause: the strict rule for identical names applied to organisations and not to people. Alongside it was a small bug: a LinkedIn profile on a country subdomain was not recognised as the same profile, so the real profile looked foreign.
Nobody had reported this in the manual review rounds. The test caught it on its first run and put a number on it.
Fixed within an hour
The new rule: a name match alone is never enough. It needs a second signal: a link to or from the anchor, a known handle, the organisation of an approved connection, or the entity's country on the profile. Without one, the finding is kept as a weak lead in a collapsed group the analyst can still see.
We added tests with the real cases and re-ran only the two people who failed, for about half a dollar. Both moved from red to yellow, with zero wrong claims. Once approved, the fix went to production. From the idea to a fix running in production took one hour.
A test that grows, with a person at the gate
The next question was how the test keeps learning. The obvious answer is to let it learn from the agent's own results, and that is also the dangerous one. A test like that learns to accept the agent's mistakes as correct answers. So it learns from the analysts, through three mechanisms:
- 1. A weekly harvestAn automated task reads the week's analyst decisions and proposes new traps and up to three new entities for the set. Every rejection is a real agent mistake with a human label.
- 2. A queue of unknown findingsAnything the agent claimed that is not in the set goes on a short list, and a person marks it correct or a trap.
- 3. A fix plan for every redWhen something turns red, an automated task reads the run logs and the code, finds the cause and prepares a fix plan with a cheap verification run. The plan waits for approval.
The client's feedback rounds now go through the test too. Each round is built in development and checked against the relevant entities before it is wrapped up, and a round that caused a red is fixed or rolled back.
What this means for your organisation
Almost every organisation has a process where people approve, reject and correct things every day. A sales manager approving a quote, a service agent correcting a reply, a quality inspector rejecting a part. Those decisions are the most accurate record of how the work should be done, and they usually disappear inside the system.
AI can collect them, turn them into a test, and measure every change to the process against it, automated or human. Improvement turns from a feeling into a number, and a repeating mistake shows up in the first week instead of after six months.
And learning does not mean the system changes itself. It proposes, and a person approves. In processes where a mistake is expensive, that is the difference between a system you can trust and another pilot.
Related
- Autonomous agentsAn AI agent doesn't just answer questions. It carries out a task end to end: it reads, decides by rules we define together, acts in your systems and reports back. In a project Shahar Peer led before founding Pele, at a medical equipment company, one agent built into the existing lead process lifted lead conversion by 56%.
- Process automationOrder entry, CRM updates, quotes and reports that someone copies by hand. We take one process that costs you hours every week and rebuild it inside the systems you already run.
Tell us the process that costs you the most hours.
Twenty minutes with both of us. You'll leave knowing whether AI belongs in that process, including when the answer is no.