How to Evaluate AI Agents: From Constraint-Based Decisions to Engineering Practice

    Evaluating AI agents requires more than checking whether they follow instructions quickly. This article breaks down agent capability into four observable layers—task understanding, reasoning under constraints, tool execution, and result verification—and uses two practical scenarios, project directory cleanup and 3D mesh repair, to show why task completion must be verifiable, reversible, and risk-aware. It also outlines how developers and enterprises can build a structured evaluation system around task quality, interaction cost, engineering cost, and risk control.

    1. Evaluating an Agent Is Not About Whether It “Obeys”

    The same agent may strike one person as accurate and reliable, and another as hesitant and overly passive. These differences do not necessarily reflect the model’s capabilities—they may stem from different task goals, usage patterns, or engineering conditions.

    In everyday Q&A, users mostly care whether answers are direct and naturally expressed. In engineering tasks, however, users need to ask a different set of questions: Can the results be verified? Will modifications break existing functionality? Can operations be recovered after failure? And does the agent stay within authorized boundaries?

    For this reason, “willing to execute immediately” should not be equated with “strong capability,” and “asking for more information” should not be equated with “weak capability.”

    Conversely, an agent that hesitates or refuses to act is not automatically making the right call. A reliable system should explain where the risk comes from, what evidence is missing, and under what conditions it can proceed. If it merely asks the user to confirm repeatedly without proposing a viable plan, that is still a failure to complete the task.

    A professional evaluation of an agent must examine its behavior within the complete workflow—not just whether a single response looks satisfactory.

    2. Breaking “Model Capability” into Four Observable Layers

    2.1 Task Understanding: Identify the Goal, Not Just Match the Instruction

    When a user says “clean up the project directory,” the real goal could be freeing disk space, reducing unnecessary files to shorten test cycles, or making the deliverable package tidier.

    These goals call for different actions. Freeing space suggests starting with regenerable caches; shortening test time calls for reviewing how tests are organized and where execution is duplicated; tidying a deliverable requires clarifying delivery boundaries rather than deleting every intermediate artifact in the development environment.

    If the agent fails to distinguish these goals, strictly executing “delete files” may still fail to solve the actual problem.

    2.2 Reasoning and Decision-Making: Trading Off Between Constraints

    Engineering tasks usually involve multiple constraints. Project cleanup, for instance, wants to reduce disk usage while preserving the ability to roll back; mesh repair wants to fill missing regions while maintaining surface continuity and editability.

    Such problems rarely have a single context-free optimal solution. The agent must identify which requirements are hard constraints and which are negotiable.

    For example, “never delete the only copy of the data” should take priority over “free as much space as possible”; “preserve interface behavior” should take priority over “reduce lines of code.” Without such prioritization, the agent tends to optimize local metrics at the expense of the overall goal.

    2.3 Tool Execution: Turning Decisions into Reliable Operations

    Correct analysis does not guarantee correct execution. The agent must also handle file paths, dependencies, permissions, execution order, and exceptions.

    Batch modifications are especially demanding. An apparently simple cleanup may touch running processes, directories shared with other tasks, and experimental results that cannot be regenerated.

    Evaluating execution capability therefore cannot stop at whether an operation returns success. It should also check whether the target scope was accurate, whether partial failures were detected, and whether the execution state was fully recorded.

    2.4 Result Verification: Proving Completion, Not Announcing It

    “It’s done” is a statement, not evidence.

    Code changes require tests, behavior checks, or human review; directory cleanup requires reconciling the space actually freed against what was retained; mesh repair requires checking boundaries, normals, self-intersections, and geometric deviations.

    A strong agent workflow treats verification as part of the task itself, not as an optional add-on after execution ends.

    3. Project Cleanup: A Typical Test of Agent Reliability

    3.1 Old Files Are Not Necessarily Useless Files

    Code generation and repeated validation do leave behind many scripts, logs, test data, and temporary outputs. But a file’s purpose cannot be judged from modification time, extension, or naming alone.

    An old script may hold critical data migration logic; a set of test samples may exist to reproduce intermittent bugs; a large result file may be a raw record that cannot be collected again. Conversely, recently generated files may just be rebuildable caches.

    Cleanup decisions should therefore consider, at minimum:

    • Whether the file is referenced by code, configuration, or task workflows;
    • Whether it can be regenerated from existing inputs and documented steps;
    • Whether a reliable copy already exists;
    • Whether it is used for bug reproduction, regression testing, or auditing;
    • Whether there is a verifiable recovery path after deletion.

    When this information is insufficient, direct deletion is a high-risk operation.

    3.2 Version Control Reduces Risk but Does Not Replace Full Backups

    Version control records the history of source code and configuration changes, helping developers compare diffs, roll back modifications, and locate problems. But it does not automatically cover every file in a project.

    Data outside version management, excluded directories, large binary files, and content stored externally may fall outside the recovery scope. Even for tracked files, you need to confirm that the relevant history is actually usable—having a version control setup does not by itself make deletion risk-free.

    A sounder approach: confirm the recovery source for each category of files and validate the recovery process. Data that cannot be easily rebuilt also needs independent backups or storage snapshots.

    3.3 From “Delete Immediately” to “Phased Remediation”

    A reliable cleanup workflow can be structured in five steps:

    1. Inventory. Measure directory usage, file types, reference relationships, and generation sources; produce a candidate list.
    2. Classify. Sort files into source files, regenerable artifacts, test assets, historical data, and files of unknown purpose.
    3. Dry run. Output only the proposed operations without changing any file state, explaining the rationale and risk of each.
    4. Quarantine. Move questionable files to a quarantine area, preserving original paths, migration timestamps, and recovery instructions.
    5. Verify and finalize. Run the necessary checks after quarantine; decide on permanent deletion only after passing preset validations and retention policies.

    Note that quarantining does not necessarily free disk space. If the quarantine area sits on the same storage device, usage will usually not drop noticeably. If the goal is relieving disk pressure, use independent storage with sufficient capacity and confirm the migration completed fully.

    The value of this workflow is that it postpones irreversible operations as long as possible, giving errors a chance to be discovered and corrected.

    4. Writing Task Instructions That Can Be Executed and Verified

    “Clean it all up for me” expresses a wish but defines no engineering boundaries. A more effective task specification includes five parts: goal, scope, constraints, authorization, and acceptance criteria. For example:

    Goal: Reduce disk usage from regenerable files in the project.
    Scope: Analyze only the specified build output and temporary result directories.
    Constraints: Do not modify source code, raw data, configuration files, or regression test samples.
    Authorization: Generate the inventory first without deleting anything; after confirmation, quarantine files of unknown purpose first.
    Acceptance: Record the files processed, the space change, and recovery methods, then run the agreed project checks.

    This level of detail does not require the user to complete the analysis in advance—it clarifies the boundaries the agent must not decide on its own.

    For less experienced users, the agent should proactively help fill in task information. Asking “Is your main goal freeing space, or organizing the deliverables?” is usually more effective than vaguely requesting “more context.”

    Good interaction reduces the user’s decision burden while preserving necessary control.

    5. 3D Mesh Repair: Why “Filling the Hole” Is Not a Successful Repair

    Repairing missing faces in 3D models is another classic case of constraint-based decision-making.

    On the surface, the task is simply filling a hole. In practice, you must determine whether the hole should be closed at all, how the surrounding surfaces flow, whether the patch affects structural features, and whether the model will later be used for visualization, deformation, or manufacturing.

    5.1 Different Problems Require Different Repair Strategies

    What looks like a “broken face” may correspond to several distinct situations:

    • Missing faces forming open boundaries;
    • Incorrect connectivity between adjacent faces;
    • Duplicate vertices leaving boundaries unconnected;
    • Inconsistent face orientation;
    • Local self-intersections or degenerate geometry;
    • An intentional opening mistaken for a defect.

    These cannot all be solved by generic “hole filling.” In particular, automatically closing a deliberately designed opening changes the model’s function.

    5.2 Topology Goals Depend on the Use Case

    A model for static display may prioritize visual continuity and rendering quality; a model for deformation needs attention to edge flow and deformation quality near joints; a model intended for subdivision surfaces requires care about how local topology affects curvature; a model headed for manufacturing may need checks on watertightness, thickness, and process constraints.

    Quad-based topology offers advantages in some editing and deformation workflows, but not every scenario demands all-quads, and triangles do not inherently mean low quality. The topology scheme should be chosen based on the use case—not by treating one face structure as a universal standard.

    5.3 Turn Inputs from “Reference Images” into “Verifiable Constraints”

    A single reference image typically lacks depth, occluded regions, and back-side structure. Even if the agent proposes a plausible-looking repair, that does not mean the true structure has been recovered.

    More effective inputs include multi-angle views, annotations of the regions to process, boundaries that must be preserved, curvature flow, and the downstream use case. Where necessary, also provide the allowable geometric deviation and any regions that must not be modified.

    After execution, geometry and topology should be checked separately: Does the patch match the expected shape? Are connections correct? Were new non-manifold structures introduced? Were surrounding regions damaged? A visually hole-free surface only means some of the checks were completed.

    6. Proactiveness and Safety Are Not in Conflict

    “Deciding for the user” and “executing correctly within constraints” are not either-or choices. A well-designed agent system can configure autonomy by risk level.

    Low-risk, easily reversible operations—generating reports, analyzing dependencies, drafting candidate plans—can run automatically.

    Medium-risk operations—bulk renames, local structural adjustments, file moves—can execute with previews, backups, and explicit boundaries in place.

    High-risk operations—permanently deleting the only copy of data, modifying critical shared configurations—should require explicit authorization and stricter validation conditions.

    It is important to distinguish “reversible” from “low impact”: a configuration change may be rollback-capable yet still cause an outage before it is reverted. Risk assessment should therefore also consider blast radius, failure propagation, and recovery time.

    Reasonable proactiveness means pushing forward aggressively in low-risk areas while presenting clear options at high-risk boundaries—not returning every choice to the user, and not bypassing the user entirely.

    7. How Developers and Enterprises Should Build an Evaluation System

    When evaluating agents, we recommend observing four categories of metrics.

    Task quality. Check whether functionality is correct, constraints are satisfied, and results cover edge cases—rather than whether the demo went smoothly.

    Interaction cost. Track how many clarifications were needed, how much manual correction was required, and whether users can understand the agent’s reasoning.

    Engineering cost. Consider execution time, compute and storage overhead, verification burden, and rework costs together. Shorter output does not necessarily mean lower total cost.

    Risk control. Check for unauthorized operations, irreversible modifications, missed verification steps, and failed recoveries.

    Evaluations should use the same task set, identical input conditions, and consistent acceptance criteria wherever possible, with operation logs retained. Otherwise, differences in context, permissions, and engineering environments across users can easily be misread as differences in model capability.

    Enterprise scenarios should additionally harden these requirements into the system itself: least-privilege access, approval workflows for sensitive operations, operation logging, data retention policies, and failure recovery mechanisms. Prompt-level constraints alone cannot substitute for real permission isolation.

    8. Conclusion: What Matters Is Controllable Autonomy

    A capable agent should execute decisively when information is sufficient, pinpoint gaps precisely when evidence is lacking, offer reversible options when risk is high, and prove task completion with verification results.

    User engineering experience does affect outcomes—but that does not give systems license to blame every failure on the user. A mature agent should also help users articulate goals, identify constraints, and understand risks, gradually turning professional expertise into reusable workflows.

    Whether it is code cleanup or mesh repair, the core principles are the same: clarify goals, protect critical assets, limit the operating boundary, preserve recovery paths, and establish independent verification.

    The ultimate standard for evaluating an agent is neither how proactive nor how cautious it is, but whether it can complete real tasks—with an appropriate degree of autonomy—in a way that is explainable, verifiable, and recoverable.