← Latest papers
🤖 AI

Set-shifting Behavioral Test for Harnessed Agents

This paper introduces a set-shifting behavioral test to evaluate how LLM agents adapt to hidden changes in tool reliability, revealing that agents tend to rigidly settle on specific routines with distinct failure modes that are further influenced by how the toolset is framed.

Original authors: Ziwei Ye

Published 2026-07-16
📖 6 min read🧠 Deep dive

Original authors: Ziwei Ye

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a robot butler how to cook dinner. You give it a massive cookbook with ten different recipes for "scrambled eggs." At first, Recipe A works perfectly. The robot gets used to it, memorizing the steps and making delicious eggs every time. But then, without telling the robot, you swap out the ingredients in the kitchen. Recipe A now makes a rubbery, inedible mess, while Recipe B (which looks and sounds exactly the same) suddenly works like magic. The question is: Will the robot notice the change? Will it stop using the broken recipe and try a new one, or will it stubbornly keep trying to cook with the bad ingredients, convinced that it is the one making the mistake?

This is the kind of puzzle scientists in the field of artificial intelligence are trying to solve. They are studying how AI agents—smart computer programs that can use tools like calculators, search engines, or code compilers—handle change. In psychology, there's a famous test called the Wisconsin Card Sorting Test, where humans have to figure out that the rules of a game have secretly changed. If you keep sorting cards by color when the rule suddenly switches to sorting by shape, you might keep sorting by color out of habit. This is called "perseveration," or getting stuck in a rut. The big question for AI researchers is: Do these digital brains get stuck in ruts too? If an AI gets used to a specific tool, will it keep using it even when that tool silently breaks, or can it adapt and find a new solution?

The Paper's Story: The Secret Tool Swap

In this paper, the researchers set up a digital playground to test exactly this. They created a scenario where an AI agent is given a "harness"—a fancy word for a system that gives the AI a library of tools to solve problems. Imagine the AI is a detective trying to solve a mystery, and it has three different teams of informants (let's call them Team A, Team B, and Team C). All three teams claim they can find the same clues, and they all look and sound the same to the detective.

The researchers set up a game with a twist. For the first part of the game, Team A is the only one telling the truth. The detective (the AI) quickly learns to trust Team A and stops listening to the others. Then, silently, the researchers switch the game. Team A stops telling the truth and starts giving fake clues, while Team B becomes the reliable source. The names and descriptions of the teams don't change; only their reliability does. The researchers wanted to see if the detective would notice the switch and start trusting Team B, or if it would keep calling Team A, getting frustrated by the fake clues but refusing to give up on its old habit.

What They Found: The Stubborn and the Switchers

The researchers tested two different AI models, which we'll call "Mimo" and "DeepSeek." They found that both models got stuck, but they got stuck in very different ways.

  • DeepSeek (The Early Committer): This model was like a detective who made a decision on day one and stuck with it. If it started by trusting Team A, it would keep trusting Team A even after the switch, ignoring all the fake clues. However, if the very first choice it made happened to be the new reliable team, it would stick with that one perfectly. It didn't matter if the researchers changed the rules later; DeepSeek was locked into its first commitment. It showed a "prefix-level lock-in," meaning its very first choice dictated its entire future behavior, whether that choice was right or wrong.
  • Mimo (The Recent Historian): This model was a bit more flexible but still had trouble. It tended to stick to a mix of tools it had used recently. If it had been using Team A and Team B together, it would keep mixing them even after Team A broke. It didn't jump to the new, correct team (Team C) as easily as it should have. It showed "cell-level lock-in," meaning it got stuck in the specific routine it was doing right before the change.

The study showed that without any special instructions, these AI agents tend to form habits quickly. Once they find a tool that works, they stick with it. When the tool silently breaks, they often keep trying to use it, failing repeatedly, rather than exploring the other options that are right in front of them.

Can We Teach Them to Change?

The researchers then asked: "Can we fix this?" They tried two different methods to help the AI adapt.

  1. The "Adaptive" Instruction: They gave DeepSeek a specific rule: "If a tool fails, stop using it immediately and try a different one." This worked very well for DeepSeek, helping it switch to the new, reliable team almost instantly. However, when they tried this same instruction on Mimo, the results were inconclusive because they only tested it on a tiny number of runs. We can't say for sure if it didn't work or if we just didn't have enough data to tell.
  2. The "Polymath" Instruction: They tried another rule: "Try to use as many different tools as possible; don't get bored." This made the AI use more variety, but it didn't actually help it find the right tool faster. It was just being random.

The Power of How You Describe the Tools

Finally, the researchers discovered something really interesting about how the tools are described. They changed the "framing" of the tool groups.

  • In one version, they described the teams as Competing (like rival stores trying to sell you the same thing).
  • In another version, they described them as Complementary (like different parts of a single machine that need to work together).

They found that when the tools were described as Competing, the AI was generally more likely to switch to the new, reliable team compared to the complementary version. However, the AI still struggled overall; even with the competing framing, the success rate remained quite low (around 10-26% depending on the model). The improvement wasn't a magic fix that made the AI perfect, but rather a consistent trend where the "rival" description helped the agents break their habits slightly better than the "teamwork" description did.

The Bottom Line

This paper suggests that AI agents, much like humans, can get stuck in habits. They don't always notice when the rules of the game change silently. They tend to stick with what they know, even when it stops working. However, the study shows that we can help them adapt by giving them clear instructions on how to react to failure (though this works better for some models than others), or by changing how we describe the tools to them. It's a reminder that for AI to be truly smart, it needs to be able to let go of old habits and embrace new information, just like a good detective would.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →