Testing breaks down when it covers only model output and ignores the operational stack. A system can pass language tests yet still choose the wrong tool, expose sensitive retrieval data, or take unsafe actions after a context change. For governance, that means the evaluation does not match the deployed risk surface.
Why AI Testing Fails When the System Extends Beyond the Model
Once an AI product can call tools, query retrieval, or retain memory, the thing being tested is no longer just a language model. The evaluation target becomes a workflow with state, permissions, and side effects. That matters because a polished answer can hide a bad tool choice, an over-broad retrieval result, or a memory update that changes later behaviour in ways the test never exercised. NIST’s NIST AI 600-1 Generative AI Profile is useful here because it frames generative AI risks as system risks, not prompt-only risks.
Teams often overestimate test coverage when they validate model quality in isolation and never recreate the execution path, so the first real failure appears only after the system has already touched a live tool, retriever, or memory store.
How Tool Use, Retrieval, and Memory Change the Failure Mode
Tool use introduces action risk. The model may appear correct in text while selecting the wrong function, passing unsafe parameters, or triggering an unintended workflow. Retrieval introduces information-selection risk. The answer can be fluent while the retrieved context is stale, over-broad, poisoned, or simply irrelevant to the user’s actual need. Memory introduces persistence risk. A prior interaction, preference, or intermediate state can quietly shape later outputs, so a test that starts from a blank slate may miss the stateful behaviour that users encounter after several turns.
These are different failure classes, and they need different checks. A good test plan asks whether the system can:
- choose the right tool for the right reason, not merely produce the right text
- limit retrieval to the minimum necessary context
- avoid surfacing data that should stay unavailable in the current session
- remain stable when memory, context, or retrieved facts change between runs
- fail safely when the system is uncertain, missing context, or given conflicting inputs
That is why the most useful evaluation combines model output review with scenario testing across the full stack. The test must reproduce permission boundaries, retrieval behaviour, and memory state, otherwise it measures a simplified interface rather than the deployed system. Where retrieval, tools, and memory are governed by different owners or logs, the evaluation also needs traceability for each layer so a failure can be attributed correctly. In practice, many teams discover the gap only after they have already approved a model that behaves well in isolation but inconsistently once the orchestration layer is active.
Where the Usual Test Plan Breaks Down
Tighter testing often increases cost and coordination overhead, because the team has to validate state, permissions, and downstream side effects rather than a single prompt-response loop.
The standard approach breaks down in a few common edge cases. A retrieval system may be technically accurate but operationally unsafe if it returns sensitive records that should not have been in scope for that request. A tool-using agent may pass every text benchmark and still be unreliable if its function calls depend on brittle prompts, hidden routing rules, or dynamic context that changes between environments. Memory adds an additional ambiguity: some products use short-lived session context, while others persist preferences or task history, and those behave very differently under test. There is no full consensus on a single universal evaluation recipe for these layers, but there is strong agreement that model-only testing is incomplete once the system has execution authority or persistent state.
For this reason, the question is not whether the model can answer well in a vacuum, but whether the deployed system behaves safely when the surrounding control plane changes. If the test harness cannot observe tool calls, retrieval inputs, and memory updates, it cannot explain why a failure happened or whether the failure will recur under similar conditions.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST AI RMF, NIST AI 600-1, NIST CSF 2.0 and CIS Controls v8 set the technical controls, while ISO/IEC 42001:2023 define the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | GV-1 — Govern AI Risks | Covers evaluating AI as an end-to-end system, not only model output. |
| Recommendation — Assess the full AI workflow, including tools, retrieval, and memory, before approving deployment. | ||
| NIST AI 600-1 | MAP-1 — Map the Generative AI System | Frames genAI risks across system components and operational context. |
| Recommendation — Map the deployed stack and test the interactions that create system-level risk. | ||
| NIST CSF 2.0 | GV.RM-01 — Risk Management Strategy | Supports governance of AI testing gaps that affect broader security posture. |
| Recommendation — Align AI evaluation scope to the actual operational risk surface, not just the model. | ||
| CIS Controls v8 | 8.1 — Establish and Maintain an Inventory of Enterprise Assets | Testing depends on knowing the tools, stores, and services the AI can reach. |
| Recommendation — Inventory the AI-connected tools, retrieval sources, and memory stores under test. | ||
| ISO/IEC 42001:2023 | 6.1 — Actions to Address Risks and Opportunities | Applies when organisations govern AI risk across the full operating context. |
| Recommendation — Define AI risk treatments for orchestration, persistence, and data-access behaviours. | ||
Practitioner Guidance
What to prioritise: Test the highest-consequence path first, which is usually the path that combines retrieval with action. A system that can only misstate an answer is one problem; a system that can retrieve sensitive data or trigger a tool is a different one.
What to verify: Verify that each test case captures the full execution trace, including what was retrieved, which tool was selected, what parameters were passed, and whether memory changed the later turn. Without that evidence, a “pass” can be misleading.
Decision rule: If the system can change state, access data, or act on behalf of a user, treat model-only evaluation as necessary but not sufficient. The test has to cover orchestration behaviour, not just generation quality.
Common mistake: Treating retrieval accuracy as if it were automatically safe. High-quality retrieval can still be the wrong retrieval if it exceeds the user’s scope, brings in stale context, or creates a privacy exposure.
Practitioner takeaway: The right unit of evaluation is the AI workflow, not the model prompt, because that is where hidden risk actually appears.
Related resources from NHI Mgmt Group
- What breaks when AI tools do not share memory across investigations?
- What breaks when AI security testing ignores undocumented endpoints?
- What breaks when AI testing ignores workflows and integrations?
- What breaks when AI security testing is limited to the model layer and ignores enterprise controls?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org