How to Evaluate Multi-Model Replication of a Conversational Web App: A Full Evaluation Workflow
This article presents a practical evaluation method for comparing how different large language models, paired with execution frameworks, replicate a conversational web application. It covers the three-part deliverable used as the acceptance criteria, a controlled two-round prompting design, the role of the execution loop, five quality assessment dimensions, common integration practices for chat APIs, and recurring failure patterns with mitigation tips. Readers can reuse the workflow to run low-cost, repeatable, and comparable engineering capability evaluations in their own scenarios.
1. Background and Evaluation Goals
As generative AI moves into engineering deployment, the key question for developers has shifted from “can the model answer?” to “can the model deliver a runnable system under given constraints?” This practice sets up a scenario close to real business needs: several groups of “LLM + execution framework (harness)” independently replicate a conversational web application and produce a three-part deliverable.
The definition of the three-part deliverable is critical, because it breaks the vague goal of “build a web page” into verifiable engineering artifacts:
- Product feature documentation and structure diagram: describing the information architecture, page modules, interaction states, and API dependencies;
- A functionally equivalent web implementation: reproducing the core interaction loop of the target application;
- An improved version based on the model’s own experience: proposing and implementing optimizations beyond equivalence.
The requirement for an “improved version” exists to observe whether the model has product judgment rather than mechanically performing pixel-level imitation. The evaluation goals are therefore split into three layers: feature completeness, implementation runnability, and autonomous optimization capability.
2. Experiment Design: Controlled Variables and Round-Based Prompting
For the conclusions to be credible, variables must be strictly controlled. This practice applies exactly the same inputs to all experiment groups: the same requirements description, the same API documentation notes, the same browsing and debugging tools, and the same two-round prompting cadence.
- Round 1: provide only the requirements and reference materials, and ask for the feature document, structure diagram, and an initial implementation;
- Round 2: supply access credentials and allow the model to actually call the APIs for integration testing.
The value of the round-based design is that it creates an observation window for “what you do once resources are in place.” The results show clear divergence: some groups, after receiving credentials, complete only the most basic connectivity check and declare completion; others proactively construct boundary inputs, check error branches, and rerun critical paths, then find defects and iterate. This shows that under identical conditions, differences in model strategy are directly amplified into differences in delivery quality.
It is worth emphasizing that the evaluator’s operations are uniform, with no biased intervention. The differences come entirely from the task-planning strategies of the models and execution frameworks themselves. This is also the most reusable part of the method: turning “strategy” into an observable variable.
3. The Role of the Execution Framework: From Code Generation to Closed-Loop Verification
The execution framework plays the role of the “hands.” The model handles planning and decision-making, while the framework reads and writes files, executes commands, drives the browser, and collects logs. A mature execution loop typically contains four stages:
plan -> act -> observe -> reflect^ |+------------------------+
Whether the loop is truly closed depends on the information density of the observation stage. If the framework only returns “command succeeded/failed,” the model can hardly locate the problem; if it can return structured logs, page screenshots, network request statuses, and console errors, the model can make effective corrections. Therefore, when evaluating an execution framework, focus on its context organization capability, information retention under long contexts, and boundary control for retrying failures.
4. Designing Quality Assessment Dimensions
To make the evaluation quantifiable, five dimensions are recommended, each with observable evidence:
| Dimension | Observation Point | Evidence Source |
|---|---|---|
| Requirement coverage | Whether feature document entries map one-to-one to the implementation | Cross-checking docs and code |
| Interaction completeness | Session creation, streaming output, interruption, retry, history management | Manual and automated regression |
| Engineering standards | Directory structure, state management, error handling, configurability | Code review |
| Autonomous verification depth | Whether abnormal scenarios are proactively constructed and fixed | Execution logs and commit history |
| Improvement reasonableness | Whether optimizations address real pain points | Improvement notes and comparison |
Among these, “autonomous verification depth” is the most discriminating metric. An implementation that only walks the happy path can easily expose problems under real traffic, while an implementation that proactively performs fault injection tends to remain stable in scenarios such as stream interruption, timeout retries, and expired keys.
5. Common Practices for the API Integration Layer
After receiving credentials in Round 2, the focus is integration testing of the chat API. Regardless of the specific provider, common practices include: reading keys only from environment variables and never writing them into source code; setting timeouts and retry limits on the request side; handling rate limiting and authentication failures differently; and handling partial packets and packet coalescing for streaming responses.
import osclient_key = os.environ["MODEL_API_KEY"] # credentials never stored in code or frontenddef safe_call(payload, retry=2):for i in range(retry + 1):try:return call_model(payload, timeout=30)except RateLimited:sleep_backoff(i)except AuthError:raise # retrying an auth issue is pointlessreturn fallback_answer()
The point of this sample code is not a specific API, but the idea of error classification: back off and retry recoverable errors, and fail immediately with an alert for unrecoverable ones.
6. Common Failure Patterns and Mitigation Tips
Four types of problems recur in practice. First, documentation is disconnected from the implementation: the document looks good but the code does not cover it. Second, only the success path is verified, with no exception branches. Third, credentials are hard-coded into the frontend or repository. Fourth, improvement points are piled up and unrelated to real usage scenarios. The mitigations are, respectively: build an entry-level traceability matrix, add exception cases to a must-do checklist, route everything through environment variables and a key management service, and require each improvement point to include a problem statement and verification result.
7. Conclusion
Using “replicate a conversational web application” as the evaluation vehicle can expose the real differences between models and execution frameworks across the planning, execution, and verification stages within a day. The core of the method is not who you choose, but unifying the inputs, injecting resources in rounds, using the three-part deliverable as the acceptance criterion, and using autonomous verification depth as the main discriminating metric. Teams can migrate this framework directly to their own scenarios, such as an internal knowledge base Q&A frontend, a customer support assistant console, or a data dashboard, by simply replacing the requirements description and API notes to obtain a low-cost, repeatable, and comparable engineering capability evaluation process. If the evaluation environment is hosted on general-purpose capabilities such as the container platform, logging service, and monitoring and alerting offered by Baidu AI Cloud, the experiment process can be made observable and the results traceable.
