LLM Evaluation in Practice: A Complete Workflow from Long-Context Understanding to Agent Task Iteration

    This article explains how to build an evaluation system for large language models that reflects real production workflows rather than leaderboard scores alone. It covers four dimensions—basic capabilities, code generation, agent performance, and cost-effectiveness—and provides practical methods for testing long-context and multimodal understanding, front-end code generation, local coding agents, and quota consumption. Readers get a reusable workflow, sample evaluation tables, and an agent evaluation script.

    1. Why Build Your Own Evaluation System

    A practical problem in the LLM market is that official benchmark scores often differ noticeably from real production experience. A benchmark may improve by 10%, but if the price doubles, actual productivity for an individual developer or a team may decline. Instead of chasing leaderboards, it is more useful to build an evaluation method that covers your own typical workflows.

    A complete evaluation usually includes four dimensions:

    1. Basic capabilities: long-context understanding, file parsing, data analysis, and content writing;
    2. Code generation: the quality of converting natural-language requirements into runnable front-end or back-end code;
    3. Agent capabilities: the ability to plan, execute, and iterate tasks autonomously in a local environment;
    4. Cost-effectiveness: a combined measure of quota availability, unit price, and task throughput.

    2. Long-Context and Multimodal Understanding: The Starting Point

    Models aimed at general users often support long-context input and provide multiple access methods, such as web, client, and API. When evaluating long-context capabilities, prepare three types of samples:

    • Very long document summarization: for example, financial reports or technical specifications running to hundreds of pages. Check whether the model can accurately extract key metrics rather than fabricate data.
    • Multi-file joint understanding: upload configuration files, logs, and code, then ask the model to cross-analyze them and locate the problem.
    • Structured data reasoning: provide a set of tabular data and ask the model to generate analytical conclusions and identify anomalies in the data.

    A simple evaluation record table can be organized as follows:

    Use Case Type Input Size Key Checkpoints Result
    Financial report summary ~80 pages Numerical accuracy, no hallucination To be tested
    Multi-file troubleshooting 5 files Root-cause logic chain To be tested
    Data analysis CSV with 10,000 rows Anomaly detection, chart recommendations To be tested

    3. Code Generation Evaluation: Front-End Construction Is the Best Test

    A front-end page is an ideal task for testing code generation capabilities: requirements can be described clearly (styling, interaction, data display), the output is highly visual, and shortcuts are easy to spot—for example, using static fake data instead of real rendering logic, or omitting responsive layout.

    Suggested evaluation process:

    1. First use any model to generate a clear product requirements document (PRD) and sample data structure, ensuring that all models under test receive exactly the same input.
    2. Send the same build request through each model’s client or website.
    3. Score from the following dimensions:
      • Requirement coverage: whether all functional points in the PRD are implemented;
      • Styling and interaction quality: layout reasonableness, animations, and state feedback;
      • Data authenticity: whether sample data is rendered correctly rather than hard-coded;
      • Engineering structure: whether components are clearly separated, making it easy for a coding agent to add a back end later.

    A typical observation in hands-on testing is that some models deviate from requirements by “changing the style,” or quietly downgrade complex interactions to a simplified implementation. Recording these deviations is more valuable than a single “looks good” result.

    4. Agent Task Iteration: Key Differences in Local Coding Assistants

    Command-line coding agents are fundamentally different from web-based chat: the former need to perceive project structure, execute commands, read runtime results, and self-correct in a local environment. When evaluating agent capabilities, design tasks from the following angles:

    Task design principles:

    • Start from an existing real project and propose “fix + enhance” tasks, rather than generating from scratch in an empty repository;
    • Include tasks that require multiple rounds of iteration, such as “make the test suite pass completely”;
    • Observe whether the agent has an autonomous feedback loop: run tests → analyze failures → modify → rerun.

    A reusable evaluation recording script example:

    1. import subprocess, json, time
    2. tasks = [
    3. {"name": "Fix failing CI test cases", "prompt": "Run the tests and fix all failing cases"},
    4. {"name": "Complete backend APIs", "prompt": "Implement REST APIs for the front-end pages and connect them"},
    5. {"name": "Automated app testing", "prompt": "Launch the application and verify that core flows work"},
    6. ]
    7. def run_agent(cli_cmd, prompt, cwd):
    8. start = time.time()
    9. proc = subprocess.run(
    10. [cli_cmd, "-p", prompt],
    11. cwd=cwd, capture_output=True, text=True, timeout=1800,
    12. )
    13. return {
    14. "exit_code": proc.returncode,
    15. "duration_s": round(time.time() - start, 1),
    16. "output_tail": proc.stdout[-2000:],
    17. }
    18. results = [run_agent("your-agent-cli", t["prompt"], "/path/to/project")
    19. for t in tasks]
    20. print(json.dumps(results, indent=2, ensure_ascii=False))

    During evaluation, focus on recording: whether the task is completed in a single session, whether human intervention is required midway, and error recovery capability (for example, whether the agent can install missing dependencies itself or provide clear guidance when the environment lacks them). Some agents show a stronger tendency toward self-iteration—actively providing feedback, planning the next step, and continuing execution. This “closed-loop execution” experience differs noticeably from tools that only respond passively, especially on app automation testing tasks.

    5. Quota and Cost-Effectiveness: A Variable Not to Ignore in the Agent Era

    In an era where agents consume tokens at scale, cost-effectiveness can sometimes affect actual productivity more than the upper limit of model capability. When evaluating quota, record:

    • Token/quota consumption for a single typical task;
    • Weekly usage percentage: after completing one round of evaluation, check the remaining quota percentage;
    • A horizontal comparison against “common generous quota plans in the industry.”

    If a complete evaluation round (multiple front-end builds plus multiple local agent tasks) consumes only a single-digit percentage of the weekly quota, it means complex long-running tasks can be assigned to it without constantly worrying about quota interruptions—this is exactly the value of “not worrying about limits” on top models.

    6. Follow-Up Evaluation Roadmap

    After completing the basic evaluation, further verify how the agent performs in real engineering environments:

    1. Stability: whether long tasks running continuously for several hours are interrupted or degrade;
    2. Instruction following: whether complex multi-constraint instructions are satisfied one by one;
    3. Handling unexpected situations: autonomous recovery from anomalies such as dependency conflicts and port occupation;
    4. Environment awareness: accuracy in understanding local project structure and runtime state.

    Conclusion

    Evaluating large models should not stop at leaderboard comparisons. Through a closed-loop method of “unified input → multi-dimensional scoring → real engineering task validation → quota accounting,” developers can quickly judge whether a new model is worth adding to their daily workflow. The core principles are: compare fairly with the same tasks, test the upper limit with real projects, and measure cost-effectiveness with consumption data. This method does not depend on any specific product. You can directly reuse the process and script in this article to build your own evaluation pipeline.