[KongchangAI]
· 2 min read· 1,423 words

AI Model Evaluation in Practice: New Testing Thinking from LLM to Agent

AI Model Evaluation in Practice: New Testing Thinking from LLM to Agent

AI outputs are probabilistic; use evaluation instead of assertions to measure quality across LLM, RAG, and Agent layers.

The article explains that traditional software testing relies on binary assertions, but AI outputs fall between right and wrong and must be scored—hence the industry uses "evaluation." Evaluation objects are three progressive layers: LLM basic capabilities, RAG knowledge bases (retrieval and generation quality), and Agents (basis, actions, results, risk disclosure). It also covers three AI-testing modes and stresses that understanding LLM, RAG, and Agent principles is key to effective evaluation.

Why AI Testing Is Being Renamed "Evaluation"

The core of traditional software testing is assertion—results are either right or wrong, and automated scripts can clearly determine pass or fail. But when facing AI systems, this binary judgment breaks down. AI outputs often fall in the transitional zone between "right" and "wrong," requiring scores rather than boolean values to express quality. For this reason, the industry increasingly favors the term "Evaluation" to distinguish it from the assertion mechanism in traditional software testing.

Behind this terminology shift is a fundamental change in the test object. When software moves from deterministic logic to probabilistic models, testers' thinking also needs to shift from "verifying correctness" to "measuring quality." In the course, the Bilibili creator explicitly points out that AI evaluation objects can be summarized into three progressive layers: large language models (LLM), Retrieval-Augmented Generation (RAG), and agents (Agent).

The difference between AI testing and evaluation

Three Layers of Evaluation Objects: LLM, RAG, and Agent

Layer One: Evaluating the Fundamental Capabilities of Large Models

Large language models are the most basic form of AI capability, with chatbots as the typical scenario. Pinduoduo once launched an AI chat feature where users could converse with various virtual characters, offering a strong sense of immersion. But such applications have a low barrier to entry—simply integrating a large model is enough. The evaluation focus is on the reasonableness, coherence, and safety of model responses, not the correctness of business rules.

According to the creator's analysis, mainstream domestic large model APIs (such as DeepSeekAd, Alibaba, MiniMax, Zhipu, etc.) are basically compatible with the OpenAI API standard, which makes it convenient for testers to set up evaluation environments. However, note that there are currently almost no free large model APIs; in actual work, they are usually provided by the company.

"Compatible with the OpenAI API standard" means that various large model services follow the OpenAI Chat Completions specification in request and response formats: the same SDK, the same messages array structure, and the same return fields—only base_url and api_key need to be replaced to switch model providers. For testers, this means an evaluation script can be written once and used to horizontally compare the performance of multiple models such as DeepSeek, Tongyi, and Zhipu; when switching models or doing A/B evaluations, changing one line of configuration is enough, greatly reducing the cost of setting up evaluation environments and maintaining multiple sets of adaptation code.

Layer Two: Retrieval and Generation Quality of RAG Knowledge Bases

When AI needs to conduct conversations around specific business rules, a large model alone is not enough—a knowledge base (RAG) must be introduced. Take fresh food after-sales as an example: if a user's fish arrives with one piece thawed, should there be a full refund or a one-third refund? This depends on the after-sales rules stored in the knowledge base. RAG splits the process into two stages: "retrieval" and "augmented generation," and evaluation must separately cover retrieval quality and generation quality.

The role of knowledge bases in AI applications

The creator emphasizes that the quality of the knowledge base itself directly determines the boundaries of AI behavior. If the knowledge base is missing or the rules are vague, the AI will either fail to give a satisfactory answer or provide incorrect grounds. Therefore, evaluating RAG is not only technical testing but also quality control of business knowledge engineering.

RAG stands for Retrieval-Augmented Generation, first proposed by Facebook AI Research in a 2020 paper. Its basic idea is: before the model generates an answer, use the user's question to retrieve relevant snippets from an external knowledge base, then splice these snippets as context into the prompt so the model answers based on factual material. This mechanism bypasses two major shortcomings of large models: "enterprise private knowledge cannot be stored in parameters" and "prone to fabrication." A typical RAG pipeline includes document chunking, embedding, vector database retrieval (such as FAISS, Milvus), and reranking. Recall bias in any stage is passed on to the final answer, which is why evaluation needs to treat retrieval and generation separately.

Layer Three: Behavior and Outcome Evaluation of Agents

Agents are the highest form of AI capability—they must not only "speak" but also "act." When a user requests a refund, the Agent needs to call real APIs to complete the financial operation. The evaluation focus then expands: whether the basis is correct, whether the action is executed, whether the execution result meets expectations, and whether there is additional risk disclosure during the process.

Evaluation points for Agent action execution

This layer has the highest evaluation complexity because the Agent's behavior chain is long, involves external system interactions, and has diverse failure modes. In the course, the creator treats Agent evaluation as a natural progression from LLM to RAG, with the three forming a step-by-step learning path.

An Agent refers to a system that uses a large model as its decision core and can autonomously plan steps and call external tools to complete tasks. Unlike pure conversation, an Agent usually has capabilities such as tool calling (Function Calling), task decomposition, memory (short-term context and long-term storage), and reflection/retry. Its work loop can be summarized as "observe—think—act": the model reads the current state, decides which API to call next, and continues based on the returned results until the task is complete. Because it can truly modify external systems (place orders, issue refunds, send messages), evaluation must not only look at the final answer but also review whether the tool selection and parameters at each intermediate step are correct. This also explains why the Agent layer has far more failure modes than the previous two layers.

How Testers Should Respond to the AI Software Wave

There are three modes of combining AI and software testing: using AI to test (AI as a tool), letting AI test (AI as the protagonist), and testing AI (AI as the object under test). In the first two modes, testers and AI are collaborators; in the third mode, testers and AI form a "face-off"—AI itself becomes the system that needs to be verified.

According to the Bilibili creator's observations, this trend has penetrated various types of software. Apps from large state-owned enterprises such as China Mobile and China Telecom have integrated AI features, and products such as Tencent's Urban are also exploring AI-native experiences. Even purely manual testers cannot avoid the responsibility of ensuring the quality of AI features.

The course environment setup is not complex: Python, Node, and a large model API are enough. The creator suggests that beginners can start with low-cost APIs such as DeepSeek for hands-on experience, but in formal work, compliant model services should be provided by the company.

From Assertion to Scoring: Putting Evaluation Thinking into Practice

AI evaluation is not a negation of traditional testing but an extension. Traditional assertions still apply to deterministic logic parts, while AI output parts require scoring mechanisms, benchmark test sets, and human review. In the course outline, the creator covers evaluation methods, scenarios, and cases, but emphasizes that the core lies in understanding how AI systems work—only by knowing how LLMs generate, how RAG retrieves, and how Agents make decisions can effective evaluation plans be designed.

For testing practitioners, mastering AI evaluation capability is changing from a "bonus" to a "must-have." Integrating AI into software has become the norm, and products building AI-native software are also increasing, so the scope of testing will inevitably expand accordingly.

One-line Summary

AI outputs are probabilistic, requiring "evaluation" instead of assertions, measuring quality progressively across LLM, RAG, and Agent layers.

Paragraph Summary

The article points out that traditional software testing relies on right-or-wrong assertions, while AI outputs fall in the transitional zone between right and wrong and can only express quality through scores—hence the industry uses "evaluation" to distinguish it from traditional testing. Evaluation objects are divided into three progressive layers: LLM fundamental capabilities (focusing on reasonableness, coherence, and safety of responses), RAG knowledge bases (requiring separate evaluation of retrieval quality and generation quality, with knowledge base quality directly determining AI behavior boundaries), and Agents (examining not only answers but also correctness of basis, action execution, result compliance, and risk disclosure). The article also outlines three modes—using AI to test, letting AI test, and testing AI—explaining that AI features have penetrated various types of software and are hard for testers to avoid, and emphasizing that understanding the principles of LLM generation, RAG retrieval, and Agent decision-making is a prerequisite for designing effective evaluation plans.

#AI testing#LLM evaluation#RAG#Agent#AI model evaluation#software testing
Share:

Related articles