Code Velocity
डेवलपर उपकरण

SageMaker AI: सर्वरलेस कस्टमाइज़ेशन के साथ एजेंटिक टूल कॉलिंग को तेज़ करना

·5 मिनट पढ़ें·AWS·मूल स्रोत
शेयर करें
Amazon SageMaker AI स्टूडियो इंटरफ़ेस जो सर्वरलेस मॉडल कस्टमाइज़ेशन और एजेंटिक टूल कॉलिंग के विकल्पों को दिखाता है।
{
  "prompt": [
    {"role": "system", "content": "आप एक सहायक सहायक हैं। टूल का उपयोग करते समय, इस प्रकार प्रतिक्रिया दें: [...]"},
    {"role": "user", "content": "मौसम प्राप्त करें"}
  ],
  "reward_model": {
    "ground_truth": "मौसम की जानकारी प्रदान करने के लिए, क्या आप कृपया स्थान निर्दिष्ट कर सकते हैं?"
  }
}

SageMaker AI के साथ Qwen 2.5 7B इंस्ट्रक्ट को फाइन-ट्यून करना

Amazon SageMaker AI स्टूडियो के भीतर Qwen 2.5 7B इंस्ट्रक्ट जैसे मॉडल को फाइन-ट्यून करने की प्रक्रिया सुव्यवस्थित और सहज है। आवश्यक पूर्वापेक्षाओं (AWS खाता, IAM भूमिका, SageMaker AI डोमेन, S3 बकेट) को पूरा करने के बाद, उपयोगकर्ता SageMaker AI स्टूडियो में मॉडल अनुभाग पर नेविगेट कर सकते हैं।

वहां से, Qwen 2.5 7B इंस्ट्रक्ट का चयन करना और UI के साथ कस्टमाइज़ करें चुनना एक समर्पित कॉन्फ़िगरेशन पेज खोलता है। यह इंटरफ़ेस इसकी अनुमति देता है:
* तकनीक चयन: ड्रॉपडाउन से वेरिफ़िएबल रिवॉर्ड्स (RLVR) के साथ रीइन्फोर्समेंट लर्निंग को स्पष्ट रूप से चुनना।
* डेटा इनपुट: Amazon S3 बकेट में संग्रहीत तैयार प्रशिक्षण डेटा को इंगित करना।
* रिवॉर्ड फ़ंक्शन: टियरर्ड स्कोरिंग तंत्र को कॉन्फ़िगर करना जो परिभाषित करता है कि उम्मीदवार प्रतिक्रियाओं का ground_truth के विरुद्ध कैसे मूल्यांकन किया जाता है।
* हाइपरपैरामीटर कॉन्फ़िगरेशन: बैच आकार जैसे मापदंडों को समायोजित करना, हालांकि SageMaker AI अक्सर इष्टतम सेटिंग्स को स्वचालित रूप से संभालता है।

SageMaker AI विभिन्न प्रकार के मॉडल परिवारों का समर्थन करता है, जिसमें Amazon Nova, GPT-OSS, Llama, Qwen, और DeepSeek शामिल हैं, साथ ही सुपरवाइज़्ड फाइन-ट्यूनिंग (SFT), डायरेक्ट प्रेफरेंस ऑप्टिमाइज़ेशन (DPO), RLVR, और AI फीडबैक से रीइन्फोर्समेंट लर्निंग (RLAIF) जैसी विभिन्न तकनीकें भी शामिल हैं। एकीकृत MLflow ट्रैकिंग प्रशिक्षण और सत्यापन मेट्रिक्स में दृश्यता प्रदान करती है, प्रदर्शन निगरानी और पुनरावृति को सरल बनाती है। उपयोग में यह आसानी परिष्कृत github-agentic-workflows बनाने वाले डेवलपर्स के लिए विकास जीवनचक्र को नाटकीय रूप से तेज़ करती है।

मूल्यांकन और परिनियोजन सफलता

हमारे फाइन-ट्यून किए गए Qwen 2.5 7B इंस्ट्रक्ट मॉडल की प्रभावकारिता का पूरी तरह से अनदेखे टूल वाले परिदृश्यों सहित, रोके गए डेटा पर कठोरता से मूल्यांकन किया गया था - सामान्यीकरण के लिए एक महत्वपूर्ण परीक्षण। परिणाम प्रभावशाली थे: फाइन-ट्यून किए गए मॉडल ने आधार मॉडल की तुलना में टूल कॉल रिवॉर्ड में उल्लेखनीय 57% सुधार हासिल किया। प्रशिक्षण के दौरान जिन परिदृश्यों का सामना नहीं हुआ था, उन पर प्रदर्शन में यह महत्वपूर्ण उछाल टूल इंटरैक्शन के लिए मजबूत निर्णय लेने की क्षमताओं वाले मॉडल को सिखाने में RLVR की शक्ति को रेखांकित करता है।

यह बढ़ी हुई विश्वसनीयता सीधे उत्पादन परिवेश में AI एजेंटों को परिनियोजित करने में उच्च विश्वास और भरोसे में तब्दील होती है। टूल हेलुसिनेशन, गलत पैरामीटर, और अनुचित कार्रवाइयों की घटनाओं को कम करके, व्यवसाय अधिक महत्वपूर्ण और संवेदनशील कार्यों के लिए AI एजेंटों का लाभ उठा सकते हैं। SageMaker AI द्वारा मॉडल परिनियोजन और बुनियादी ढांचा प्रबंधन की जटिलताओं को संभालने के साथ, डेवलपर्स फाइन-ट्यूनिंग से उत्पादन तक निर्बाध रूप से जा सकते हैं, अपने एजेंटिक AI समाधानों की पूरी क्षमता का एहसास कर सकते हैं। यह क्षमता वास्तविक दुनिया के प्रभाव के लिए एजेंटिक AI को परिचालन में लाने के व्यापक दृष्टिकोण के साथ संरेखित होती है।

संक्षेप में, Amazon SageMaker AI के सर्वरलेस मॉडल कस्टमाइज़ेशन और RLVR की मजबूत शिक्षण क्षमताओं का संयोजन अत्यधिक विश्वसनीय एजेंटिक टूल कॉलिंग सिस्टम बनाने के लिए एक शक्तिशाली मार्ग प्रदान करता है। यह अभिनव दृष्टिकोण विकास को गति देता है, परिचालन बोझ को कम करता है, और अंततः AI एजेंटों को प्रदान करता है जो अभूतपूर्व सटीकता और भरोसेमंदता के साथ प्रदर्शन करते हैं।

अक्सर पूछे जाने वाले प्रश्न

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.

अपडेट रहें

नवीनतम AI समाचार अपने इनबॉक्स में पाएं।

शेयर करें