How to Evaluate LLM Coding Ability: Hands-On Testing Beyond the Leaderboards

    Leaderboard scores are often used as the basis for model selection, but a high score doesn't guarantee good engineering performance. This article explains how to assess whether a model is truly fit for coding work by examining parameter counts, context windows, open-source licenses, and multi-dimensional hands-on tests—including benchmark tasks, terminal execution, cloud service integration, front-end reproduction, and structured developer "vibe checks"—along with common weaknesses, mitigation strategies, and a four-step selection process.

    A model’s coding score is often used as the basis for selection decisions, but a high leaderboard score doesn’t guarantee that a model works well in real engineering. To judge whether a model can handle code work, you need to look at parameters, context windows, licenses, and real tasks together. This article follows that approach.

    1. Parameters and Context Windows: Get the Definitions Right First

    Parameter count is a rough indicator of model capacity. Models at the 700B parameter scale do exist today, but more parameters don’t necessarily mean better coding results. Training data, post-training methods, inference modes, and inference costs all affect the outcome. When documenting a model, record its name, version number, and the parameter count as officially stated by the publisher. For Mixture-of-Experts (MoE) models, also distinguish between total parameters and the parameters actually activated per inference.

    Context windows likewise involve two different numbers. The nominal window is the maximum number of tokens the API accepts. The effective window is the range within which the model can still reliably use the information. The gap between the two can be large. Only some models currently support million-token inputs, and long inputs bring higher costs and longer time-to-first-token latency.

    Long context also carries a known risk: “Lost in the Middle.” In the 2023 paper “Lost in the Middle: How Language Models Use Long Contexts” (arXiv:2307.03172), Liu et al. reported that in multi-document QA and key-value retrieval tasks, most tested models showed degraded accuracy when relevant information was placed in the middle of the input, producing a U-shaped curve overall. This is an observation on specific tasks and specific models; it doesn’t mean every model will show the same problem on every code task. Teams can verify this themselves: place the same key function definition at the beginning, 25%, 50%, 75%, and end positions of the input, run several trials per position, record call accuracy, and then decide whether chunked retrieval is needed.

    2. Check Open-Source Licenses Clause by Clause

    The word “open source” alone doesn’t tell you whether commercial use is allowed. Licenses like MIT and Apache 2.0 generally permit commercial use, modification, and redistribution, but require retaining copyright notices. Some large models use custom licenses. For example, the Llama Community License requires companies with more than roughly 700 million monthly active users to apply for a separate license, and it includes an acceptable use policy. The license for model weights may also differ from the license for inference code, and the provenance of training data can introduce compliance risks as well.

    Before selecting a model, check the following item by item:

    • The name and version of the license
    • Whether commercial use has user-scale or revenue restrictions
    • Whether fine-tuned models can be distributed, and under what conditions
    • Which uses the acceptable use policy prohibits
    • Whether the sources of training data and weights are clear

    These questions should be reviewed by legal or compliance teams. Engineering teams should not make these judgments on their own.

    3. Multi-Dimensional Evaluation: Combined Benchmarks, Terminal Execution, and Front-End Reproduction

    A single score can’t reflect how a model performs in engineering. Build a multi-dimensional evaluation table where each dimension specifies the task, weight, pass criteria, and recorded fields.

    Dimension Test Task Weight Pass Criteria Recorded Fields
    General benchmarks Algorithm problems by language: 30 each in Python, Java, and Go 20% Unit test pass rate Language, problem ID, passes, duration
    Terminal execution Install dependencies, compile, and run inside a container, with up to 3 rounds of error fixing allowed 30% Final script runs successfully Rounds, raw error messages, fix actions
    Cloud service integration Upload a file to an S3-compatible object storage service 20% Object size and MD5 match after upload Error codes, whether credentials were leaked
    Front-end reproduction Generate HTML, CSS, and JavaScript from a design mockup 15% Pixel difference between screenshot and mockup below the agreed threshold, rendering correctly in two browsers Viewport size, browser version, diff screenshots
    Hallucination and instruction following Ask the model to call an API that doesn’t exist in the documentation 15% Explicitly states the API doesn’t exist instead of fabricating a call Number of fabrications, refusal explanation

    The weights sum to 100%. Teams may adjust weights based on business priorities, but the rationale for any adjustment should be documented in the report.

    Results must be reproducible. Pin the container image, dependency lock files (such as poetry.lock and package-lock.json), sampling parameters, and system prompts, and run the same problem set at least 3 times, taking the median.

    For the cloud service integration dimension, the following code can serve as a starting point. The original example’s comments mentioned endpoint configuration, but the code didn’t set the endpoint, region, or credentials, and had no error handling—so it couldn’t run directly. Here is the corrected version:

    1. import os
    2. from typing import Optional
    3. import boto3
    4. from botocore.exceptions import BotoCoreError, ClientError
    5. def upload_file_to_bucket(bucket_name: str, file_path: str,
    6. object_key: Optional[str] = None) -> bool:
    7. """Upload a local file to object storage. Credentials come from
    8. environment variables or an IAM role, never from the code itself."""
    9. endpoint_url = os.environ.get("S3_ENDPOINT_URL") # Endpoint for private or S3-compatible storage; leave unset for native AWS
    10. region = os.environ.get("AWS_REGION", "us-east-1")
    11. key = object_key or os.path.basename(file_path)
    12. s3 = boto3.client("s3", region_name=region, endpoint_url=endpoint_url)
    13. try:
    14. s3.upload_file(file_path, bucket_name, key)
    15. return True
    16. except ClientError as e:
    17. code = e.response.get("Error", {}).get("Code", "UnknownError")
    18. print(f"Object storage returned an error: {code}")
    19. return False
    20. except (BotoCoreError, FileNotFoundError) as e:
    21. print(f"Local or network error: {e}")
    22. return False
    23. if __name__ == "__main__":
    24. ok = upload_file_to_bucket("test-bucket", "./dummy.txt")
    25. print("Upload succeeded" if ok else "Upload failed")

    Before running, make sure the following conditions are met:

    • Dependency versions are written to requirements.txt and pinned, e.g., boto3==1.34.x; use the version your team has actually tested and verified.
    • Credentials are injected via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or an IAM role, never written into code or logs.
    • Permissions grant only s3:PutObject on the target bucket—do not use s3:*.
    • Tests use only fictional or sanitized data files, never production data.

    Expected outcomes are as follows. When credentials are missing, the code catches BotoCoreError and prints a message. When the bucket doesn’t exist, the server returns NoSuchBucket. When permissions are insufficient, it returns AccessDenied, and you should check the IAM policy. During evaluation, record whether the model can provide the correct fix steps based on these error codes.

    4. Hands-On Developer Testing: Use a Vibe Check Checklist to Avoid Pure Gut Feel

    A “vibe check” is a quick judgment developers make based on actual usage experience. Its value lies in being close to real work, but it’s easily biased by personal preference. To avoid that bias, record the input, output, number of fixes, and whether the result was ultimately adopted for every test.

    Scenario Sample Input Scoring Rules How to Record Hallucinations
    Legacy code refactoring A ~200-line function with few comments; the function signature must stay unchanged Signature unchanged, all existing unit tests pass, cyclomatic complexity reduced Record newly introduced functions or libraries that don’t exist in the project
    Cloud service integration A vendor SDK documentation excerpt plus a requirement description Code runs, error handling is complete, no hardcoded credentials Record fabricated parameter names and method names
    Production incident troubleshooting 20 lines of sanitized logs and one alert message Correctly identifies the module and root cause Record cases where unrelated logs were treated as the root cause

    Run at least 5 samples per scenario and average the results. The recorded fields in the checklist can go directly into the team’s evaluation table.

    5. Common Weaknesses and Workarounds

    In practice, models have three common weaknesses. Each has a corresponding workaround.

    1. Forgetting information in long codebases. The risk is that key constraints get ignored. The workaround is to do chunked retrieval by module, place interface definitions and business constraints at the beginning and end of the input, and have the model first list the files it depends on before generating code.
    2. Internal DSLs and highly customized business architectures. The risk is that the model fabricates syntax, producing plausible-looking code that won’t run. The workaround is to first validate with a 20–50 sample few-shot test, write the syntax specification into the prompt, and verify generated output with a parser or compiler rather than trusting it directly.
    3. Complex dependency conflicts. The risk is that the model proposes overly idealized version combinations. The workaround is to pin lock files and the container environment, and let the model fix problems within that environment. For Maven projects, run mvn dependency:tree first to locate conflicts, then ask the model for fix suggestions, and merge only after verification in a test environment.

    6. How to Approach Model Selection

    Model selection can proceed in four steps.

    1. List the 3 to 5 tasks your team encounters most often, such as refactoring, cloud service integration, and incident troubleshooting.
    2. Run 2 to 3 candidate models through the evaluation table in this article, keeping the container environment, prompts, and sampling parameters fixed, and run each task multiple times to take the median.
    3. Combine the quantitative results with the vibe check records, and review licenses and compliance requirements in parallel.
    4. Document the final decision, including weights, scores, and the reasons for choosing one model over the others, so the evaluation can be repeated when new model versions are released.