Evaluating LLM Coding Ability by Replicating a Conversational Web App: A Controlled Benchmarking Practice
This article describes an end-to-end evaluation methodology that asks six models to replicate a real conversational web application. It covers task design, variable control across models and harnesses, a two-round prompting protocol, a weighted scoring rubric, a reproducible containerized pipeline, and common pitfalls. Readers will learn why second-round self-testing depth is more predictive of delivery quality than first-round implementation speed, and why the execution harness is as important a variable as the model itself.
Why “Replicate a Conversational Web App” Was Chosen as the Evaluation Task
When assessing a large language model’s coding ability, the most misused type of task is the algorithmic puzzle: it has a definite answer and is easy to auto-grade, but it correlates weakly with real engineering competence. In actual development, engineers face vague requirements, implicit constraints, cross-layer coordination, and repeated debugging. A better approach is to assign an end-to-end, runnable, and self-improvable task.
“Replicate a conversational web app” satisfies three conditions:
- Clear scope but real workload: it spans frontend interactions, session state management, streaming output rendering, backend API orchestration, authentication, and key proxying.
- Verifiable output: whether it launches, whether conversations work, and how faithfully the UI is reproduced can all be judged directly in the browser.
- Room for improvement: after completing the base functionality, the model can propose enhancements on its own, exposing its “engineering judgment” rather than mere “code generation” ability.
This was the unified prompt for the evaluation. Each agent was required to produce three deliverables: a product feature specification with structure diagram, a runnable replica of the web app, and an improved version based on its own experience.
Evaluation Design: Control the Variables or the Conclusions Mean Nothing
The most common mistake in evaluation is changing multiple variables at once, making attribution impossible. This design splits the variables into two layers:
- Model layer: six models with different positioning, covering long-context, reasoning-enhanced, and general conversational types.
- Harness layer: the orchestration program surrounding the model, responsible for reading and writing files, executing commands, managing context, and invoking tools. Different harnesses differ significantly in context compression strategy, tool-call granularity, and failure retry mechanisms.
One point must be emphasized: model capability and harness capability cannot be conflated. The same model with a different harness can produce dramatically different output quality. Conclusions must therefore be written as “model X performed thus under harness Y,” not “model X is bad.”
The evaluation matrix can be described declaratively for reproducibility:
task: replicate_chat_webappdeliverables:- functional_spec_with_diagram- runnable_webapp- self_improved_webapprounds:- id: 1input: requirements_only- id: 2input: requirements + runtime_credentialmatrix:- model: model_Aharness: harness_xcontext: long- model: model_Bharness: harness_ycontext: standardsandbox:network: restrictedcredential_scope: test_onlyteardown: after_each_run
Two-Round Prompting: The Second Round Is the Real Divider
Round one provides only the requirements and no API credentials. All agents can only “write blind”: relying on prior knowledge of similar products’ interaction patterns, they guess API shapes, state management, and error handling. This round tests requirement understanding and architecture planning. The deliverables usually include fairly complete functional specifications and structure diagrams, but the app cannot actually connect to anything at runtime.
Round two adds runtime credentials, allowing agents to self-test. The differences exposed here are the most revealing and fall into two behavioral patterns:
- Shallow verification: after fixing the configuration, run only the simplest happy path once (e.g., send one message, see whether it returns) and declare completion once “no errors” occur.
- Deep self-testing: proactively construct edge cases — empty input, very long input, concurrent requests, network interruptions, invalid credentials, streaming output disconnecting mid-stream — to locate defects, go back and fix the code, then re-run regression tests.
The latter often shows a marked quality jump in round two, because it pushes the app from “it runs” to “it’s reliable.” This difference is not about how much knowledge a model has; it is about task strategy and self-verification awareness, which is exactly the part a harness can compensate for through prompt and tool design.
Scoring Dimensions: Turn Subjective Impressions into Scorable Items
A four-dimension weighted rubric is recommended to avoid “looks nice” evaluations:
| Dimension | What to observe | Suggested weight |
|---|---|---|
| Requirement coverage | Is the functional spec complete, and does the structure diagram match the implementation? | 25% |
| Runnability | First-launch success rate, self-consistent dependencies, whether manual patching was needed | 30% |
| Fidelity | Layout, interaction feedback, streaming rendering, error-state handling | 20% |
| Autonomous improvement | Do the improvements target real pain points rather than decorative additions? | 25% |
“Spec-implementation consistency” is often overlooked yet highly discriminative. Many submissions have beautifully written documentation whose code structure matches it not at all — a sign the document was generated decoration rather than a design artifact.
A Reproducible Evaluation Pipeline
For conclusions to be trustworthy, the execution environment must be standardized. Recommended practices:
- Containerized isolation: each run gets its own container, with dependencies preinstalled in the image, to avoid network-related variance.
- Minimal credentials: grant only restricted test credentials, revoke them immediately after the run, and never write them into code or logs.
- Full traces: record every round’s prompts, tool-call sequences, command outputs, and timings for post-hoc attribution.
- Uniform operating procedure: all agents use the same startup commands and the same acceptance script, reducing human bias.
The acceptance script can be minimal:
# Uniform acceptance: start, health check, one minimal conversation, shutdownstart_app && wait_health && smoke_chat && stop_app
Common Pitfalls
- Treating harness differences as model differences: fix the harness when comparing models, or clearly label the model-harness combination.
- Only testing the happy path: without exception-scenario testing, evaluation conclusions are systematically optimistic.
- Letting credentials leak: real keys entering the sandbox is both a security and cost risk.
- Ignoring doc-code consistency: this is the key signal for judging whether a model truly “understood the design.”
Conclusion
Using “replicate a conversational web app” as the unified task, combined with two-round prompting and a containerized pipeline, a high-information capability profile can be obtained within a day. The most valuable takeaway is not the ranking but three methodological lessons: evaluation must control variables; the depth of second-round self-testing predicts delivery quality better than first-round implementation speed; and the execution harness is as important an independent variable as the model. Bake these three points into the process, and any future model iteration can be measured quickly and fairly.
