Choosing and Deploying Foundation Models for AI Agents: A Practical Guide
When foundation models are integrated into AI agent systems, evaluation criteria change: it's no longer enough to check whether a model gives correct answers—you must also verify that it calls tools within authorized boundaries, interprets execution results correctly, and stops when conditions are insufficient. This guide covers how to divide responsibilities among language, multimodal, and speech models, separate model suggestions from business execution, build reproducible task-based evaluations, assign models by task risk, and roll out agents in stages starting with read-only tasks.
Once a foundation model is embedded in an agent system, the evaluation target shifts. What matters is no longer just whether the model produces correct answers, but whether it can invoke tools within clearly defined authorization, understand execution results, and stop when conditions are insufficient. A seemingly correct reply can mask a failed query; a perfectly formatted tool call can still target the wrong object. The real question for development teams is not “which model ranks higher,” but “under identical tasks, tools, and permissions, which solution delivers correct results at an acceptable cost.”
1. Clarify the Division of Labor: Language Reasoning, Multimodal Understanding, and Speech Generation
In an agent, a language foundation model typically handles task understanding, step selection, and result summarization. For example, when an employee asks “help me find out why this expense report was rejected,” the model should recognize that the user wants to query an existing record, not create a new request; if the document ID is missing, it must decide whether to ask a follow-up question or narrow the scope using already-authorized conditions. The model may participate in selecting tools and filling in parameters, but identity verification, permission checks, and business rules must be enforced by the application and tool layer. A syntactically valid request generated by a model does not mean the request itself is authorized.
Multimodal models address inputs that are not purely text. Users may upload photos of receipts, page screenshots, or add voice explanations. The application should not merely check whether the model “grasps the gist”—it must verify that the model correctly distinguishes field positions, amount ownership, and annotation targets. In receipt review, for instance, total amount, tax, and actual paid amount may appear in adjacent areas. Extraction results should be linked to evidence in the original material wherever possible; when an image is blurry or fields are missing, mark them as pending confirmation rather than inferring a plausible-looking value from context.
Speech synthesis converts finalized text into audible output. Natural-sounding speech does not mean correct business conclusions. For amounts, dates, reference numbers, and proper nouns, accuracy of pronunciation should be accepted separately from voice naturalness. If the architecture chains speech recognition, language reasoning, and speech synthesis together, record latency at each stage separately, and test whether the system stops the old playback and correctly resumes the conversation after user interruption. Supporting voice input, supporting voice output, and supporting real-time bidirectional interaction are three different capabilities—you cannot infer one from “supports multimodal.”
2. Separate Model Suggestions from Business Execution
A controllable agent typically follows a clear execution chain: receive the request and verify identity, present the model with currently permitted tools, validate the model’s proposed actions at the application layer, execute the tool and return results, and finally generate user-readable feedback. The application should also maintain explicit task states, distinguishing “awaiting information,” “awaiting confirmation,” “executing,” “succeeded,” and “result unknown.” Only when a tool returns a verifiable success result can the system declare the task complete.
Tools should be small and well-defined. Rather than offering a generic endpoint that can read and write multiple record types, split querying, previewing changes, and committing changes into separate tools. For commit operations, first display the target object, the change content, and the scope of impact, then require user confirmation; at execution time, bind the action to the confirmed content to prevent the target from changing between confirmation and execution. The tool layer must still independently validate permissions and business conditions—the original controls should not be skipped just because the call comes from an agent.
Exception handling is where architectural flaws surface most clearly. A query timeout can usually be retried a limited number of times, but a write timeout only means the caller did not receive a timely response—it does not prove the operation did not take effect. If the system immediately resends, it may cause duplicate submissions. A safer design is to make write endpoints idempotent and query the original operation’s status via a request identifier; if the result still cannot be determined, explicitly tell the user “status pending verification” instead of treating timeout as failure. Meanwhile, set a maximum number of execution steps and a task time limit to prevent the model from repeatedly querying or spinning on the same problem.
3. Move from Leaderboards to Reproducible Task Evaluations
Public leaderboards help narrow the candidate list, but they cannot replace business acceptance testing. Leaderboards measure performance on fixed datasets and scoring rules; real workflows are also affected by tool quality, permission scope, data completeness, and exception handling. A model that excels at knowledge Q&A will not necessarily complete cross-tool tasks reliably, let alone handle operations with side effects.
Organize evaluation sets into three categories. The first is routine tasks—single queries, multi-turn condition refinement, cross-record aggregation—to validate baseline usability. The second is edge-case tasks—ambiguous instructions, contradictory materials, duplicate names, records the user is not authorized to view—to check whether the system asks follow-up questions, refuses, or requests confirmation. The third is failure tasks—tool timeouts, empty results, lost responses after writes—to check whether the system recovers correctly. Expected outcomes should not always be “successful execution”: for an unauthorized request, correctly refusing is success; for a request lacking critical evidence, proactively stopping is also success.
Metrics need explicit denominators and judgment criteria. End-to-end task success rate can be computed as accepted tasks divided by total tasks included in the statistics; for execution-type tasks, verify actual business state rather than having reviewers read only the final reply. Parameter accuracy should cover target object, scope, and values—parseable format is not the same as semantic correctness. Unauthorized-action blocking rate should use predefined unauthorized attempts as the denominator, while also monitoring false blocking of legitimate requests. Latency should be reported with both median and high-percentile values, so fast simple requests don’t mask long waits on complex tasks. Cost should be calculated per successful task, including failed attempts, retries, tool calls, and multimodal processing overhead.
When comparing candidates, first fix the tool implementations, material versions, permission scope, task samples, and runtime budget, then compare model differences. If a solution later changes its prompts, tool design, or confirmation mechanism, record those changes separately. Repeat tests on key scenarios multiple times and save desensitized step logs to distinguish stable defects from occasional fluctuations. Otherwise, a perfect trajectory in one demo can easily be misread as the system’s general capability.
4. Assign Models and Processes by Task Risk
Not every step needs the strongest reasoning model. Format conversion, field validation, and fixed-condition checks should go to deterministic programs first. Common tasks with clear goals and sufficient evidence can be handled by lower-latency solutions. When a request involves multiple constraints, conflicting information, or requires synthesizing across materials, consider a stronger model or route it to human review. Whether the routing strategy works should be judged by whether errors, wait times, and overall cost improve together—not by comparing per-call price alone.
Longer context is not always better. A more practical approach is to provide, per task stage, only the required rules, relevant evidence, and latest state, avoiding continuously concatenating full conversation history, irrelevant material, and duplicate tool results. Historical summaries can help continue conversations, but important decisions should still reference the original records, and permissions and current business state should be re-read. For example, a previous conversation mentioning that a document was “pending review” does not prove it remains in that state before the current operation.
External documents, screenshots, and tool responses should all be treated as business data, not as new authorization instructions. Even if a piece of material instructs the application to skip approval, tool permissions must not change accordingly. Restricting callable tools, validating key parameters, isolating untrusted content, and keeping human confirmation in the loop constrain actual outcomes far more effectively than simply asking the model “not to make mistakes.”
5. Start with Read-Only Pilots, and Iterate on Failure Records
Deployment can proceed in three phases: first launch read-only tasks such as queries, summaries, and assisted analysis to validate evidence citation, clarification behavior, and permission isolation; then introduce operations that are previewable, reversible, or limited in impact; finally open up high-impact workflows that are approval-gated and equipped with auditing and emergency shutdown mechanisms. Each phase should define expansion criteria in advance—key tasks passing acceptance, duplicate submissions under control, anomalies detected promptly—and the team should have a clear takeover plan.
Post-launch logs should at minimum connect the user request, task state, model version, tool call results, and final business outcome, with sensitive fields desensitized and log access restricted. During retrospectives, first identify which layer the error occurred in: intent misunderstanding calls for improved clarification strategies, parameter mapping errors call for tighter tool constraints, and backend state desynchronization calls for fixing the business interface. Blaming everything on the model often misses more direct fixes.
For agent model selection, the most convincing result is not how many steps a model completed in a demo, but whether the system still delivers verifiable results when facing a different batch of tasks, a timeout, or ambiguous material—and honestly stops when it cannot confirm. Model capability determines which tasks the system can handle; application architecture determines whether those tasks can be delivered reliably.
