Evaluating Lightweight AI Models with Verifiable Structured Tasks

    Public leaderboards and one-off demos can look convincing, but they often do not tell you whether a lightweight AI model will satisfy your own requirements consistently. This article presents a structured evaluation approach that turns a task into explicit pass/fail conditions, separated into requirement coverage, method compliance, runnability and correctness, and delivery experience. It also shows how to design a geometry-construction test case, implement a reproducible evaluation loop, interpret pass rates and latency, and distinguish real model deficiencies from stability problems.

    Why structured evaluation tasks are needed

    Model selection often relies on public leaderboards and one-off demos. Leaderboard prompts are usually public, so models may be tuned for those examples, and the scores do not necessarily reflect real business performance. A single demo is also affected by sampling randomness: run it again and the output can be completely different, which makes it difficult to reproduce. What developers really need to know is whether a model can reliably complete a task described in their own requirements.

    A structured task offers a verifiable alternative. It decomposes requirements into conditions that can be individually judged as pass or fail. The evaluation result changes from “the output looks good” to “these conditions were met and these were missed.” That kind of statement is easier to discuss within a team and easier to use for tracking changes between model versions.

    Four evaluation dimensions

    A complete evaluation should cover four dimensions. Their scores should be recorded separately so that one dimension does not mask another.

    Requirement coverage

    Check whether the output includes all explicit requirements, such as page structure, interaction behavior, output format, and additional features. Coverage is calculated from the number of conditions, with each condition scored independently. If a task contains ten requirements and the model satisfies eight, coverage is 80 percent. Coverage alone does not indicate quality, but it quickly reveals omissions.

    Method compliance

    When the prompt specifies a solution path, the output must follow that path. A correct visual result does not prove compliance. For example, a task may require constructing a figure using a restricted tool. If the model uses coordinate formulas to compute the result and then draws it, the final graphic might be exactly right, but the required construction process was skipped. This should be marked non-compliant. Method compliance is the dimension most often ignored and the one that best shows whether a model understood the task.

    Runnability and correctness

    The main concern here is whether the code runs in the target environment and whether numerical and geometric relationships are precise. For geometry tasks, the rendered output can be inspected by reading key point coordinates, computing side lengths, angles, or point-to-line distances, and comparing them with theoretical values. If the error exceeds a preset threshold, the case fails. The threshold should be set according to the precision required by the task and kept consistent across the test set.

    Delivery experience

    This dimension includes time to first visible content, output throughput, mid-stream pauses, and cases where the model produces only reasoning with no visible output. These metrics affect whether users are willing to wait and how server-side timeouts should be configured. Experience metrics should be reported separately from quality metrics, because a fast model is not necessarily high quality, and a high-quality model is not necessarily fast.

    Designing a geometry construction test case

    Geometry construction problems are demanding because they test spatial reasoning, step-by-step inference, constraint understanding, and graphics programming at the same time. The following example, “construct a regular heptagon using a restricted tool,” shows how to break such a task into checkable items.

    Required steps

    1. Construct the base figure: draw a square and determine the coordinates of its vertices.
    2. Construct an auxiliary line: draw the perpendicular bisector of the base edge, explicitly defined as the line perpendicular to the base at its midpoint.
    3. Construct a circle: use a specified vertex as the center and the diagonal length as the radius.
    4. Perform the restricted-tool operation: place one end of the tool at the specified vertex, slide the first mark on the tool around the circle until the second mark crosses the perpendicular bisector, and record that position.
    5. Complete the conventional construction: use the resulting point to find centers, draw perpendiculars and angle bisectors, and continue until all vertices of the heptagon are obtained.
    6. Control trajectories and retained marks: distinguish the movement trace from the final construction marks, and retain only the necessary segments.
    7. Extend the output: export the dynamic process as an animated image file.

    Checklist and forbidden shortcuts

    Each step should become a check item. Step 4 could be checked by asking whether the restricted-tool sliding process exists. Step 6 could be checked by asking whether the final figure still contains unnecessary auxiliary arcs.

    The test case should also define a list of forbidden shortcuts. In this example, the model must not use trigonometric functions to compute all vertex coordinates and then draw them directly, and it must not skip the restricted-tool operation. Only outputs that satisfy method compliance are counted as passes.

    Prompt wording should also avoid ambiguity. Instead of “perpendicular bisector,” write “the perpendicular bisector of the base edge.” Instead of “the center,” specify which vertex is the center. A precise description ensures the evaluation measures model capability rather than the model’s ability to guess an ambiguous requirement.

    Implementing the evaluation loop

    The pseudocode below shows a reproducible evaluation loop. It fixes the test set, samples each case multiple times, and records quality metrics and latency metrics in the same pass.

    1. # Pseudocode: reproducible model evaluation loop
    2. cases = load_cases("geometry_construction_v1.json") # fixed version of the test set
    3. results = []
    4. for case in cases:
    5. for trial in range(N): # sample each case N times
    6. t0 = now()
    7. stream = model.generate(case.prompt, stream=True)
    8. first_visible_at = None
    9. chunks = []
    10. for chunk in stream:
    11. if first_visible_at is None and chunk.has_visible_text:
    12. first_visible_at = now()
    13. chunks.append(chunk)
    14. output = join(chunks)
    15. results.append({
    16. "coverage": check_requirements(output, case.checklist),
    17. "compliance": check_method(output, case.forbidden_shortcuts),
    18. "correctness": render_and_probe(output, case.geometry_expectations),
    19. "ttfv": first_visible_at - t0 if first_visible_at else None,
    20. "total_time": now() - t0,
    21. "thinking_only": first_visible_at is None,
    22. })
    23. report(aggregate(results))

    Three implementation points matter. First, the test set must be versioned; every comparison should use the same version. Second, decoding parameters should remain unchanged across runs and should be recorded. Third, latency is affected by service load, so latency data should be collected in a comparable time window, or sampled multiple times and reported as a median.

    Reading the results

    If a single case is sampled too few times, the conclusion is unreliable. At least five trials per case is a reasonable minimum. Report pass rate, median latency, and 90th-percentile latency. If two of five trials produce only reasoning and no visible output, the conclusion should be “insufficient stability” rather than “the model does not have this capability.” These two conclusions point to different improvement directions.

    For a fair model comparison, use the same prompts, the same version of the test set, similar decoding parameters, and a similar time window. Otherwise, differences may come from environmental changes rather than from the model itself.

    When presenting results, report quality and speed as separate axes. A model may lead on quality but be noticeably slower. The value of that trade-off depends on the scenario: interactive applications care more about latency, while offline batch processing cares more about quality and success rate.

    Common failure modes and causes

    The following failure modes often appear during evaluation and can be grouped as follows.

    1. Surface correctness with an incorrect path. The output appears to satisfy the task, but the implementation bypasses a required step. This cannot be detected by looking only at the final result; it requires a method-compliance check.
    2. Reasoning only, with no visible output. The model spends a long time in reasoning and finally produces no visible result. Common causes include the output length limit being consumed by reasoning content, server-side timeouts, and streaming interfaces that do not emit visible content under certain conditions.