Code Velocity
Mjetet e Zhvilluesit

SageMaker AI: Përshpejtimi i Thirrjes së Mjeteve Agjentike me Personalizim pa Server

·5 min lexim·AWS·Burimi origjinal
Ndaj
Ndërfaqja e Amazon SageMaker AI Studio që tregon opsionet për personalizimin e modelit pa server dhe thirrjen agjentike të mjeteve.
{
  "prompt": [
    {"role": "system", "content": "Ti je një asistent i dobishëm. Kur përdor mjete, përgjigju me: [...]"},
    {"role": "user", "content": "Merr motin"}
  ],
  "reward_model": {
    "ground_truth": "Për t'ju dhënë informacionin e motit, a mund të specifikoni vendndodhjen?"
  }
}

Rregullimi i Imët i Qwen 2.5 7B Instruct me SageMaker AI

Procesi i rregullimit të imët të një modeli si Qwen 2.5 7B Instruct brenda Amazon SageMaker AI Studio është i thjeshtuar dhe intuitiv. Pasi të sigurohet që parakushtet e nevojshme (llogaria AWS, roli IAM, domeni SageMaker AI, depozita S3) janë plotësuar, përdoruesit mund të shkojnë te seksioni Modelet në SageMaker AI Studio.

Prej aty, zgjedhja e Qwen 2.5 7B Instruct dhe zgjedhja e Personalizo me UI hap një faqe dedikuar konfigurimi. Kjo ndërfaqe lejon:

  • Zgjedhja e Teknikës: Zgjedhja shprehimisht e Mësimit me Përforcim me Shpërblime të Verifikueshme (RLVR) nga menyja rënëse.
  • Hyrja e të Dhënave: Drejtimi te të dhënat e përgatitura të trajnimit të ruajtura në një depozitë Amazon S3.
  • Funksioni i Shpërblimit: Konfigurimi i mekanizmit të vlerësimit me nivele që përcakton se si vlerësohen përgjigjet kandidate ndaj ground_truth.
  • Konfigurimi i Hiperparametrave: Rregullimi i parametrave si madhësia e grupit, ndonëse SageMaker AI shpesh trajton automatikisht cilësimet optimale.

SageMaker AI mbështet një gamë të gjerë familjesh modelesh, duke përfshirë Amazon Nova, GPT-OSS, Llama, Qwen, dhe DeepSeek, së bashku me teknika të ndryshme si Rregullimi i Imët i Mbikëqyrur (SFT), Optimizimi i Preferencave Direkte (DPO), RLVR dhe Mësimi me Përforcim nga Reagimet e AI (RLAIF). Gjurmimi i integruar i MLflow ofron shikueshmëri në metrikën e trajnimit dhe vlefshmërisë, duke thjeshtuar monitorimin e performancës dhe përsëritjen. Kjo lehtësi përdorimi përshpejton në mënyrë dramatike ciklin e zhvillimit për zhvilluesit që ndërtojnë github-agentic-workflows të sofistikuara.

Vlerësimi dhe Suksesi i Vendosjes

Efikasiteti i modelit tonë Qwen 2.5 7B Instruct të rregulluar imët u vlerësua në mënyrë rigoroze mbi të dhëna të mbajtura jashtë, duke përfshirë skenarë me mjete tërësisht të panjohura – një test thelbësor për përgjithësim. Rezultatet ishin bindëse: modeli i rregulluar imët arriti një përmirësim të jashtëzakonshëm prej 57% në shpërblimin e thirrjes së mjeteve krahasuar me modelin bazë. Ky kërcim i rëndësishëm në performancë në skenarë që nuk i kishte hasur gjatë trajnimit thekson fuqinë e RLVR në mësimin e modeleve aftësitë e vendimmarrjes së fortë për ndërveprimin me mjetet.

Kjo besueshmëri e përmirësuar përkthehet drejtpërdrejt në besim dhe siguri më të lartë në vendosjen e agjentëve të AI në mjedise prodhimi. Duke minimizuar rastet e halucinacioneve të mjeteve, parametrat e pasaktë dhe veprimet e papërshtatshme, bizneset mund të shfrytëzojnë agjentët e AI për detyra më kritike dhe të ndjeshme. Me SageMaker AI që trajton kompleksitetet e vendosjes së modelit dhe menaxhimit të infrastrukturës, zhvilluesit mund të kalojnë pa probleme nga rregullimi i imët në prodhim, duke realizuar potencialin e plotë të zgjidhjeve të tyre të AI agjentike. Kjo aftësi përputhet me vizionin më të gjerë të operationalizimit të AI agjentike për ndikim në botën reale.

Në përmbledhje, kombinimi i personalizimit të modelit pa server të Amazon SageMaker AI dhe aftësive të forta të mësimit të RLVR ofron një rrugë të fuqishme për ndërtimin e sistemeve të thirrjes agjentike të mjeteve shumë të besueshme. Kjo qasje inovative përshpejton zhvillimin, redukton barrën operacionale dhe në fund të fundit ofron agjentë të AI që performojnë me saktësi dhe besueshmëri të pashembullt.

Pyetjet e bëra shpesh

What is agentic tool calling and why is it crucial for AI agents?
Agentic tool calling is the mechanism that empowers AI agents to perform real-world actions like querying databases, initiating workflows, fetching real-time information, and executing tasks on a user's behalf. It's crucial because it bridges the gap between language understanding and practical application, allowing AI agents to move beyond just generating text to actually interacting with external systems and data sources, thereby making them genuinely useful in production environments.
What are the common challenges AI agents face when performing tool calls?
AI agents frequently encounter challenges such as hallucinating tools that don't exist, passing incorrect parameters to valid tools, or attempting actions when they should instead seek clarification from the user. These failures lead to unreliable agent behavior, eroding user trust and posing significant hurdles to the successful deployment of AI agents in critical production systems, ultimately limiting their real-world utility.
How does Amazon SageMaker AI address the challenges of agentic tool calling?
Amazon SageMaker AI addresses these challenges through its serverless model customization capabilities, particularly using Reinforcement Learning with Verifiable Rewards (RLVR). This approach allows developers to fine-tune large language models (LLMs) to improve their tool-calling accuracy without managing complex infrastructure. SageMaker AI handles the operational overhead of GPU provisioning, memory management, and reward infrastructure, letting users focus on data, reward functions, and model behavior.
What is Reinforcement Learning with Verifiable Rewards (RLVR) and how does it work?
RLVR is a powerful fine-tuning technique where the model generates multiple candidate responses for a given prompt. A predefined reward function then evaluates these candidates, providing a signal about their quality and correctness. The model subsequently updates its internal policy to favor responses that received higher reward scores, using methods like Group Relative Policy Optimization (GRPO), thereby iteratively learning to produce more accurate and desired outputs for specific tasks like tool calling.
Why is RLVR considered more effective than Supervised Fine-Tuning (SFT) for tool calling tasks?
While SFT requires meticulously labeled examples for every desired behavior (e.g., calling a tool, clarifying, refusing), RLVR operates differently. SFT can struggle to generalize decision-making between these behaviors. RLVR, by contrast, allows the model to learn the optimal decision boundary by generating multiple candidates and receiving immediate feedback via a reward function, enabling it to better understand *when* to execute a tool call versus *when* to ask for more information or refuse a request.
How is training data prepared for RLVR in Amazon SageMaker AI for agentic tool calling?
Training data for RLVR in SageMaker AI is prepared as JSONL files, where each entry contains a prompt (system and user messages) and a `ground_truth` within a `reward_model` field. This `ground_truth` is what the reward function scores against. To ensure robust agent behavior, datasets are typically designed to cover three distinct scenarios: executing a tool call when all parameters are present, clarifying when information is missing, and refusing requests that are out of scope or harmful. Synthetic data generation tools like Kiro can be used for this purpose.
What agent behaviors are critical for building robust and reliable tool-calling AI agents?
Building robust tool-calling AI agents requires them to master three critical behaviors. First, they must `Execute` a tool call accurately when all necessary information is provided by the user. Second, they need to `Clarify` by asking follow-up questions when essential parameters are missing from a user's request. Third, they must `Refuse` gracefully when a request is out of scope, harmful, or cannot be fulfilled. Training models across these behaviors ensures comprehensive and trustworthy agent performance.
What prerequisites are needed to use serverless model customization in SageMaker AI?
To leverage serverless model customization in Amazon SageMaker AI, users must have an active AWS account, an AWS IAM role configured with the necessary permissions for SageMaker, a SageMaker AI domain providing Studio access for development, and an Amazon Simple Storage Service (Amazon S3) bucket to store training data and model outputs securely. These components ensure a secure and functional environment for fine-tuning models.

Qëndroni të përditësuar

Merrni lajmet më të fundit të AI në email.

Ndaj