technology-selection
Fungsinya
Skill ini membantu memilih dan menerapkan teknologi AI atau machine learning yang tepat untuk aplikasi .NET 8 ke atas, seperti ML.NET, Microsoft.Extensions.AI, atau ONNX Runtime. Skill ini untuk pengembang .NET yang menambahkan fitur AI dan menginginkan alat yang tepat untuk tugasnya.
Kapan dipakai
- โSaat Anda ingin menambahkan klasifikasi, regresi, atau rekomendasi ke aplikasi .NET.
- โSaat Anda ingin menambahkan fitur model bahasa atau agen AI ke aplikasi .NET.
- โSaat Anda ingin membandingkan opsi AI sebelum menulis kode apa pun.
Link skill
https://github.com/dotnet/skills/blob/main/plugins/dotnet-ai/skills/technology-selection/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya ingin menambahkan rekomendasi produk ke aplikasi .NET saya. Teknologi apa yang sebaiknya dipakai dan mengapa?โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengelompokkan tugas ke dalam kategori, misalnya data terstruktur, model bahasa, atau pekerjaan agentik, lalu merekomendasikan satu teknologi dan hanya membangun apa yang diminta tugas.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah akan menulis kode tanpa diminta?
Tidak. Jika Anda meminta rencana atau perbandingan, skill memberikan itu dan tidak membangun kode.
Alat apa saja yang dicakup?
ML.NET, Microsoft.Extensions.AI, Microsoft Agent Framework, ONNX Runtime, Ollama, dan GitHub Copilot SDK.
Apakah bisa untuk model lokal?
Bisa. Inferensi model lokal atau luring adalah salah satu opsi yang dicakup.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14558
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
create-custom-agent
5.8kMembantu agent Anda membuat file agen kustom VS Code dengan alatnya sendiri, instruksi, dan serah terima ke agent lain.
create-skill
5.8kMembantu agent Anda membuat skill agent baru dengan nama yang valid, deskripsi pemicu yang jelas, dan file SKILL.md yang mengikuti standar.
csharp-scripts
5.8kMembantu agent Anda menjalankan program C# kecil sebagai satu file dengan alat baris perintah .NET, tanpa membuat proyek lengkap.
dotnet-pinvoke
5.8kMembantu agent Anda memanggil pustaka native C atau C++ dari .NET dengan benar, mencakup tanda tangan, penanganan string, memori, dan safe handle.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.