Sunday, November 29, 2026 Independent reporting on artificial intelligence Newsletter
AI News Beats
Guides & Insights

How to test whether an AI agent actually finished the job

An AI agent saying it finished is not evidence that it did. A Hugging Face guide shows how to check the work, test the grader, and measure repeatability.

A woman reviews paperwork at a desk beside a laptop
Photo: Tima Miroshnichenko / Pexels

An AI agent says it sorted your files. You open the folders and find that two files went to the wrong place and one disappeared. The agent may sound just as confident as it would after a successful run. To tell those cases apart, you need to inspect the work the agent left behind.

A November 23 guide from Hugging Face researchers shows how to build that kind of test. It treats an evaluation as more than a question and a correct answer. The setup includes the agent and its tools, the starting state, and a way to check what changed. You can start with a small, made-up task before deciding whether the system is ready for real work.

Write down what success looks like

Imagine you want an office assistant to sort eight fictional files into three folders: Paid, Pending, and Needs Review. Give it a small table that maps invented invoice IDs to their status. The filenames contain the IDs but not the status. Write down the instructions before the test: sort the files with an exact match in the table, send files with a missing or conflicting match to Needs Review, and do not change any file’s contents.

Build examples that exercise those rules separately. Include an ordinary paid invoice, two similarly named invoices with different IDs, and one filename with an ID that never appears in the table. Use dummy text files and a temporary copy of the folder, not your real invoices or a shared drive. The task is to see whether the agent can follow a narrowly stated procedure, not whether it recognizes the layout of a real invoice.

Grade the folders, not the explanation

Prepare an answer key listing the correct final path for each of the eight files. After a run, compare that key with the actual output. A file that appears in the correct folder and is also left in the input folder should not count as a clean move. Check that every original file still exists once and that its contents are unchanged. If the agent writes a summary, keep the summary for review, but do not let it substitute for those checks.

Test your checker before you test the agent. A manually sorted copy should pass. A folder left in its original state should fail. Then give the checker a deceptively tidy result: eight files in the right-looking folders, with two IDs swapped. If that passes, the test is counting files but not checking identity. Fix that before you interpret any model scores.

Hugging Face found a comparable issue in its example about analyzing lab data: a checker that looked only at a final ratio could accept an answer produced without fitting the spectrum. The team added checks of the fit itself. The broader lesson is to test the result that supports your claim without forcing every agent to use an identical series of steps.

Repeat from the same starting point

Use a fresh copy of the eight files and the same instructions on each attempt. Keep the model version and the tools constant if your goal is to check consistency. If you change one component, write down what changed. Otherwise it is hard to tell whether a better result came from a stronger model, a clearer prompt, or a tool that was previously unavailable.

Count both full passes and the types of failure. Say you run three versions of the task three times each. One may pass every time, another may pass only on its third attempt, and the last may never pass. Two out of three tasks succeeded at least once, but only one succeeded consistently. That distinction matters if no one is going to be present to spot a mistake and rerun the job.

In the Hugging Face example, one setup passed 11 of 24 attempts across eight development tasks. Seven tasks passed at least once, but only one passed on all three tries. The authors caution against extrapolating from a small development set. For a small office test, the same caution applies: a trial can expose specific problems, but it cannot tell you how the agent will handle every unusual case.

Keep enough detail to diagnose a failure

Record the final folder listing and any actions the tool records. If the agent stopped early, that is a different problem from misreading the IDs or moving a file it should have left alone. Write down the run conditions and the version of your checker, so you can reproduce the result after an update. If you revise the rules, run the answer key and the deliberately wrong examples again.

Once the agent passes the small exercise, reserve a second set of fictional files it has not seen during development. Try new naming patterns and, where relevant, different table formats. Use the result to decide the next limited test, not to justify access to real records. The useful outcome is not a promise that the agent can sort anything. It is a clear account of what it did correctly, what it missed, and how reliably it repeated the result.

Stay on top of AI

Get the stories that matter in artificial intelligence, straight to your inbox.

Free. One email with the stories that matter. Unsubscribe any time. See our privacy policy.