technology-selection
यह क्या करती है
यह स्किल .NET 8+ ऐप के लिए सही AI या machine learning तकनीक चुनने और लागू करने में मदद करती है, जैसे ML.NET, Microsoft.Extensions.AI या ONNX Runtime। यह AI सुविधाएँ जोड़ने वाले उन .NET डेवलपर के लिए है जिन्हें काम के लिए सही टूल चाहिए।
कब इस्तेमाल करें
- ✓जब आप .NET ऐप में classification, regression या सिफ़ारिशें जोड़ना चाहें।
- ✓जब आप .NET ऐप में language model सुविधा या AI agent जोड़ना चाहें।
- ✓जब आप कोई code लिखने से पहले AI विकल्पों की तुलना करना चाहें।
Skill का लिंक
https://github.com/dotnet/skills/blob/main/plugins/dotnet-ai/skills/technology-selection/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपने .NET ऐप में उत्पाद सिफ़ारिशें जोड़ना चाहता हूँ। मुझे कौन सी तकनीक इस्तेमाल करनी चाहिए और क्यों?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट काम को एक श्रेणी में रखता है, जैसे संरचित डेटा, language model या agentic काम, फिर एक तकनीक सुझाता है और वही बनाता है जो काम माँगता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
.NET AI and Machine Learning
Pick the right technology first, then deliver only what the task asks for. If the task asks for a plan, comparison, or architecture (or says "do not write code"), produce that — do not scaffold, build, or run code unprompted.
Step 1: Classify the task (decision tree)
State which branch applies and why, then choose that technology.
| Task type | Technology | Why |
|---|---|---|
| Structured/tabular: classification, regression, clustering, anomaly detection, recommendation | ML.NET (Microsoft.ML) |
Deterministic (fixed seed), no cloud dependency, purpose-built |
| NL understanding, generation, summarization, reasoning (single prompt → response, no tools) | LLM via Microsoft.Extensions.AI (IChatClient) |
Language capability, no orchestration needed |
| Agentic: multi-step tool/function calling, agent loops, multi-agent | Microsoft Agent Framework (Microsoft.Agents.AI) on Microsoft.Extensions.AI |
Needs orchestration, tool dispatch, iteration control IChatClient lacks |
| GitHub Copilot extensions / custom dev-workflow agents | GitHub Copilot SDK (GitHub.Copilot.SDK) |
Integrates with the Copilot agent runtime |
| Run a pre-trained/custom model in production | ONNX Runtime (Microsoft.ML.OnnxRuntime) |
Hardware-accelerated, format-agnostic inference |
| Local/offline LLM inference | OllamaSharp (Ollama models) | Privacy-sensitive, air-gapped, cost-constrained |
| Semantic search, RAG, embedding storage | Microsoft.Extensions.VectorData.Abstractions (MEVD) + a provider (Azure AI Search, Milvus, MongoDB, pgvector, Pinecone, Qdrant, Redis, SQL) | Provider-agnostic vector search |
| Ingest, chunk, load documents into a vector store | Microsoft.Extensions.AI.DataIngestion (preview) + MEVD | Parses, chunks, embeds, upserts |
| Both structured predictions AND NL reasoning | Hybrid: ML.NET scoring + LLM reasoning layer | ML.NET is reproducible; LLM adds explanation |
Critical rule: Do NOT use an LLM for tasks ML.NET handles well (tabular classification, regression, clustering) — LLMs are slower, costlier, and non-deterministic for these.
Step 1b: Pick the library layer
| Layer | Library | Use when |
|---|---|---|
| Abstraction | Microsoft.Extensions.AI (MEAI) |
Always the foundation. Use IChatClient directly for prompt-response and simple, bounded function invocation. |
| Provider SDK | Azure.AI.OpenAI / OpenAI / Azure.AI.Inference / OllamaSharp |
Concrete provider behind MEAI via AddChatClient. |
| Orchestration | Microsoft.Agents.AI (prerelease) |
Multi-step tool use, durable agent loops, and multi-agent workflows. |
| Copilot | GitHub.Copilot.SDK |
Building Copilot-platform extensions only. |
Rules: start with MEAI; put the provider behind it via AddChatClient (don't call the provider in
business logic); use Microsoft.Agents.AI for multi-step or durable agent workflows rather than
hand-rolling an agent loop; never mix a raw HttpClient-to-OpenAI call with MEAI in the same
workflow. Do not use Accord.NET (archived). For new projects, prefer MEAI and Agent Framework
unless existing Semantic Kernel features or investments are a requirement. Register AI/ML services
via DI; load secrets from user-secrets / env / Key Vault — never hardcode keys.
Step 2: Cover the branch essentials, then decide depth
Every answer — plan or implementation — must address the guardrails for the selected branch:
- ML.NET —
new MLContext(seed: …)(reproducible);TrainTestSplit+ evaluate on the held-out set; report real metrics (MicroAccuracy/MacroAccuracy/LogLoss, AUC/F1, or RMSE/R²); serve withPredictionEnginePool<TIn,TOut>(never a singletonPredictionEngine). - LLM (MEAI) — depend on
IChatClientregistered viaAddChatClient(provider behind it); setTemperatureandMaxOutputTokensinChatOptions; add retry/timeout (RetryingChatClient/Polly); pin a dated model; load keys from user-secrets / env / Key Vault — never hardcode ansk-…key; validate non-deterministic output against a schema with a fallback. - Agentic (Agent Framework) — orchestrate with
Microsoft.Agents.AIonIChatClient(never a hand-rolled loop); setMaximumIterationsand a token/cost ceiling; define each tool with a clear schema (AIFunctionFactory.Create); log each step (never raw sensitive content). - **RAG / e
अक्सर पूछे जाने वाले सवाल
क्या बिना पूछे code लिखेगी?
नहीं। अगर आप योजना या तुलना माँगते हैं, तो वही देती है और code नहीं बनाती।
यह कौन से टूल कवर करती है?
ML.NET, Microsoft.Extensions.AI, Microsoft Agent Framework, ONNX Runtime, Ollama और GitHub Copilot SDK।
क्या यह स्थानीय मॉडलों के लिए काम करती है?
हाँ। स्थानीय या offline मॉडल inference कवर किए गए विकल्पों में से एक है।
जानकारी
लेखक का मूल विवरण
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework (MAF), GitHub Copilot SDK, ONNX Runtime, and OllamaSharp. Covers the full spectrum from classic ML through modern LLM orchestration to local inference. Use when adding classification, regression, clustering, anomaly detection, recommendation, LLM integration (text generation, summarization, reasoning), RAG pipelines with vector search, agentic workflows with tool calling, Copilot extensions, or custom model inference via ONNX Runti
repo: dotnet/skills
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14558
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-custom-agent
5.8kयह आपके एजेंट को VS Code के custom agent फ़ाइलें बनाने देती है, जिनके अपने tools, निर्देश और दूसरे agents को handoffs होते हैं।
create-skill
5.8kयह आपके एजेंट को सही नाम, साफ़ trigger विवरण और मानक के अनुसार SKILL.md फ़ाइल वाली नई agent skill बनाने में मदद करती है।
csharp-scripts
5.8kयह आपके एजेंट को .NET command line टूल से एक छोटा C# प्रोग्राम एकल फ़ाइल के रूप में चलाने देती है, पूरा प्रोजेक्ट बनाए बिना।
dotnet-pinvoke
5.8kयह आपके एजेंट को .NET से native C या C++ libraries सही तरीके से कॉल करने में मदद करती है, जिसमें signatures, string संभालना, memory और सुरक्षित handles शामिल हैं।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।