All skills
microsoft avatar

/microsoft-foundry

@04110d9
by microsoftmicrosoft/skills3.1k stars
351

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, create agent, update agent, add tool to agent, invoke agent, agent.yaml, agent insights, pull agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, prompt optimizer, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure-prepare).

Use this Skill: https://skilld.dev/gh/microsoft/skills/microsoft-foundry

This session only. Nothing lands on disk.

finetuningreferencestraining-types.md

≈791 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Training Types: SFT vs DPO vs RFT

Decision Matrix

Factor SFT DPO RFT
Best for Teaching a new skill or format Aligning preferences/style Improving reasoning chains
Data needed Input–output pairs Chosen/rejected pairs Prompts + grading function
Data volume 50–5,000 examples 500–5,000 pairs 200–2,000 prompts
Effort to prepare data Low High (need contrasting pairs) Medium (need grader, not outputs)
Risk of regression Low Medium High (sensitive to grader quality)
Typical improvement 5–30% on task metrics Subtle style/safety shifts 0–15% on reasoning tasks
Supported models Most models Select models o4-mini

When to Use Each

SFT (Supervised Fine-Tuning)

  • You have high-quality input–output pairs
  • Task is well-defined (code generation, classification, extraction, summarization)
  • You want reliable, repeatable outputs in a specific format or style
  • Key insight: 300–500 high-quality examples often outperforms 1,500+ lower-quality ones

DPO (Direct Preference Optimization)

  • You want to adjust tone, verbosity, safety, or style
  • You have examples of "good" and "bad" outputs for the same input
  • SFT already works but outputs need refinement
  • DPO-specific params: beta (default 0.1), l2_multiplier (default 0.1)

RFT (Reinforcement Fine-Tuning)

  • Task has objectively verifiable answers (code execution, math, logic)
  • You can write a programmatic or LLM-based grader
  • You want to improve the model's reasoning, not just its outputs
  • Critical: RFT is extremely sensitive to grader quality. Train–val gap should be ≤ 0.05.

Choosing a Path

├─ Do you have labeled input–output pairs?
│  ├─ Yes → SFT
│  └─ No
│     ├─ Can you write a grading function? → RFT
│     └─ Can you rank "good" vs "bad" outputs? → DPO
│
After SFT:
├─ Results good enough? → Ship it
├─ Need style refinement? → DPO on top of SFT model
└─ Reasoning needs improvement? → RFT (if model supports it)

Model Compatibility (Microsoft Foundry)

Model SFT DPO RFT Vision FT
gpt-4.1 ✅ ✅ ❌ ✅
gpt-4.1-mini ✅ ❌ ❌ ❌
gpt-4.1-nano ✅ ❌ ❌ ❌
gpt-4o (2024-08-06) ✅ ✅ ❌ ✅
gpt-4o-mini ✅ ❌ ❌ ❌
o4-mini ❌ ❌ ✅ ❌
gpt-5 ❌ ❌ ✅ ⚠️ ❌
gpt-oss-20b ✅ ❌ ❌ ❌
Ministral-3B ✅ ❌ ❌ ❌
Llama-3.3-70B ✅ ❌ ❌ ❌
Qwen-3-32B ✅ ❌ ❌ ❌

DPO can be applied on top of an already SFT-fine-tuned model. Vision fine-tuning follows the same SFT workflow but with image data in messages.

⚠️ Feature flags: GPT-5 RFT and agentic RFT with tool calling require access requests. Contact your Microsoft account team or request access through the Microsoft Foundry portal. o4-mini RFT without tools is generally available.

Check Microsoft Foundry docs for the latest model availability.

Source: SKILL.md on GitHub

2 warnings3d4 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill provides a comprehensive environment for managing the end-to-end lifecycle of AI agents, models, and infrastructure on Microsoft Foundry. It includes sub-skills for deployment, evaluation, fine-tuning, and troubleshooting. The skill utilizes dynamic code execution and shell command wrappers, which are used within the context of local development and cloud orchestration. All external resources and dependencies originate from trusted organizations and well-known services.

  • Socket3d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk3d

    Risk: LOW · No issues

  • Runlayer7mo

    36/36 files flagged

Signed by skilld at 04110d9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Activeupdated last week
metadata
{
  "author": "Microsoft",
  "version": "1.2.26"
}

README badge

README badge for microsoft/skills/microsoft-foundry