Build custom AI models
Pick the least custom option that meets quality: prebuilt Foundry Tools, fine-tuning foundation models in Microsoft Foundry, or full custom training with Azure Machine Learning or Azure Databricks on GPU infrastructure.
The problem
Off-the-shelf models may miss domain language, required output formats or specific prediction tasks such as forecasting and defect detection. Teams then jump to training their own model, which takes data, skills, GPUs and an operations process for versions, deployment and monitoring.
Often a prebuilt service, better prompts or retrieval would have closed the gap at a fraction of the effort.1
The approach
Microsoft's architecture guide suggests working down a ladder:
- Prebuilt APIs: Foundry Tools (Speech, Translator, Language, Content Understanding, Document Intelligence, Vision and others). Several support customization, such as custom neural and template models and classifiers in Document Intelligence.
- Fine-tuning foundation models: Microsoft Foundry offers managed fine-tuning (generally available) with supervised fine-tuning, direct preference optimization and reinforcement fine-tuning, on Foundry-managed infrastructure. Microsoft notes fine-tuning does not replace retrieval for current information and that benefits are not guaranteed. Training types differ in data residency: the developer tier has no data residency guarantees, and data zone training currently supports only the US data zone.
- Custom training and MLOps: Azure Machine Learning for classical and deep learning, experiment tracking, pipelines, CI/CD and managed online and batch endpoints. Azure Databricks for lakehouse-scale Spark training with MLflow and Unity Catalog.
- Infrastructure: Azure GPU virtual machines, with the ND family aimed at deep learning training and inference and the NC family at training and HPC.
Evaluate at every step with Foundry evaluators for quality and safety, and use the AI red teaming agent before release. Note that prompt flow in Foundry and Azure Machine Learning retires on 20 April 2027, with Microsoft Agent Framework as the migration target.
When a simpler route is enough: prompt engineering plus retrieval often meets the need without changing model weights.1234567
Conceptual architecture
Diagram as a list
Copilot & business apps
- Applications and agentsUse the model in business workflows
AI models & platform
- Foundry Tools (prebuilt and customizable APIs)First option before custom modelsConnects to Applications and agents
- Microsoft Foundry fine-tuning (SFT, DPO, RFT)Adapts foundation model weights to a taskConnects to Managed endpoints and deployments
Data & analytics
- Training data in OneLake, lakehouse or storageLabeled examples and features
- Azure DatabricksSpark-scale training with MLflow and Unity CatalogConnects to Managed endpoints and deployments
Developer tools
- Azure Machine LearningCustom training, pipelines, registry and MLOpsConnects to Managed endpoints and deployments
Security, identity & governance
- Foundry evaluations and red teamingQuality and safety checks before and after releaseConnects to Managed endpoints and deployments
Cloud & hybrid infrastructure
- Azure GPU virtual machines (ND, NC)Compute for training and inference
- Managed endpoints and deploymentsServe models to applicationsConnects to Applications and agents
Technologies and their roles
Foundry Tools1
Prebuilt and customizable AI services
Microsoft suggests these before building a custom model.
Microsoft Foundry1
Fine-tuning and evaluation
Managed fine-tuning plus evaluators, guardrails and observability for generative models.
Azure Machine Learning5
Custom training and MLOps
Training, pipelines, MLflow, CI/CD and managed endpoints for classical and deep learning.
Azure Databricks1
Lakehouse-scale machine learning
Spark training with MLflow and Unity Catalog governance.
Azure GPU virtual machines6
Training and inference compute
ND and NC families target deep learning, training and HPC.
What you need first4
- A baseline using prompts and retrieval, so gains from customization can be measured
- Enough high-quality, rights-cleared training data for the chosen method
- An evaluation set and agreed quality and safety thresholds
- Data residency requirements checked against the training type
- An owner for model versions, monitoring and retirement
Risks and how to reduce them
- Fine-tuning used to supply facts that change4
- Use retrieval for current information; Microsoft says fine-tuning does not replace it.
- Training data leaves the required region4
- Pick a training type that matches residency needs; the developer tier has no residency guarantees.
- Model quality or safety regresses after retraining7
- Run evaluators and red teaming before each release and continuous evaluation in production.
- Dependence on retiring tooling5
- Plan to move prompt flow assets before 20 April 2027.
Related
Sources
- AI and machine learning products (Azure Architecture Center) (opens in a new tab)
- What are Foundry Tools? (opens in a new tab)
- Azure Document Intelligence overview (opens in a new tab)
- Fine-tuning in Microsoft Foundry (opens in a new tab)
- What is Azure Machine Learning? (opens in a new tab)
- Virtual machine sizes overview (opens in a new tab)
- Observability in generative AI (opens in a new tab)
Thank you. Your correction was sent.
The editors check it against the sources. If you left an email address, they may reply about it.