AI Coding Benchmarks for Android Engineering: Metrics, Cost, and Team Evaluation Loops

    General-purpose coding benchmarks rarely reflect what makes real Android engineering hard. This article breaks down why Android needs long-horizon engineering benchmarks, explains what pass rate, average completion, average wall-clock time, and per-run cost actually measure, and shows how model capability tiers translate into task-level cost-performance tradeoffs. It also outlines how to build an internal evaluation loop with a fixed environment, layered sampling, automated acceptance checks, and a weighted scoring model, plus common pitfalls to avoid.

    1. Why Android Engineering Needs Its Own Coding Benchmark

    Most general coding benchmarks consist of isolated functions, algorithm puzzles, or short scripts. The difficulty in real Android projects almost never comes down to whether a model can write syntax. It comes from engineering constraints: multi-module build dependencies, consistency between manifest files and permission declarations, lifecycle and state restoration, background work and notification policies, and behavioral differences across OS versions. A model can produce polished UI code and still fail to make the project compile or pass static checks — a class of failure that general leaderboards do not surface.

    For this reason, Android-oriented benchmarks usually frame tasks as long-horizon engineering work, typically in four categories:

    • App creation: starting from an empty project and delivering the directory structure, dependency configuration, and a minimal runnable loop.
    • Feature development: adding capabilities to existing code while staying consistent with the existing architecture, naming, and error-handling style.
    • Code migration: moving legacy APIs, legacy build setups, or legacy architecture patterns to a new approach while preserving behavioral equivalence.
    • App conversion: cross-platform or cross-form-factor rework involving resources, permissions, and interaction paradigms.

    What these four categories share is that no single interaction can finish them. The model must plan autonomously, read and write multiple files, run verification, and iterate based on errors. Evaluation is therefore no longer a single question-and-answer turn, but an engineering session with a time budget and a cost budget.

    2. What the Four Core Metrics Actually Measure

    A set of publicly reported figures can serve as an abstract reference: under one agent configuration, a model passed roughly 24 of 30 long-horizon tasks, with an average completion of about 82, an average elapsed time of about 27 hours, and a per-run benchmark cost of about $300; a lighter model passed about 17, with an average completion of about 71, an average elapsed time of about 12 hours, and a per-run cost of about $10. Translating these numbers back into metric definitions is where the value lies.

    • Pass rate: the share of tasks that fully satisfy the acceptance criteria — the strictest outcome metric. It measures whether the model can deliver and is most sensitive to end-state quality.
    • Average completion: the mean partial score also awarded to failed tasks, measuring how far off the result is. High completion with a low pass rate usually means the model loses points on final verification, edge-case handling, or convention consistency.
    • Average elapsed time: wall-clock time from task dispatch to final judgment, reflecting the efficiency of autonomous iteration and the round-trip cost of the toolchain. Long durations usually come from repeated builds and repeated fixes.
    • Per-run cost: the resource overhead of completing one full benchmark round, which determines whether evaluation can be run routinely. Cost is not linearly related to pass rate, and higher spend does not necessarily buy proportional gains.

    One key conclusion: the four metrics must be read together. Looking only at pass rate ignores delivery cycles; looking only at cost sacrifices the quality floor; looking only at completion is easily misled by work that merely looks extensive.

    3. Structural Differences in Capability Tiers and Cost-Performance

    Abstracting the figures above, current models show a clear gradient on long-horizon engineering tasks: top-tier models reach a pass rate close to 30%, the upper-middle tier sits around a quarter, and lightweight models fall in the one-sixth to one-fifth range. At the same time, lightweight models take about half the elapsed time of top-tier ones and cost only a fraction of it.

    This leads not to a conclusion about which model is better, but to a task-tiering conclusion:

    • For highly coupled, cross-module tasks that require long chains of autonomous repair, top-tier capability has high marginal value and is worth the time and expense.
    • For tasks with clear boundaries that can be split into small verification steps, lightweight capability combined with strict checks offers better cost-performance.
    • For scenarios requiring frequent trial runs and batch regression, cost and elapsed time become the main bottleneck, so per-session overhead should be reduced first.

    4. Building Your Team’s Own Evaluation Loop

    External leaderboards are only useful for establishing priors; real decisions depend on internal evaluation. A suggested rollout:

    1. Task set construction: extract real tasks from historical requirements, covering all four categories — creation, development, migration, conversion — with no fewer than ten items per category and explicit acceptance scripts.
    2. Environment pinning: standardize build tool versions, dependency repository mirrors, and device emulation environments so environment drift does not pollute results.
    3. Metric collection: record pass rate, completion, elapsed time, and cost together, and keep full session traces for attribution.
    4. Layered sampling: screen quickly with a small sample first, then run a full regression on candidate approaches to control total evaluation overhead.
    5. Routine regression: wire evaluation into continuous integration so it triggers automatically when the model or prompt strategy changes.

    Acceptance should be automated as much as possible, for example:

    1. # Pseudocode: unified acceptance entry point
    2. verify() {
    3. restore_workspace "$1" # restore to the task's initial snapshot
    4. apply_patch "$2" # apply the changes produced by the model
    5. run_build || exit 11 # build failure is an immediate fail
    6. run_lint || exit 12 # convention checks
    7. run_unit_tests || exit 13 # unit tests
    8. run_e2e_smoke || exit 14 # smoke test on critical paths
    9. echo "PASS"
    10. }

    Accompanying prompt constraints matter just as much, since clear boundaries can substantially raise the pass rate:

    1. Constraints:
    2. 1. Modify only files related to the task; unrelated refactoring is prohibited;
    3. 2. Run build and tests after every change, and fix failures before moving on;
    4. 3. Do not introduce new external dependencies unless the task explicitly requires it;
    5. 4. Output a summary of changes and a list of unresolved issues.

    5. Balancing Cost, Latency, and Quality

    In practice, a simple weighted model can quantify the tradeoff, with weights determined by the business stage:

    1. Score = w1 * pass_rate + w2 * completion - w3 * log(elapsed_time) - w4 * log(cost)

    During prototyping, raise the weights on elapsed time and cost to allow fast trial and error; during a delivery sprint, raise the weights on pass rate and completion and tolerate higher overhead. If the team has a stable container platform, object storage, and logging service, session traces and artifacts from each evaluation run can be archived, and monitoring with alerting can form a cost dashboard that identifies unusually expensive task types.

    6. Common Pitfalls and Practical Recommendations

    • Pitfall 1: selecting on pass rate alone. Ignoring elapsed time can send delivery cycles out of control.
    • Pitfall 2: ignoring completion. High completion indicates the direction is right, so verification and convention work should be shored up first.
    • Pitfall 3: a task set that is too easy. Simple tasks make all approaches converge and lose discriminative power.
    • Pitfall 4: an unfixed environment. Dependency drift makes re-test results incomparable.

    In practice, a dual-track approach is recommended: a primary model handles highly coupled tasks while lightweight models handle batch, clearly bounded tasks, with a unified acceptance pipeline acting as the quality gate. For teams using relevant general capabilities from Baidu AI Cloud, code and artifacts can be stored in object storage, evaluation tasks orchestrated on a container platform, and metrics written to a logging service with monitoring and alerting configured — turning evaluation from a one-off activity into sustainable engineering infrastructure.