How to Choose Open-Source LLMs and Evaluate AI Agent Capabilities

    Choosing an open-source large language model is difficult not because strong models are scarce, but because benchmark rankings often contradict real engineering results. This article proposes a practical evaluation framework: split tasks into four difficulty levels, score instruction following, multi-step reasoning, and domain knowledge separately, and make decisions by scenario weight rather than a single leaderboard score. It also covers how to build programming tasks that separate visual polish from engineering ability, how to measure self-correction and clarification behavior, and which pitfalls to avoid when validating a new model version.

    1. Why Model Comparisons Keep Contradicting Each Other

    Open-source LLM releases now move fast enough that two generations can appear in the same week. The most common problem developers face when selecting a model is not a lack of strong candidates, but conflicting conclusions across evaluations: one leaderboard ranks a model first for coding, yet the front-end pages it generates have messy layouts; another model scores extremely high on math competition problems but repeatedly misses boundary conditions in business code.

    The root cause is that evaluation dimensions get compressed into a single score. Real engineering work involves at least three layers of capability: instruction following and structured output, multi-step reasoning and self-correction, and domain knowledge and common-sense judgment. These layers do not grow in sync, so any “overall ranking” hides structural differences. A more reliable approach is to define your task profile first, evaluate each dimension separately, and then make a weighted decision.

    2. Designing the Evaluation Framework: Turning Subjective Impressions into Metrics

    2.1 Layering the Task Set

    Split the evaluation set into four tiers, each with a different difficulty level and judging method:

    Tier Task Type Judging Method
    L1 Single-function or tool code generation Unit test pass rate
    L2 Complete single-file application generation Feature checklist plus manual visual scoring
    L3 Multi-turn, long-context refactoring Number of iterations, number of regression defects
    L4 Competition-style algorithms and STEM derivations Answer correctness plus readability of the process

    The key point is that L2 and L3 must stay separate. A good-looking short generation does not mean the architecture stays consistent after dozens of revision rounds, and long-horizon coding ability is exactly the core metric for agentic programming.

    2.2 A Construction Pattern for Programming Tasks

    To separate a model’s “visual taste” from its engineering ability, a task has to constrain both ends at once. A typical pattern is to ask for a single-file application that runs directly when opened in a browser:

    1. Build a desktop-OS-like single-file web application that includes:
    2. 1. A text editor (with auto-save to local storage)
    3. 2. A terminal emulator (implementing at least four built-in commands: help/ls/cat/echo)
    4. 3. A code editor (with syntax highlighting and line numbers)
    5. 4. A file manager (can create, rename, and delete virtual files)
    6. 5. A drawing tool and a playable animation preview
    7. Constraint: all code lives in one HTML file, runs on double-click, and requires no build step.

    The value of this kind of task is that scoring can be decomposed: whether the feature items are genuinely usable (clickable, accepts input, holds state), whether window dragging and responsive breakpoints are reasonable, whether the visual hierarchy is clear, and whether the code is self-contained in a single file.

    2.3 A Suggested Scoring Sheet

    1. # Sketch: weighted scoring skeleton for an L2 task
    2. score = (
    3. 0.35 * functional_pass_rate # share of features that actually work
    4. + 0.20 * state_consistency # correctness of state and persistence
    5. + 0.20 * responsive_layout # desktop/mobile breakpoint switching
    6. + 0.15 * visual_hierarchy # layout and visual hierarchy
    7. + 0.10 * code_self_contained # single file, no implicit dependencies
    8. )

    Writing the weights out explicitly is more convincing than “A just feels better,” and it makes it easier for a team to align on a standard.

    3. Dimension One: Real Differences in Agentic Coding Ability

    On L2 tasks, a pattern shows up repeatedly: the best open-source coding model and a mature closed-source product are close at the functional level, and the gap concentrates in visual layout and responsive mode switching. The former produces window systems with complete features and correct state management, but spacing and alignment in the default viewport look somewhat rough; the latter comes closer to a designer’s expectations in grid layout, breakpoint switching, and component spacing.

    This difference depends heavily on the prompt and sampling parameters. The same model, once given the added constraints “provide both desktop and mobile breakpoints and specify spacing rules,” usually recovers noticeably on visual scoring. So the engineering conclusion is:

    • If the deliverable faces end users and needs a visual design review, prefer an option with stronger multimodal and front-end aesthetic ability;
    • If the deliverable is an internal tool, a script, or a data-processing pipeline, functional completeness and single-file self-containment carry more weight, and an open-source option is already enough.

    Another frequently overlooked variable is multimodal input. When requirements arrive as screenshots, sketches, or design mockups, a text-only model loses a large amount of constraint information, and at that point “visual understanding” matters more than “visual generation.” Whether image input is supported often decides the real experience more than a few points of difference on a leaderboard.

    4. Dimension Two: Breaking Down Reasoning Performance

    Reasoning ability should not be judged by the final answer alone. Four observable metrics are worth splitting out:

    1. Final answer accuracy: objective questions with a unique solution, the easiest to automate;
    2. Process validity: whether the steps are necessary and whether there is circular reasoning;
    3. Self-correction rate: whether the model can proactively detect and fix its own first error in later reasoning;
    4. Expression fit: whether it can adjust the level of detail for the audience, giving the conclusion before the evidence.

    The first three decide whether a model is usable; the fourth decides whether it is pleasant to use. In real collaboration, an output that restates the requirement boundaries, points out ambiguities, then gives a solution and proactively labels its assumptions often reduces communication cost more than one extra correct answer. This is also why “high emotional intelligence” is a hard metric in real workflows: what it reduces is rework.

    Practical advice for evaluation: fix the temperature, fix the maximum output length, sample each question multiple times and take the mean, and record a classification of failure modes (missing conditions, arithmetic errors, out-of-scope assumptions, non-compliant formatting) instead of keeping only a single percentage.

    5. Dimension Three: Why World Knowledge Is Hard to Evaluate

    World knowledge is the dimension where models most easily “look about the same,” and also the easiest place to get burned. General common-sense questions are already covered by large amounts of training text, so they have low discriminative power. A more effective approach is to design three kinds of questions: time sensitivity, long tail, and conflict resolution:

    • Time sensitivity: questions about version changes or standard revisions, testing the knowledge cutoff and how uncertainty is expressed;
    • Long tail: regional regulations, obscure protocol fields, testing whether the model candidly admits uncertainty;
    • Conflict resolution: questions that contain a false premise, testing whether the model goes along with it and fabricates an answer.

    The third category separates models most clearly. A robust model says “this premise does not match the accepted definition” rather than constructing a self-consistent fake explanation. In engineering terms, this “refusal and clarification ability” deserves a place in acceptance criteria more than breadth of knowledge does.

    6. Selection Decisions: From Rankings to Scenario Matching

    Combining the dimensions above, here is a selection matrix that is independent of any specific product:

    Scenario Key Capability Suggested Weight Preference
    Front-end or design reproduction delivered to external users Visual generation, multimodal understanding Visuals and responsiveness first
    Long-horizon agentic coding Long-context consistency, tool calling Iteration stability first
    Data analysis and algorithm competitions Reasoning depth, code correctness Accuracy first
    Customer support, copywriting, collaboration assistants Expression fit, clarifying questions Communication quality first
    Private deployment and high concurrency Deployment form, throughput and cost Engineering controllability first

    For large-scale rollout, model capability also has to be evaluated inside the full pipeline: use a container platform to host the inference service, a message queue to smooth out traffic spikes, object storage to keep evaluation samples and artifacts, and logging plus monitoring and alerting to track failure rates and latency distribution. A model score is only the starting point of pipeline optimization, not the end.

    7. Common Pitfalls and Practical Recommendations

    • Judging by a single generation: variance across single samples is huge, so always sample multiple times and record the distribution;
    • Unequal prompts: giving different models prompts of different quality guarantees a distorted conclusion;
    • Ignoring regression: after a version change, rerun the same question set to catch capability regressions;
    • Treating a demo as acceptance: demo cases are usually cherry-picked, so acceptance must use a self-built question set;
    • Overlooking cost structure: throughput, context length, and concurrency usually affect total cost of ownership more than differences in unit price.

    A three-step rollout path: first build a private evaluation set of 30–50 questions and lock down the scoring script; then run all candidate models through the full L1–L4 set and record failure modes; finally apply business weights to pick a primary and a backup option, forming a mechanism that supports repeatable re-evaluation. Conclusions reached this way are more stable and more reusable than any one-off head-to-head comparison.