Azure AI Fundamentals
A tour of how Azure packages machine learning, prebuilt AI services and generative AI, and how to build them responsibly. It covers the concepts you need before picking a service.
Machine learning basics
Machine learning (ML) means learning a function from data instead of coding rules by hand. You feed examples to an algorithm, it produces a model, and you use the model to make predictions on new data. Everything else in this guide builds on a handful of terms.
- Features are the input columns; the label is the value you want to predict.
- Training data fits the model; validation or test data is held back to measure how well it generalises.
- Inference is using a trained model to score new data.
Types of ML
| Type | Goal | Example |
|---|---|---|
| Regression | Predict a number | House price, delivery time |
| Classification | Predict a category (binary or multiclass) | Spam or not spam, product type |
| Clustering | Group unlabelled data (unsupervised) | Customer segments |
Regression and classification are supervised: the training data includes the right answers. Clustering is unsupervised: there are no labels. Deep learning uses multi-layer neural networks and is the basis for modern vision and language models.
Evaluating models
Regression is judged by error measures such as mean absolute error or root mean squared error. Classification is judged with a confusion matrix and the metrics derived from it: accuracy, precision (how many predicted positives were right), recall (how many real positives were found) and F1. Accuracy alone misleads on imbalanced data, so check precision and recall too. During training a loss function measures how wrong predictions are, and the optimiser adjusts weights to reduce it.
Azure Machine Learning
Azure Machine Learning is the platform for training, tracking, deploying and managing your own models. Its main building blocks are:
- Workspace: the top-level resource that holds everything else.
- Compute: compute instances for development, compute clusters that scale for training jobs.
- Data assets and datastores: versioned references to your data.
- Jobs and experiments: tracked training runs with logged metrics.
- Models and endpoints: registered models served through real-time or batch endpoints.
- Pipelines: repeatable multi-step workflows.
Automated ML tries many algorithms and settings and ranks the results, which is a fast baseline when you know the task type. The designer offers a drag-and-drop canvas, and the SDK and CLI cover code-first work. Use the platform when you need custom models; prefer prebuilt services when a common task is all you need.
AI services for vision
Azure AI services are prebuilt models exposed as REST APIs and SDKs, so there is no training step for common tasks. The vision service covers:
- Image analysis: captions, tags, object detection and people detection.
- OCR: reading printed and handwritten text from images.
- Face detection: locating faces and returning a limited set of attributes; access to identity-related face features is restricted and gated by responsible AI policy.
- Custom vision models: when the prebuilt labels do not fit, train image classification or object detection on your own labelled images.
Classification answers "what is in this image", detection answers "what and where" by returning bounding boxes.
AI services for language and speech
Natural language processing (NLP) turns text and audio into structured data.
- Language service: sentiment analysis, key phrase extraction, entity recognition, language detection, summarisation, question answering and conversational language understanding (intents and entities).
- Speech service: speech-to-text, text-to-speech and speech translation.
- Translator: text translation across many languages.
A typical bot combines them: speech-to-text feeds a language model that extracts an intent, the application acts, and text-to-speech answers.
Document and knowledge mining
Document Intelligence goes beyond OCR by extracting structure: key-value pairs, tables and fields from invoices, receipts, IDs and forms, using prebuilt or custom models.
Knowledge mining makes large piles of unstructured content searchable. Azure AI Search builds an index through an ingestion pipeline: a data source, an indexer, optional skills that enrich content (OCR, entity extraction, translation) and finally a searchable index. It also supports vector and hybrid search, which matters for the retrieval step in generative AI.
Generative AI and Microsoft Foundry
Modern language models are built on the transformer architecture. Text is split into tokens, tokens become embeddings (vectors where similar meanings sit close together), and attention lets the model weigh which other tokens matter for each position. Language models predict the next token, which is enough to produce text, code and summaries.
Using language models well
- Prompt design: give a clear role, task, context and output format. Few-shot examples help.
- Grounding / RAG: retrieve relevant documents (for example from AI Search) and include them in the prompt so answers rest on your data rather than memory.
- Copilots and agents: a copilot assists a user in an application; an agent can plan and call tools to complete tasks.
Microsoft Foundry
Microsoft Foundry (formerly Azure AI Foundry) is the workspace for building generative applications. A project lets you browse a model catalog, deploy a model to an endpoint, experiment in a playground, connect data, evaluate output quality and safety, and wire agents to tools. Typical flow: pick a model, deploy it, test prompts, ground it on data, evaluate, then integrate it through the SDK or REST.
Responsible AI and harm mitigation
Responsible AI is usually organised around fairness, reliability and safety, privacy and security, inclusiveness, transparency and accountability. For generative systems this becomes a four-stage cycle.
- Identify potential harms (offensive content, bias, fabricated facts, data leakage, misuse) and prioritise them by likelihood and impact.
- Measure them: run test prompts, including adversarial ones, and score the outputs.
- Mitigate at several layers.
- Operate: document the findings, monitor in production and respond to incidents.
Mitigation layers
| Layer | What you do |
|---|---|
| Model | Choose a suitable model, fine-tune, or select one with built-in safeguards |
| Safety system | Use content filters and abuse monitoring around the model |
| Metaprompt and grounding | Write system instructions that set boundaries, and ground answers in trusted data |
| User experience | Show disclaimers, cite sources, limit input length and keep a human in the loop |
No single layer is enough. Models can still produce wrong answers, so the combination of filtering, grounding, clear UX and ongoing evaluation is what reduces risk.