technology-selection
What it does
This skill helps pick and implement the right AI or machine learning technology for a .NET 8+ app, such as ML.NET, Microsoft.Extensions.AI or ONNX Runtime. It is for .NET developers adding AI features who want the right tool for the task.
When to use it
- βWhen you want to add classification, regression or recommendations to a .NET app.
- βWhen you want to add a language model feature or an AI agent to a .NET app.
- βWhen you want to compare AI options before writing any code.
Skill link
https://github.com/dotnet/skills/blob/main/plugins/dotnet-ai/skills/technology-selection/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to add product recommendations to my .NET app. Which technology should I use and why?β
5 new skills a week. 1 minute to read.
How it works
The agent sorts the task into a category, such as structured data, language model or agentic work, then recommends one technology and builds only what the task asks for.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Will it write code without being asked?
No. If you ask for a plan or comparison, it gives that and does not build code.
Which tools does it cover?
ML.NET, Microsoft.Extensions.AI, Microsoft Agent Framework, ONNX Runtime, Ollama and the GitHub Copilot SDK.
Does it work for local models?
Yes. Local or offline model inference is one of the covered options.
Details
Original description by the author
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
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14558
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-custom-agent
5.8kHelps your agent create VS Code custom agent files with their own tools, instructions and handoffs to other agents.
create-skill
5.8kHelps your agent create a new agent skill with a valid name, a clear trigger description and a SKILL.md file that follows the standard.
csharp-scripts
5.8kHelps your agent run a small C# program as a single file with the .NET command line tool, without creating a full project.
dotnet-pinvoke
5.8kHelps your agent call native C or C++ libraries from .NET correctly, covering signatures, string handling, memory and safe handles.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.