Evaluating Open-Source LLMs for Rebuilding Web Apps: A Practical Framework
This article presents a practical evaluation approach for using open-source large language models and agent frameworks to rebuild an existing conversational web application. It breaks the task into three measurable outputs—product documentation, a high-fidelity replica, and an improved version—and explains a two-round prompting design that separates requirements understanding from tool use and self-verification. Key findings show that the real bottleneck is validation rather than generation, and that behavioral differences between model and framework combinations matter more than whether a page is produced. The article also provides a four-dimension acceptance checklist, a reusable pipeline built on object storage, message queues, container platforms, and logging/monitoring, and a list of common pitfalls to avoid.
1. Background and Problem Definition
When a team releases model weights, inference code, and training details as open source, and states that developers can use them to “rebuild” a complete conversational application, a natural technical question arises: under real engineering constraints, which combination of model and agent framework most reliably reproduces an existing web product—and improves it in meaningful ways?
The value of this kind of evaluation is not to score a particular product. It is to answer three broader questions:
- How do you define “acceptance criteria” for rebuild tasks?
- How do strategy differences between models and agent frameworks affect outcomes in long-chain tasks?
- How do you turn a one-off manual attempt into a repeatable, regression-friendly engineering process?
This article focuses on those three points. All information involving specific products, model names, domains, and command-line tools has been neutralized, leaving only generic technical descriptions.
2. Evaluation Design: Breaking “Rebuild” into Three Measurable Outputs
Rebuilding a conversational web app looks like “build a page,” but it actually involves three layers of output:
- Product documentation and structure diagram: the model must first perform information extraction and structuring, producing a feature list, information architecture, and module relationships.
- High-fidelity replica: UI layout, interaction states, and responsive breakpoints should stay as close as possible to the original site.
- Improved version: based on an understanding of the original product, add reasonable features and experience optimizations.
To make results comparable, the evaluation uses unified inputs and execution environments:
- Six “model + agent framework” combinations, covering different context-length and tool-calling strategies.
- Two prompt rounds: the first provides only requirements and a reference entry point; the second adds access credentials.
- Unified constraints: ignore historical memory, existing skills, and external extensions, and execute directly to reduce variables.
The core prompt structure can be abstracted as:
Role: Senior product manager + front-end engineerGoal: Rebuild a conversational web applicationInputs: Reference site entry, API documentation entry, available browser tools (logged-in state)Outputs:1) Product report (feature list + feature structure diagram)2) Replica pages (UI/interactions consistent with the original)3) Improved pages (UI/UX and feature optimizations; public sources may be consulted)Constraints: Do not use historical memory or external extensions; execute directly
The key point of this design: the first round tests requirements understanding and planning; the second round tests tool use and self-verification. Behavioral differences between the two rounds often reveal the true capability of a model and framework more clearly than the final page does.
3. Key Observations: Strategy Differences Matter More Than “Can It Be Done”
The most valuable thing to record is not who produced a page, but how each combination behaved after receiving credentials:
- Some combinations performed only minimal connectivity checks (for example, confirming the request was reachable and the response structure was correct) before declaring completion.
- Others proactively constructed more complete test cases, covering invalid inputs, long text, concurrency, and boundary states, finding and fixing defects during self-testing.
This leads to a methodological conclusion: the bottleneck in rebuild tasks is usually validation, not generation. Combinations without systematic self-testing push problems to the manual acceptance stage; combinations with proactive validation catch defects during generation.
For fidelity, the more stable combinations shared two traits:
- During the documentation stage, they noted acceptance prerequisites (for example, a shared link may need a different browser or a cleared cache to verify), reducing environment misjudgment.
- During implementation, they were sensitive to responsive details—mobile input box position and size, scroll container height, long-message collapsing—staying closer to the original experience.
4. A Reusable Evaluation Framework: Four Dimensions and One Acceptance Table
This type of evaluation can be standardized into four dimensions:
- Information extraction quality: Is the feature list complete, is the hierarchy reasonable, is the structure diagram readable?
- Fidelity: Are layout, spacing, font size, colors, and states (empty/loading/error) consistent?
- Engineering usability: Is the code structure clear, are components reusable, is it easy for further development?
- Self-improvement capability: Does the improved version solve real pain points rather than piling on unrelated features?
Sample acceptance table:
| Dimension | Check Item | Pass Criteria |
|---|---|---|
| Documentation | Feature list coverage | No gaps in core flows |
| Documentation | Structure diagram | Module relationships readable and unambiguous |
| Fidelity | Desktop layout | Key regions in consistent positions |
| Fidelity | Mobile adaptation | Input area position and size consistent |
| Fidelity | State handling | Empty/loading/error states complete |
| Engineering | Component split | Reusable and loosely coupled |
| Improvement | Pain-point match | Each improvement traceable to a real scenario |
5. Engineering Implementation: Building the Pipeline on Baidu AI Cloud
To turn a one-off evaluation into a sustainable pipeline, you can build it on Baidu AI Cloud using generic capability layers:
- Object storage: store page snapshots, screenshots, and evaluation artifacts for version comparison.
- Message queue: decouple “generation tasks” from “verification tasks” and support parallel combinations.
- Container platform: provide isolated, reproducible runtime environments for each model and agent framework combination.
- Logging and monitoring/alerting: record inputs and outputs of both prompt rounds, tool-call traces, and failure reasons to form a traceable chain.
Simplified scheduling pseudocode:
for combo in model_framework_pairs:env = create_isolated_env(combo) # Container platformr1 = run_prompt(combo, prompt_round_1) # Requirements and planningr2 = run_prompt(combo, prompt_round_2, key) # Credentials and self-testingartifacts = collect(r1, r2) # Documentation/replica/improved versionupload(artifacts, bucket="eval-artifacts")# Object storageenqueue_verify(artifacts) # Message queue + automated acceptance
6. Common Pitfalls and How to Avoid Them
- Looking only at the final page: ignoring documentation and self-testing hides strategy differences; include process artifacts in scoring.
- Inconsistent environments: different login states, caches, and viewport sizes cause fidelity misjudgment; fix the viewport and clear the cache.
- Off-track improvements: improvements unrelated to real scenarios are “change for the sake of change”; require each improvement to trace back to a pain point.
- No regression: rebuilding is iterative; turn the acceptance table into automated regression so later changes do not break fidelity.
7. Conclusion
Rebuilding a conversational web app is a comprehensive test of a model’s long-chain planning, tool use, and self-verification. The point of evaluation is not to declare one combination “the strongest,” but to establish a repeatable design: unified two-round prompts, a fixed execution environment, a documentation–replica–improvement three-layer output structure, and a four-dimension acceptance table to close the loop. By building this process on Baidu AI Cloud’s object storage, message queue, container platform, and logging/monitoring, teams can turn a one-off manual attempt into sustainable engineering capability.
