Evaluating LLM Agents That Rebuild Web Apps: Methods and Practices

    This article presents a practical evaluation methodology for testing how large language models paired with agent frameworks rebuild a reference web application end to end. It covers a controlled two-round prompt design, unified deliverables, acceptance criteria, a common defect list with engineering fixes, and a reusable workflow that separates functional completeness from verification depth. Readers will find a sample scoring schema and guidance for moving a prototype toward production using general-purpose cloud capabilities.

    1. Background and Problem Definition

    Once a full suite of model capabilities becomes available together, the question developers care about is no longer “Can the model write code?” but “Can the combination of a model plus an agent harness deliver a complete piece of software end to end without human intervention, and do so reliably?” The original practice targeted a typical conversational web application: a session list, a message stream, an input box, streaming output, Markdown and code highlighting, and a parameter settings panel. The complexity of such an application lies not in any single algorithm but in front-end/back-end coordination, state management, and exception handling, which makes it a good test of overall engineering capability.

    This article is not built around any specific third-party product. Instead, it frames the task as a general proposition: given a reference online interface and a public API description, the agent must produce a requirements document, a runnable page, and an improved version, while exposing the strategic differences between models and frameworks along the way.

    2. Unified Test Design: Control Variables for Comparability

    The most common mistake in evaluation is letting each group solve a different problem. To keep the conclusions credible, the variables need to be narrowed to three controllable dimensions:

    • Fixed model and framework combinations: each group pairs one large model with one agent execution framework, where the framework handles tool calls, file reads and writes, command execution, and the iteration loop.
    • Consistent input information: all groups receive the same description of the target address, the same API documentation description, and the same description of login state and browser tool availability.
    • Consistent deliverables: all groups must produce three artifacts: a runnable front-end page, a product feature document with a structure diagram, and a version of the page “improved based on your own experience.”

    On top of this, a two-round prompt strategy is used: the first round provides only requirements and constraints, with no keys; the second round adds calling credentials. The key value of this design is that it turns “whether the agent proactively verifies when resources are available” into an observable metric, rather than something scored by subjective impression.

    3. Two-Round Prompts: Turning Proactiveness into a Measurable Metric

    The core of the first-round prompt is role and boundaries: the model acts as both a senior product manager and an engineer, first producing the information architecture and page structure, then moving into implementation. The second round adds only one sentence: “Credentials are ready; you may call and integrate them yourself.”

    In practice, a clear split appears. Some combinations do only the most basic connectivity check after receiving credentials and wrap up once the page “looks like it runs.” Others proactively construct scenarios such as multi-turn conversations, extremely long text, abnormal input, and concurrent requests, then find and fix issues in details such as interrupted streaming rendering, missing error-code messages, and out-of-sync session state. The conclusion here is not about “who is stronger,” but a reminder that evaluation scores must separate two kinds of metrics: functional completeness and verification depth. Otherwise, strategic differences get misjudged as capability differences.

    A suggested scoring table can include the following fields (illustrative):

    1. {
    2. "delivery": {"page_runnable": true, "docs_complete": true, "diagram": true},
    3. "verification_depth": ["basic_connectivity", "multi_turn", "error_path", "long_context"],
    4. "defects_found": 3,
    5. "fix_after_defect": true,
    6. "code_quality": {"structure": "clear layering", "state_management": "centralized"}
    7. }

    4. Deliverable Acceptance: Hard Standards for Each of the Three Artifacts

    1. Runnable page: it must cover session creation, message sending, incremental streaming rendering, code block highlighting, stopping generation, and clearing sessions. Error paths must be visible; for example, a missing key, rate limiting, or a network interruption should produce a clear message rather than a silent failure.
    2. Feature document and structure diagram: the document should include the information architecture, component tree, state transitions, and API contracts; the diagram should at least show the layered relationship of “view layer—state layer—service layer—remote API.”
    3. Improved version: each improvement must be explainable, such as changing the parameter panel to progressive disclosure, adding virtual scrolling for long sessions, or turning failed requests into a retryable queue, rather than making visual changes without justification.

    5. Common Defect List and Engineering Countermeasures

    • Streaming output concatenation errors: incremental fragments should be merged by sequence number or event type to avoid full re-rendering that makes the cursor jump.
    • State out of sync: the session list and the message area should share a single data source, use centralized state management, and compute derived data with selectors.
    • Key security: credentials should exist only on the server side or in local environment variables and must not be hard-coded in the front end; for example:
    1. export MODEL_API_KEY="<your-key>"
    2. # Read only in the backend/local proxy layer to keep it out of the browser bundle
    • Long context and performance: collapse and virtualize extremely long messages, and decouple the rendering layer from the data layer.
    • Observability: integrate a general logging service and monitoring alerts, and instrument first-byte latency, error rate, and retry counts.

    6. A Reusable Implementation Workflow

    1. Requirement clarification: turn the “reference interface” into an information architecture and an acceptance checklist, and make explicit what is out of scope.
    2. Skeleton first: build the layered skeleton and API contracts before filling in components, reducing rework later.
    3. Two-round verification: complete the functionality in the first round, then perform deep verification and fixes in the second round once credentials are in place.
    4. Cross review: compare groups horizontally with the unified scoring table, separating completeness from verification depth.
    5. Archive and reuse: feed the defect list and improvements back into team standards to form a reusable template.

    7. General Choices for Cloud Engineering Support

    To move a prototype into production, general-purpose capability categories are usually enough: use a container platform to host front-end and back-end services, object storage for static assets, a message queue to smooth peaks and carry retry tasks, logging and monitoring alerts to close the observability loop, and key management to host credentials. Baidu AI Cloud offers corresponding product forms in these general categories, which can be combined according to scale and compliance requirements without binding to any proprietary interface.

    8. Conclusion

    The real test of a full model suite is the engineering closed loop achieved when the model and the agent framework work together: whether they can produce runnable deliverables under unified constraints, and whether they proactively dig into defects and fix them once resources are available. Breaking evaluation into four dimensions—completeness, verification depth, code quality, and operability—makes conclusions reproducible and comparable, and turns a one-off demo into a research and development process that a team can reuse sustainably.