Testing LLM Coding Capabilities: From Task Design to Result Analysis

    This article presents an end-to-end evaluation of a newly released Mixture-of-Experts (MoE) large language model in a real-world programming scenario. By designing a task that converts a Markdown document into an HTML page, we assess the model's context understanding, code generation quality, and overall development experience. The article details the testing process, analyzes the results, and provides a reusable evaluation framework and best practices for selecting coding LLMs.

    In recent years, large language models (LLMs) have made rapid strides in the field of code generation. From simple function completion to complex multi-file project-level tasks, their practical utility is continually increasing. Recently, a new model featuring a Sparse Mixture-of-Experts (MoE) architecture was officially released. Its claimed “low activated parameters, high total parameters, ultra-long context,” combined with a highly competitive pricing strategy, has attracted significant attention from the developer community. To objectively evaluate this model’s performance in actual programming tasks, we designed and executed an end-to-end test, focusing on its usability and generation quality across different stages. This article will walk through the evaluation process and distill a reusable evaluation framework and practical takeaways.

    1. Model Background and Evaluation Goals

    The core technical parameters of the model are as follows: It uses an MoE architecture with a total of 295B parameters, but only activates 21B parameters during inference, significantly reducing computational costs while maintaining robust capabilities. The context window length reaches 256K, allowing it to accommodate long documents, multiple files, or even an entire repository’s code. In terms of pricing, input costs 1 CNY per million tokens, output costs 4 CNY per million tokens, and cache hits cost only 0.25 CNY per million tokens. This price point is exceptionally low within the industry, making it particularly suitable for high-frequency, large-scale code generation scenarios.

    The evaluation goal was not merely to verify “whether it can generate code,” but to focus on three dimensions:

    1. Real project environment: Whether the model can correctly load skills, recognize file relationships, and understand user intent.
    2. Functional requirements: Whether the generated results meet functional needs, including page structure, style adaptation, and script logic.
    3. Overall experience: Whether the process is efficient, including response speed, interaction smoothness, and cost-effectiveness.

    We aimed to observe the model’s performance throughout a complete workflow via a specific, moderately complex task.

    2. Evaluation Environment and Preparation

    To simulate a real-world development scenario, we selected a mainstream AI coding client as the interaction interface. This client supports mounting local project directories and can invoke various configured LLMs. After installation, the client’s startup interface recommended the new model and provided an immediate access entry point. Clicking it switched the active model to the target model without requiring additional configuration.

    We created a new project directory containing two key files: a Markdown document exported from a web article (named script.md), which included common elements like headings, paragraphs, image references, lists, and blockquotes; and a local image used within the article. This file structure simulates a common developer task: “generating a frontend page based on documentation.” This requires the model to possess cross-file understanding capabilities—reading the Markdown content, extracting structured information, and converting it into semantically correct HTML.

    To maintain evaluation consistency, we enabled the same Skill configurations and prompts. Skills are pre-defined or user-customized instruction sets used to constrain the model’s output style and code standards. The skills used in this test emphasized “strictly following Markdown structure,” “generating W3C-compliant HTML5,” and “using CSS for responsive layout.” The prompt explicitly stated: “Please generate a complete HTML page based on the content in script.md. Define your own styles, include image references, and ensure the page can be opened directly in a browser.”

    3. Evaluation Process and Observations

    1. Skill Loading and File Scanning

    After the task started, we first observed that the model successfully loaded the skill module. In the client’s log panel, a “Skill loaded” status message appeared, followed by the model scanning the project directory files. This step verified the model’s ability to “perceive context files.” The model successfully identified script.md and the image file, automatically referencing both file paths in its response, indicating it could read file metadata.

    2. Intent Recognition and Task Parsing

    In terms of understanding user intent, the model performed satisfactorily. It accurately interpreted the task of “generating an HTML page based on script.md“ as a document-to-webpage conversion and automatically outlined the following execution plan:

    • Read and parse the heading hierarchy in Markdown;
    • Extract paragraphs, lists, blockquotes, and other elements from the text;
    • Locate image reference paths and embed the local image into the page;
    • Generate a complete HTML file with inline CSS and simple JavaScript.

    This planning process demonstrated the model’s ability to decompose tasks, with no misunderstandings or omissions of key requirements.

    3. HTML Generation Process and Results

    However, the real challenge emerged during the actual HTML generation. As the model began outputting code, we noticed several phenomena worth noting:

    Initial output normal, subsequent deviations: The model first generated a skeleton structure (<!DOCTYPE html>, <head>, <body>) and correctly included the <img> tag for the image. However, during subsequent content generation, the model appeared to suffer from “attention drift” when processing the long document. For example, it skipped two list items under a second-level heading and directly output the following chapter. On another occasion, it incorrectly nested a blockquote inside a <div> instead of using a <blockquote> tag.

    Oversimplified styles: Although the skills required a “responsive layout,” the generated CSS only used simple max-width and margin:auto, without implementing actual media queries or flexbox layouts. The page performed poorly under mobile viewports and required manual adjustment.

    Code reliability issues: In the outputted HTML, the model used an absolute path for the image (e.g., /Users/xxx/image.png), whereas a relative path should be used in an actual project. This caused the image to fail to load when opening the HTML locally in a browser, requiring manual correction by the user.

    Missing interaction logic: The original text included an interaction prompt mentioning “click to expand,” but the generated HTML did not include any corresponding JavaScript event handlers, merely rendering static text.

    In terms of overall completeness, the generated webpage roughly reflected the original document’s structure, but fell short of production-level standards in detail restoration, code robustness, and style richness. Compared to the output of other models on the same task, this model exhibited a higher code error rate, and the debugging cost might exceed that of writing the code manually.

    4. Result Analysis and Discussion

    1. Architecture vs. Capability Mismatch

    Although the model has a total parameter count of 295B, only 21B parameters are activated. It performs excellently in generating short code (e.g., function-level), but in long document-to-code conversion tasks, which require long-term memory and precise cross-paragraph alignment, the low number of activated parameters may lead to information loss. This suggests that for document generation tasks, the model’s “effective attention window” may be shorter than its actual context length.

    2. Balancing Cost Advantages and Output Quality

    From a pricing perspective, the cost of processing this task (approximately 6,000 input tokens, generating about 3,500 output tokens) was less than 0.03 CNY, making it extremely cheap. However, if we factor in the manual code repair time (about 20 minutes) as a labor cost, the total cost far exceeds that of using a more expensive, highly accurate model. Therefore, for strongly interactive, high-reliability programming tasks, it is advisable to choose larger models or those specifically trained for coding; for templated, batched simple generation tasks, this model remains attractive.

    3. Reusability of the Evaluation Methodology

    The “document-to-HTML generation” task we adopted can effectively evaluate the following capabilities of a model:

    • Context understanding: Whether it accurately reads all file contents;
    • Structural mapping: Whether it can convert Markdown hierarchies into semantic HTML tags;
    • Resource management: Whether it can correctly reference local resource paths;
    • Code compliance: Whether it adheres to predefined skills;
    • Response speed and interaction: Whether it provides timely feedback during generation.

    It is recommended that developers design at least two types of tasks when evaluating coding models: one for “small-step” function/algorithm generation, and another for “complete project” document-to-code conversion. Additionally, metrics such as first-token latency, total generation time, and error correction count should be recorded to form a quantifiable comparison table.

    5. Summary and Best Practices

    This test indicates that while the newly released model offers significant advantages in price and inference speed, there is still room for improvement in its generation quality for complex, long-context programming tasks. For developers, model selection should not rely solely on marketing parameters but should involve multi-dimensional testing based on specific scenarios. Here are a few recommendations:

    1. Define task complexity: Prioritize low-cost models for simple scripts, SQL queries, or regular expressions. For tasks involving multiple files, long documents, or strongly interactive interfaces, opt for more specialized models.
    2. Leverage skills and prompts: Writing detailed skill descriptions (e.g., “use the Bootstrap framework,” “use relative paths for all assets”) can significantly reduce the model’s error rate.
    3. Introduce automated validation: After generating code, use lint tools, compilers, or visual previews to automatically check and identify issues early.
    4. Evaluate the complete workflow: Do not focus solely on the generation moment; consider subsequent debugging and maintenance costs. Use “total development time = generation time + modification time” as a core metric.

    Moving forward, as models iterate, we expect breakthroughs in long-sequence coherence. Meanwhile, if cloud providers can offer “code-specific” fine-tuned versions or context compression plugins, it would greatly enhance the experience for these document conversion tasks. For the present, the most robust strategy is a hybrid approach using multiple models: employ low-cost models for drafting and high-precision models for review, thereby maximizing cost-effectiveness.