Testing Modern Architectures: How to Test Systems Where Everything Is Interconnected
- October 27, 2026
- Posted by: Srinivasan Kasthurirangan
- Category: Quality Engineering
Evolved AI applications today bring together models, APIs, retrieval pipelines, databases, tools, memory, orchestration layers, and AI agents to complete a task. A single user request passes through the application, LLM, RAG, knowledge base, tool/API, AI agent, another service, and finally, the response.
In agentic systems, the flow can change based on the task. This makes AI testing harder for quality engineering teams. The challenge is to ensure all components work together reliably, even when their outputs vary. How do you know the entire system works when each component has its own way of behaving? Let’s find out.
Understanding AI Evaluation
AI evaluation is the systematic process of measuring how well an AI system performs against defined expectations.
Depending on the application, evaluation can measure:
- Accuracy
- Relevance
- Factuality
- Groundedness
- Instruction following
- Safety
- Consistency
- Robustness
- Latency
- Cost
Unlike traditional software, AI systems may not always have one exact expected output.
For example, if a customer asks an AI assistant, “How can I return a product?”, there may be several valid ways to answer the question. The evaluation checks whether the response is correct, relevant, based on the right information, and meets expectations.
An evaluation framework helps teams apply these checks consistently and track how well the AI system performs over time. An AI evaluation framework provides a structured way to define, run, automate, and monitor evaluations.
It brings together evaluation datasets, test cases, evaluation criteria, regression testing, automated checks, LLM-based evaluators, and human reviews.
Evaluate AI Agent Actions and Outcomes
AI agents add another layer of complexity. They can make decisions and take actions using tools and external systems.
User request, agent, search tool, CRM, agent, email tool, final response
AI agent evaluation looks beyond the final answer and checks:
- Selection of the correct tool
- Use of the right parameters
- Adherence to the intended workflow
- Recovery from failures
- Avoidance of unnecessary actions
- Successful completion of the task
An AI agent’s execution path can vary depending on the request. Evaluating its trajectory helps identify where a failure occurred, whether in tool selection, action execution, or the interpretation of results.
Make sure your AI agents take the right actions
Find the Source of AI Failures
One of the most common mistakes in AI testing is treating the LLM as the entire application. In reality, an AI application can contain multiple layers, such as prompt, model, retrieval, context, tools, agent logic, memory, APIs, database, and response.
Take, for instance, a retrieval-augmented generation (RAG)-based customer support assistant. The system retrieves information from a company knowledge base and provides it to an LLM.
If the final response is incorrect, several components could be responsible:
- The query was interpreted incorrectly.
- The retrieval system selected the wrong documents.
- Relevant information was ranked too low.
- The context was constructed incorrectly.
- The LLM misunderstood the retrieved information.
- The model generated an unsupported answer.
Testing only the final response makes it difficult to identify the actual source of the problem. This is why modern AI testing needs to evaluate the individual layers as well as their interactions.
Test RAG Systems
Retrieval-augmented generation (RAG) is a good example of why interconnected AI testing matters. A RAG workflow involves user query, embedding, retrieval, reranking, context, LLM, and response. Testing should cover both retrieval and generation.
| Retrieval Evaluation | Generation Evaluation |
| The retrieval layer needs to be checked for: Relevance Recall Ranking quality Document coverage Query-document alignment | For the generated answer, the key checks include: Factual correctness Groundedness Relevance Completeness Unsupported claims Instruction following |
| For example, if the correct document exists in the knowledge base but is never retrieved, the LLM cannot produce a grounded answer from that document. | Even when the LLM retrieves the correct information, it may generate an inaccurate response or include unsupported claims. |
Test How AI Agents Use Tools
Tools are critical dependencies in agentic systems. Tools may include databases, CRM and search APIs, payment services, internal business APIs, calculators, and code execution services. Testing should verify both the agent and the tools.
| Component | What to Evaluate |
| Agent | Tool selection, tool-call sequence, parameter generation, response interpretation |
| Tool | Input validation, response correctness |
| System | Final business outcome |
This separation makes failures easier to diagnose. If the agent selects the correct tool but sends invalid parameters, the problem is different from selecting the wrong tool altogether.
Test Multi-Agent Architectures
The complexity increases when multiple agents work together. A multi-agent system may include an orchestrator agent that coordinates research, analysis, and validation agents. Even when each agent does its part, things can go wrong when they hand off work to one another. To catch these issues, test:
- Agent-to-agent communication
- Task delegation
- Context transfer
- Handoffs
- Conflicting outputs
- Repeated or unnecessary actions
- Overall task completion
If the research agent finds relevant information but the analysis agent receives incomplete context, the final answer may be incorrect even though both agents individually pass their tests. This demonstrates why interaction testing is as important as component testing.
Build Evaluation Around Real-World Scenarios
AI evaluation should cover more than simple prompts. The test dataset should reflect the requests users make, including complex questions, missing information, edge cases, and situations where tools fail. For each scenario, define what the AI system should do.
| Scenario | Expected behavior |
| A customer asks about a policy | Provide a correct answer supported by the available information |
| A user leaves out key details | Ask for clarification |
| The requested information is unavailable | Acknowledge the gap instead of making up an answer |
| An external API fails | Handle the failure safely |
| A task requires multiple tools | Use the right tools in the correct sequence |
| A user requests an unauthorized action | Refuse the request or offer an appropriate alternative |
These test cases give developers a clear way to check whether the AI system handles routine requests and less predictable situations as expected.
Combine Multiple Testing Approaches
No single testing technique is enough for complex AI systems. Combining these approaches helps check whether the system works as expected and continues to meet quality standards.
| Testing Method | Purpose |
| Deterministic testing | Checks API status codes, required fields, data formats, tool parameters, schemas, authentication, and business rules. |
| Human evaluation | Reviews response quality, usefulness, tone, completeness, and subtle factual issues. It is especially useful when building and validating evaluation datasets. |
| Automated evaluation | Assesses large volumes of AI responses against predefined criteria. |
| LLM-as-a-judge | Uses an LLM to evaluate another model’s output against a defined rubric. Its judgments should be validated using human-reviewed examples and deterministic checks. |
| AI regression testing | Checks whether changes to the model, prompts, retrieval settings, knowledge base, or tools affect existing behavior. Before deployment, teams can run an established evaluation dataset and compare results against a baseline. The goal is to keep important behaviors within acceptable limits, not to produce identical responses. |
Measure AI by What It Delivers: Expert Perspective
The biggest shift in testing modern AI architectures is moving from output testing to system evaluation. When AI systems were primarily model-centric, teams could focus heavily on model accuracy. Today’s AI applications are increasingly system-centric, with the model serving as one component within a larger architecture.
Testing teams need visibility across the complete chain, from model, prompt, retrieval, tools, agents, data, APIs, to business outcome. A thorough AI evaluation needs to answer three questions.
1. Did the system produce the right answer?
The focus here is on response quality, accuracy, relevance, and groundedness.
2. Did the system take the right path?
This involves agent behavior, tool selection, retrieval, reasoning trajectories, and workflow execution.
3. Did the system achieve the right outcome?
The key consideration is whether the system met the actual business objective.
The third question is particularly important. An AI support agent might correctly explain how a refund works but fail to initiate the refund when authorized to do so. From a system-testing perspective, the final business outcome matters as much as the quality of the generated text.
Build Evaluation into the Development Lifecycle
AI evaluation should not happen only before production. A mature approach integrates evaluation throughout the lifecycle, from development, testing, evaluation, and comparison to deployment, monitoring, learning, and re-evaluation.
Every meaningful change can trigger evaluation against representative scenarios. This allows teams to identify regressions earlier and continuously improve the system.
Treat Failures as Diagnostic Signals
When an evaluation fails, the objective should be to identify the source of the failure and address the root cause. The failure pattern can help pinpoint the underlying issue.
- Incorrect answer: The retrieval process may have returned irrelevant information.
- Wrong action: The agent may have selected the wrong tool.
- Invalid parameters: The tool call may have used incorrect inputs.
- Incorrect business outcome: The workflow may have failed despite a correct response.
This diagnostic approach helps engineering teams identify the source of failures and improve the system. It turns AI evaluation from a scorecard into a way to understand and address problems.
Find the gaps in your AI testing approach
Run Your AI System Through Its Paces
When AI application architectures evolve, testing needs to evolve with them. Traditional software testing remains the foundation, but teams also need all the elements discussed above. The key is to stop viewing AI quality as a question of whether a model generates a good response.
We need to know whether the interconnected AI system reliably produces the intended outcome across its models, data, tools, agents, dependencies, and workflows.
As AI systems become more autonomous and interconnected, system-level evaluation will become an increasingly important part of AI engineering and software quality practices. The future of AI testing also means testing the connections between components.

Senior Project Manager with 16 years of experience in the IT industry and expertise in the retail domain. Srinivasan specializes in modern software testing and shares practical insights on quality engineering and digital transformation.