How to Scientifically Evaluate New LLMs: A Practical Testing Guide for Developers
Whenever a new large language model is released, developers often rely on official benchmark scores or scattered personal experiences, both of which have significant limitations. This guide introduces a structured and reproducible evaluation process for development teams. It covers defining evaluation goals, designing custom test sets, testing core capabilities such as coding and reasoning, and assessing engineering metrics like cost and stability. By implementing this framework, developers can draw reliable conclusions tailored to their real-world business tasks rather than relying on general benchmarks.
1. Why Benchmarks Cannot Replace Practical Testing
Whenever a new generation of large language models (LLMs) is released, the community typically produces two types of responses: one directly quotes official benchmark scores, while the other relies on scattered “personal experiences.” Both approaches have obvious limitations.
The problem with benchmarks lies in data contamination and overfitting risks. If test questions have appeared in the training corpus, high scores might simply be the result of memorization rather than genuine reasoning ability. Furthermore, public leaderboards tend to favor English scenarios and specific question types, offering limited relevance to Chinese language business needs or real-world engineering tasks.
Conversely, personal experience-based evaluations suffer from small sample sizes and unrepresentative tasks. Conclusions drawn by an individual asking a few questions have high variance and cannot be generalized to a team’s actual business scenarios.
Therefore, the rational approach is to establish a structured, reproducible evaluation process to obtain sufficiently credible conclusions at a low cost. This is exactly what this article will explore.
2. Preparation: Defining Goals and Test Set Design
1. Define What You Care About
Different teams have very different priorities regarding model capabilities. It is recommended to list your priorities before evaluation. Common dimensions include:
- Coding capabilities: Correctness, readability, debugging, and refactoring abilities of generated code;
- Reasoning capabilities: Multi-step mathematical reasoning, logical chain completeness, and resistance to misleading information;
- Chinese understanding and generation: Long text summarization, semantic nuance, and format adherence;
- Instruction following: Strictly outputting according to required formats, lengths, and constraints;
- Long context: Information extraction and consistency across extremely long documents;
- Engineering metrics: Response latency, throughput, service stability, and pricing.
2. Build Your Own Test Set
General leaderboards cannot replace business data. It is recommended to build a custom test set based on the following principles:
- Real-world sources: Extract typical tasks from business logs, tickets, and historical code reviews, and use them after desensitization;
- Tiered coverage: Divide tasks into easy, medium, and hard levels to avoid concentrating entirely on one difficulty level;
- Include reference answers: Prepare verifiable expected outputs for each question. For coding tasks, ensure there are runnable test cases;
- Appropriate scale: 30 to 100 questions are sufficient to identify trends. Focus on the quality of the questions rather than the quantity.
Example: A minimal code evaluation script skeleton (pseudo-code):
test_cases = [{"id": "case_01", "prompt": "Implement an LRU cache", "tests": "test_lru.py"},{"id": "case_02", "prompt": "Fix the following concurrency bug: ...", "tests": "test_fix.py"},]for case in test_cases:output = call_model_api(case["prompt"])result = run_tests(output, case["tests"]) # Execute unit tests to verify correctnessrecord(case["id"], result.passed, result.latency, output)
The key point is: the evaluation criteria must be objective and executable. Run tests for coding tasks, compare final answers for math tasks, and use rule-based validation for formatting tasks. Minimize the reliance on subjective manual scoring.
3. Testing Core Capabilities
1. Coding Capabilities: “Whether It Runs” is the Only Standard
Do not let the model “explain its approach.” Directly ask it to produce complete, runnable code, and then verify it with test cases. It is recommended to cover three types of tasks:
- Implementation from scratch: Provide requirements to write a complete module, testing comprehensive coding abilities;
- Bug fixing: Provide flawed code, testing the ability to locate and fix issues;
- Refactoring: Provide legacy code, testing the ability to optimize structure without changing behavior.
For each type of task, record the pass rate, the average number of attempts (passed on the first try vs. requiring multiple rounds of correction), and the maintainability of the generated code (naming, comments, exception handling).
2. Reasoning Capabilities: Beware of “Right Answer, Wrong Process”
For mathematical and logical questions, do not just look at the final answer; review the reasoning chain. Common failure modes include: the process is wrong but the answer happens to be correct, skipping steps, and losing constraints midway through a multi-step task. It is recommended to design “incremental constraint” questions—for example, adding two or three additional conditions to a classic problem to observe if the model can still satisfy all of them.
3. Instruction Following and Format Stability
This capability is extremely important in engineering scenarios but is often overlooked. Testing method: Require the model to output strict JSON, a fixed word count, or a specified structure, and then verify it with a parser:
import jsondef check_format(output: str) -> bool:try:data = json.loads(output)return set(data.keys()) == {"title", "summary", "tags"}except json.JSONDecodeError:return False
Differences in format stability often directly determine whether a model can be integrated into an automated pipeline.
4. Engineering Evaluation: Cost and Stability
Beyond capabilities, engineering metrics also influence model selection:
- Price and cost-effectiveness: Calculate the “cost per correct answer” using a unified token billing standard combined with the test set pass rate. This is more meaningful than simply comparing unit prices;
- Latency distribution: Record the time to first token and the full response time. Focus on P95 rather than the average;
- Stability: Call the same question 3 to 5 times repeatedly and observe the output variance. Models with high output fluctuations require stronger retry and validation mechanisms in production environments;
- Rate limiting and fault tolerance: Simulate concurrent requests, observe rate limiting strategies and error rates, and assess the workload required for integration before production deployment.
5. Recommendations for Using Evaluation Results
- Scenario-based selection: Rarely does one model lead in all dimensions. A common practice is a “primary model + backup model” dual-channel approach, routing based on task type;
- Canary release: After passing evaluation, first conduct canary testing in non-core business or internal tools before gradually expanding;
- Continuous regression: Turn the test set into a team asset. Run a regression test whenever a new model is released or a version is upgraded to form a long-term comparable capability curve;
- Record evaluation context: Temperature parameters, system prompts, call times, etc., must be documented; otherwise, the results cannot be reproduced.
6. Conclusion
The hype around new model releases will always fade, but what is truly valuable is an evaluation system that belongs to your own team. It allows you to spend a day or two at a controllable cost to reach conclusions that fit your business when faced with overwhelming release information—rather than being led by benchmarks and marketing. Evaluation is not a one-time action, but an infrastructure that continuously iterates with the evolution of the model ecosystem. Building a solid test set, making evaluation criteria objective, and preserving results is the correct posture for developers navigating a rapidly changing model market.
