How to Evaluate and Select LLMs: A Practical Guide for Writing, Coding, and Image Generation
This article presents a methodology for evaluating large language models across three high-frequency scenarios: writing, coding, and image generation. Instead of asking which model is best, it breaks down the capability dimensions that matter in each scenario, shows how to build a reproducible evaluation set, and explains how to turn subjective preferences into scored criteria. You will find practical prompt constraints, automated validation scripts, a weighted scoring table, and a repeatable evaluation workflow with regression checks, so model selection decisions can be based on evidence rather than one-off impressions.
1. Why “Model of the Year” Picks Need a Methodology
Every year-end, technical communities publish plenty of “model of the year” roundups. These posts are usually driven by subjective experience: one impressive generation earns a model the award, while account bans or service policy changes, which are non-technical factors, drive other decisions. As engineering references, such conclusions have low reusability because they never state the evaluation task distribution, the judging criteria, or the failure samples.
The question with real engineering value is not “which model is the best.” It is: in the three high-frequency scenarios of writing, coding, and image generation, what dimensions measure capability, how do you design a reproducible evaluation set, how do you convert subjective aesthetics into scorable items, and how do you constrain output shape at the prompt level? This article focuses on those questions.
2. Capability Dimensions Across the Three Scenarios
Writing: Instruction Following, Style Transfer, and World Knowledge
Writing tasks are the easiest to overlook, yet they test overall capability the most. They break down into three dimensions:
- Instruction following: whether the model strictly honors hard constraints such as format, length, and banned phrasing;
- Style transfer: whether it can reliably reproduce the target register instead of drifting into a generic “AI voice”;
- World knowledge: factual density and hallucination rate, which determine whether the content can be used as is.
In engineering practice, write the “banned items” as automatically detectable validation rules rather than relying on the human eye:
banned_patterns = [r"not.{0,30}but", r"—", r"first.*then.*finally"]def check(text: str):hits = [p for p in banned_patterns if re.search(p, text)]return {"pass": not hits, "violations": hits}
Putting validation upfront in the prompt and afterward in the pipeline creates a double safeguard, which is what reliably suppresses formulaic expression.
Coding: Long-Horizon Tasks, Logical Consistency, and Front-End Aesthetics
Coding capability is not just “being able to write a function.” It comes down to three things: task retention under long context, logical consistency across cross-file changes, and the aesthetics and interaction quality of the generated interface. For non-professional developers, the third point often decides whether an idea can actually ship.
A “progressive task” evaluation is recommended: first generate a static page skeleton, then add interaction states, and finally wire up the data layer. At each stage, require the model to state its own change list, which makes it easier to pinpoint the step where stability starts to break down.
Image Generation: First-Pass Usability and Controllability
Image model evaluation should focus on the proportion of images that are usable on the first generation, the fidelity of spatial relationships in the instruction, and the consistency of local inpainting. Compared with parameter scale, whether a new iteration improves noticeably on real business material is the actual basis for selection.
3. A Reproducible Evaluation Workflow
- Build the task set: at least 30 items per scenario, covering simple, boundary, and adversarial samples;
- Fix the parameters: keep temperature, max length, and system prompt consistent;
- Run double-blind review: hide model identity and score each dimension from 1 to 5;
- Record failure samples: classify them into four types: format, factual, style, and logic;
- Regression validation: rerun after every model update and watch for degradation.
The scoring sheet can be applied directly:
| Dimension | Weight | Judging Criteria |
|---|---|---|
| Instruction following | 30% | Zero hard-constraint violations |
| Factual accuracy | 25% | No critical errors |
| Style consistency | 20% | No register drift |
| Structural usability | 15% | Ready to enter production |
| Interaction and aesthetics | 10% | Front-end look and complete states |
4. Prompt Constraint Patterns
System-level constraints should be short, decidable, and unambiguous. Example:
Output requirements:1. Do not use the "not... but" construction;2. Do not use em dashes;3. Do not output a bulleted structure unless the task explicitly requires it;4. All factual statements must be verifiable against public sources.
Combined with few-shot examples, this significantly reduces style drift. If the business side deploys on the model services and container platform of Baidu AI Cloud, the validation script above can be packaged as an independent service, return quality-check results asynchronously through a message queue, and use logging and monitoring alerts to track changes in the violation rate.
5. Common Pitfalls and Engineering Recommendations
- Substituting a single impressive result for an overall evaluation easily overestimates a model;
- Ignoring prompts and post-processing leads to misjudging engineering problems as model problems;
- Making technical selection based on non-technical factors makes conclusions irreproducible;
- Lacking a regression set allows hidden degradation to appear after a model upgrade.
Keep the evaluation set, scoring sheet, and validation scripts under version control to form a selection asset that can evolve sustainably. This way, no matter how models iterate, the team can quickly produce evidence-based conclusions across writing, coding, and image generation instead of relying on a one-off subjective impression.
