How do you test an agent against data that's wrong on purpose?

Reddit r/AI_Agents News

Summary

A practitioner discusses how most AI agent testing only covers the happy path, and argues for testing agents against deliberately wrong data such as implausible values, poisoned search results, malformed tool outputs, and stale information. The post asks what testing and mitigation strategies actually work in production.

Most agent testing I see checks the happy path: give it a task and real data, and see whether it gets there. What I haven't seen much of is testing what happens when the data itself is wrong, and the agent has no reason to suspect it. A few cases I keep thinking about: Implausible values. A tool returns a price that's 95% below every other source. Does the agent buy, flag it, or check elsewhere? Poisoned search results. A page in the results contains instructions or false facts written for the model. Does the agent treat it as data or as instructions? A tool that answers with nonsense. The call succeeds, but the result is empty, malformed, contradicts itself, or belongs to a different request. Does the agent notice, retry, or carry on as if it were fine? Stale data. A cached result from last week is presented as current. From the tool side I've done a bit of this: calling tools with made-up arguments to see whether the errors give a model enough to recover. But that tests the tool, not the agent's judgement about what comes back. For people running agents in anything close to production: Do you have tests like these at all, or is it caught in review or by users? If you do, how: mocked tools returning bad data, a fixed set of adversarial cases, red-teaming by hand? What actually helped: a system prompt that says "be suspicious", a validation step between the tool and the model, a second model checking, hard limits like price bounds? Has an agent of yours ever acted on bad data in a way that cost something? Interested in what works, and in what you tried that didn't.
Original Article

Similar Articles

A right answer from your agent doesn't mean it did the right thing

Reddit r/AI_Agents

The article discusses the pitfalls of evaluating AI agents solely based on their final answers, emphasizing the importance of inspecting intermediate steps, tool calls, and reasoning to catch confidently wrong outputs. It suggests using automated scoring and trace replays to measure and improve agent behavior.