Benchmarking Chinese LLMs on High-Intensity Code Generation

    This article examines how to evaluate large language models on high-intensity code generation rather than casual chat. It introduces a quantifiable framework covering first-pass usability, iteration continuity, latency, token consumption, context-limit behavior, and fallback quality. Through interactive 3D visualization tasks, it analyzes typical success patterns, common failure modes such as budget imbalance and poor fallback design, and translates the findings into a model selection matrix with practical engineering safeguards.

    1. Why Casual Chat No Longer Reveals Model Differences

    In real engineering scenarios, decision-makers do not care whether a model can write fluent paragraphs. They care whether it can produce runnable, maintainable, and iterable code assets under long-context constraints. For general conversation and short logic problems, the gap between mainstream models has been compressed to a level that ordinary users can barely perceive. Scores converge and discrimination is extremely low. Continuing to use these tasks for horizontal comparisons will almost inevitably distort the conclusions.

    A more effective approach is to move the evaluation into the “heavy work” range: ask the model to output a complete interactive web page in one pass, including 3D rendering, mechanical structures, state switching, and exploded animations. Then append a requirement change to observe whether it can retain the previous context and autonomously refactor. This type of task simultaneously stress-tests four underlying capabilities: long-context retention, structured code generation, cross-turn intent understanding, and self-repair after failure.

    2. Evaluation Design: Turning Subjective Feelings into Quantifiable Metrics

    A credible evaluation plan must first translate “good or bad” into numbers. At least the following five categories of metrics should be fixed:

    • First-pass usability: whether the generated result can be opened and interacted with directly, with no blank page and no blocking errors.
    • Iteration continuity: after a new requirement is appended, whether the original structural logic is preserved rather than rebuilt from scratch.
    • Latency and token consumption: whether time and output scale match, and whether there is “high consumption with low output.”
    • Context boundary behavior: whether it converges gracefully near the output limit or is truncated midway.
    • Fallback quality: whether error messages block core content and whether users can quickly locate and fix issues.

    For task selection, this article uses three sets of prompts that require complete interactive pages and 3D effects. The same prompts are issued concurrently to avoid bias from manual tuning.

    3. First-Round Observations: 3D Conversion Is the Most Effective “Mirror”

    The first task requires generating a detailed, interactive V8 engine visualization model, followed by the instruction “convert it to 3D.” The value of this addition is that the model must inherit the mechanical assembly logic from the previous turn while independently organizing the 3D scene, camera, lighting, and connecting-rod motion in the browser. Any misunderstanding will be exposed immediately.

    The tests revealed three typical profiles. The first is structurally complete but extremely time-consuming: 3D parts, valve train, intake and exhaust manifolds, crankshaft, and flywheel are all present, with Chinese annotations and exploded views. However, a single round takes nearly half an hour and produces around 80,000 tokens. It passes on the first attempt with no errors and is suitable for offline batch processing where completeness matters more than delivery speed. The second has solid physical details: it uses a standard crankshaft structure, distinguishes the four strokes by color, supports step-by-step observation at fixed angles, can switch to a semi-transparent cylinder block, and even uses browser audio capabilities to synthesize engine sound that changes with RPM. Its engineering completeness and teaching value are higher. The third prioritizes speed: it delivers within five minutes with an output scale only about one-fifth of the others. Its appearance is more industrial and blocky, but the piston and connecting-rod proportions are accurate, and part toggles, exploded views, transparency, and reset are all operable. It is well suited for producing a draft first and then refining manually.

    4. Failure Samples Are More Informative Than Success Samples

    What truly exposes risks are the failure cases. One model took more than twenty minutes in the 2D stage and hit the 60,000-token output limit. Backend records showed that almost the entire budget was consumed by the reasoning process, leaving almost nothing for code. The page opened as a blank screen. After the 3D requirement was appended, it exceeded the limit again and failed to generate. Another lightweight version produced a 3D model within five minutes but rendered its own fallback error message fixed in the center of the model, blocking the completed result.

    These two problems correspond to “budget allocation imbalance” and “fallback strategy design flaws” in engineering. The former suggests that reasoning models must explicitly constrain their thinking budget on long code tasks; otherwise, the output window will be occupied by ineffective reasoning. The latter suggests that error messages should be written to a separate log layer or a corner of the page and must never cover the main rendering area.

    An example of budget constraint configuration:

    1. const config = {
    2. maxOutputTokens: 32768, // Reserve enough space for code
    3. reasoningBudgetRatio: 0.35, // Limit the proportion of reasoning
    4. stream: true, // Stream output to detect truncation early
    5. onFallback(err) {
    6. console.error('[render-fallback]', err); // Fallback goes only to logs
    7. showToast('Module failed to load. Please retry.'); // Do not block the canvas
    8. }
    9. };

    5. Turning Test Conclusions into a Selection Matrix

    After abstracting the observations above, we can obtain a product-agnostic selection matrix: for scenarios that pursue structural completeness and can accept long latency, choose a solution that prioritizes long context and completeness; for scenarios that pursue interactive physical accuracy and teaching demonstrations, focus on how it handles kinematic details and multimedia capabilities; for scenarios that pursue rapid iteration and cost control, choose a solution with low token consumption and fast response; and for production pipelines sensitive to stability, truncation risk and fallback behavior must be included as hard acceptance criteria.

    For engineering implementation, three additional safeguards are recommended. First, explicitly state in the prompt “produce a runnable skeleton first, then enhance details step by step” to reduce the probability of exceeding the limit in one pass. Second, use streaming output with segmented validation, and perform an interactivity check as soon as the page skeleton is complete. Third, build a regression test suite that turns each requirement change into an automated test to prevent unnoticed capability regression after model upgrades.

    6. Conclusion

    Whether a model is the “strongest” depends on the task profile, not on leaderboard rankings. Moving the evaluation from chat to real engineering workloads and replacing subjective impressions with quantifiable metrics is the only way to select a solution that matches your business rhythm. In scenarios that require elastic computing power and a complete engineering pipeline, general capabilities such as the container platform, log service, and monitoring alerts provided by Baidu AI Cloud can support the stable operation and result traceability of the evaluation pipeline described above.