ما الذي يتيحه Sampling؟
اسمحوا للخادم بتفويض الاستدلال إلى النموذج.
ما الذي يتيحه Sampling؟ درس مجاني في MCP Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MCP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MCP Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Flipping the Direction
Usually the model calls your tools. Sampling flips that: your server asks the model to generate text for it. 🔄
Borrow the Model You Already Have
With sampling, your server can use the host’s LLM without ever holding an API key. The client owns the model access.
No API Keys in Your Server
Because the client runs the completion, your server needs no provider credentials. That keeps secrets out of your code entirely.
Agentic Behavior, Nested
Sampling lets an LLM call happen nested inside a tool. Your tool can think with the model mid-task, not just return data.
A Tiny Example: Summarize
Imagine a tool that fetches a report, then asks the model to summarize it. The summarizing happens through sampling.
You Stay in Control of Cost
The client picks the model and pays for it, so the host decides cost, limits, and which model runs your request.
Server Delegates Reasoning
Think of sampling as the server saying: I have data, you have a brain. It delegates the reasoning step back to the model.
What You Can Ask For
A sampling request can ask the model for text, and clients may also support image or audio content in messages.
It Is Opt-In on the Client
Sampling only works if the client declares the sampling capability at startup. Not every host enables it.
"capabilities": {
"sampling": {}
}Why It Matters
Sampling unlocks smart, self-contained servers: data tools that can reason, classify, and write — powered by the user’s own model.
The Catch: Trust
Because servers can trigger model calls, there must be a human able to approve them. You’ll see that safety flow soon.
Quick Check
Quick gut check on what sampling really does.
Recap
Sampling flips control: your server asks the host’s model to think for it — no keys, opt-in, and always with a human able to approve. ✅
الأسئلة الشائعة
هل درس «ما الذي يتيحه Sampling؟» مجاني؟
نعم — نص درس «ما الذي يتيحه Sampling؟» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MCP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MCP Academy 4 دروس في المجموع.
ماذا ستتعلم في «ما الذي يتيحه Sampling؟»؟
اسمحوا للخادم بتفويض الاستدلال إلى النموذج. تتمرن على MCP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MCP Academy؟
لا تُشترط خبرة سابقة. MCP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «ما الذي يتيحه Sampling؟»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MCP Academy هذا؟
نعم. كل درس في MCP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- ما الذي يتيحه Sampling؟
- طلب إكمال من المضيف
- تشكيل الرسائل والتفضيلات
- الموافقة بمشاركة الإنسان