Evaluating LLM Code Generation and Creative Capabilities: Methods and Practices
Comparing large language models often ends in a subjective verdict — "model A crushes model B" — drawn from a single memorable session rather than a repeatable process. A model's real capability is a probability distribution, and one interaction is just one sample from it. This article shows how to convert that impression into a reproducible evaluation workflow for two high-value scenarios, code generation and creative expression: a layered breakdown of code quality (correctness, completeness, readability, security, engineering fit), structured dimensions for aesthetic output, how to combine public benchmarks with a self-built evaluation set, how to pair automated checks with blind human scoring and variance analysis, and the end-to-end pipeline that turns a request into an interactive deliverable. It closes with practical recommendations, including tracking stability instead of peak performance and maintaining regression baselines.
Evaluating LLM Code Generation and Creative Capabilities: Methods and Practices
Why the “experience gap” is so hard to quantify
When people compare different LLMs, they often settle on a subjective conclusion such as “one model crushes the other.” That judgment usually comes from a single, impressionistic interaction: a generated front-end page happened to look good, or a piece of code happened to compile on the first try, and a strong first impression formed. From an engineering standpoint, however, a model’s real capability is a probability distribution, and a single interaction is only one sample drawn from it. Treating that sample as a statement about the whole is a textbook case of generalizing from insufficient evidence.
To answer objectively how large the real experience gap is between two models, subjective impressions have to be turned into a reproducible, comparable evaluation process. This article focuses on two high-value scenarios — code generation and creative expression — and discusses how to design a rigorous capability evaluation system.
Breaking down the evaluation dimensions
Code quality: from “it runs” to “it’s maintainable”
Code generation cannot be judged only by whether it passes test cases. A sound evaluation is layered:
- Correctness: does a given input produce the correct output, and are boundary cases and error paths covered;
- Completeness: is the requirement understood in full, or are implicit constraints missed;
- Readability and maintainability: are naming, structure, and abstraction reasonable;
- Security: does the code introduce common defects such as injection, broken access control, or sensitive data leakage;
- Engineering fit: does it follow existing code style and dependency conventions.
Creative and aesthetic quality: hard to quantify, but still structurable
Aesthetics look purely subjective, but structuring the evaluation into dimensions reduces the noise:
- Intent fidelity: does the output accurately express what the user had in mind;
- Consistency and completeness: are visual style, layout, and color scheme unified;
- Interaction soundness: when going from a static mock-up to something interactive, does the logic hold together;
- Editability and iterability: is the output easy to adjust afterwards, rather than a one-shot deliverable.
How to design a trustworthy evaluation setup
Pairing benchmarks with real-world scenarios
Pure benchmarks offer broad coverage and reproducibility, but they can drift away from the real distribution; real-world scenarios match actual requirements but are hard to compare across models. Combining both is the sound approach: use benchmarks to establish a capability floor, then use your own scenarios to verify real delivery performance.
Building your own evaluation set
The most valuable evaluation set comes from your own team’s real requirements. Suggested practice:
- Extract 50–200 representative tasks from historical requirements, spanning simple to complex;
- Keep a clear acceptance criterion for every task;
- For creative tasks, additionally record a reference description of the “expected style”;
- Refresh the set regularly so the evaluation data itself does not get memorized by the model.
Combining human and automated evaluation
Automation can cover correctness and regression, but subjective dimensions still require human review. Double-blind scoring with multiple cross-reviewers works well: compute the mean and the variance, and use the variance to reflect stability. This point is often overlooked, yet it is a key source of the “experience gap.”
From generation to an interactive deliverable: the engineering pipeline
Turning “what is in your head” into something you can see and interact with is a complete engineering pipeline, not a single forward pass of the model. A typical pipeline includes:
- Intent understanding: structuring a natural-language request into components and data;
- Code synthesis: generating runnable front-end or full-stack code;
- Rendering and validation: executing in a sandbox and capturing runtime errors;
- Iterative repair: feeding errors back to the model for automatic retries;
- Delivery and hosting: deploying and serving the output through general cloud capabilities such as object storage and container platforms.
Only when this pipeline is stable end to end will users get a genuine “what you see is what you get” delivery experience.
A sample evaluation harness
The skeleton below uses generic call patterns (interface names and parameters are illustrative; refer to your actual platform):
import statisticsdef run_eval(model_client, tasks):results = []for task in tasks:# 1. Generationoutput = model_client.generate(prompt=task["prompt"])# 2. Automated validation: correctnesspassed = run_tests(output, task["tests"])# 3. Subjective dimension: human rating (illustrative; filled in by reviewers)score = task["human_score"].get(output["id"], None)results.append({"id": task["id"],"correct": passed,"score": score,})return summarize(results)def summarize(results):passed = sum(1 for r in results if r["correct"])scores = [r["score"] for r in results if r["score"] is not None]return {"pass_rate": passed / len(results),"avg_score": statistics.mean(scores) if scores else None,# Variance reflects stability and is a major source of the experience gap"score_std": statistics.pstdev(scores) if len(scores) > 1 else 0,}
One point deserves emphasis: the mean in the code above reflects only average capability. What actually determines “experience” is often the variance and the tail behavior — the worst-case experience is what decides whether users keep coming back.
Engineering practice recommendations
- Prioritize stability over peaks: one impressive run is worth less than reliable, consistent output;
- Cover failure samples in the evaluation: focus analysis on cases that fail to run or drift off target;
- Establish regression baselines: re-run the same evaluation set after a model upgrade to quantify improvement or regression;
- Include cost as a dimension: when capabilities are comparable, response latency and invocation cost decide real-world value;
- Keep comparisons neutral: do not define an industry standard based on the performance of a single product.
Conclusion
“One model beats another” is usually just a subjective impression. Only by breaking seemingly unquantifiable capabilities — aesthetics and code alike — into reproducible evaluation dimensions, combining a self-built evaluation set with both human and automated scoring, and validating the end-to-end delivery pipeline can you reach conclusions that hold up to scrutiny. For developers, building your own evaluation system is far more valuable than chasing a single miraculous interaction. If an enterprise needs to host this evaluation and delivery pipeline in the cloud, it can be built on general-purpose capabilities such as the model services, object storage, container platform, logging, and monitoring offered by Baidu AI Cloud.
