Azure DP-100 study materials
Azure DP-100 study resources

Azure DP-100 cheat sheet

Azure DP-100 · Keep the key ideas within reach.

Quick reference

Design and prepare a machine learning solution

  • The Azure ML workspace is the top-level resource; it groups compute, datastores, data assets, environments, components, models, endpoints, and experiments, and links to Key Vault, Storage, Container Registry, and Application Insights.

  • Compute selection rule: compute instance = single-user dev VM; compute cluster = autoscaling multi-node for training and sweeps; serverless compute = per-job managed allocation with no cluster to maintain; managed online endpoint = real-time inference; batch endpoint = scheduled or on-demand batch scoring.

  • Compute cluster parameters that control cost: min_nodes (0 enables scale-to-zero), max_nodes, idle_time_before_scale_down (default 120 seconds), vm_size, and tier (dedicated vs low-priority).

  • Datastore credential options: account key, SAS token, or workspace managed identity; the credential-less option stores no secret in the workspace and is required for private, key-free designs.

  • Data asset types: uri_file and uri_folder point at raw storage paths; mltable attaches a schema and supports tabular/parquet reads without custom parsing code; all asset versions are immutable.

  • An environment bundles a base Docker image, conda.yaml or pip requirements, and environment variables; curated azureml: environments are prebuilt, and registries can share environments across workspaces.

  • Identity decision rule: the workspace system-assigned managed identity is used by default for Storage and Key Vault access; a user-assigned identity is used when permissions must persist beyond the workspace lifecycle or be shared across resources.

  • Network isolation requires private endpoints for the workspace, storage account, Key Vault, and container registry plus a managed VNet (isolation_mode) or a bring-your-own VNet with delegated subnets and private DNS zones.

Quick reference

Explore data, and run experiments

  • A command job is defined in YAML with type: command plus command, environment, compute, and code fields, then submitted with ml_client.jobs.create_or_update(Job(...)) or az ml job create.

  • MLflow tracking calls: mlflow.log_param, mlflow.log_metric, and mlflow.log_artifact write to the workspace-linked tracking server; mlflow.autolog() records parameters, metrics, and models automatically for scikit-learn, PyTorch, and XGBoost.

  • A sweep job uses type: sweep with search_space, sampling_algorithm (random, grid, or bayesian), objective.primary_metric plus objective.goal (maximize or minimize), and limits.max_total_trials.

  • Bayesian sampling runs trials sequentially because each trial is informed by prior results, so it does not support parallel trials or most early-termination policies.

  • Early-termination policies: bandit (slack_factor and evaluation_interval on the best-performing trial), median_stopping (compares against the median of running averages), and truncation_selection (cancel_percentage).

  • AutoML configuration keys: task, primary_metric, training_data, either validation_data or n_cross_validations, limits.timeout_minutes, max_concurrent_trials, and featurization mode (auto, off, or custom).

  • Data drift monitoring compares a baseline dataset to a target dataset over time windows using metrics such as population stability index and Jensen-Shannon distance, with alerts triggered on threshold breaches.

  • The responsible AI dashboard combines error analysis, Fairlearn-based fairness assessment, SHAP-based interpretability, and counterfactual what-if analysis for a registered model.

Quick reference

Train and deploy models

  • A scoring script for a managed online deployment must define init() (load model and dependencies once) and run(raw_data) returning a JSON-serializable value such as a dict or list.

  • Online deployment YAML keys: endpoint_name, model (registered asset path), environment, code_configuration.scoring_script, instance_type, instance_count, and scale_settings.

  • Invocation: ml_client.online_endpoints.invoke(endpoint_name=..., request_file=..., deployment_name=...) posts JSON to the endpoint's scoring URI and returns the model response.

  • Traffic control: the endpoint's traffic map assigns percentages to deployments and must total 100; blue-green rollout creates a new deployment, validates it with a small traffic share, then shifts to 100%.

  • Endpoint authentication: auth_mode key uses primary/secondary keys for calls, while auth_mode aml_token requires an Entra ID bearer token scoped to the workspace.

  • Autoscaling for managed online deployments uses scale type default with target_utilization_percentage, or scale type manual with a fixed instance_count.

  • Batch deployments run a scoring script's run(mini_batch) function, which receives a list of file paths and returns a pandas DataFrame or list written to the configured output location.

  • MLflow no-code deployment works when the registered model has an MLflow format, a logged signature, and a Python environment; Azure ML then generates the scoring script and image automatically.

  • Registering a model under an existing name increments its version; deployments and jobs pin an exact immutable version number or an assigned label such as latest or production.

Quick reference

Optimize language models for AI applications

  • Supervised fine-tuning data is JSONL with one object per line containing a messages array of system, user, and assistant turns; dozens of high-quality examples are the practical minimum, and hundreds typically improve results.

  • Retrieval augmented generation pipeline: chunk source documents, embed chunks with an embedding model, index vectors in Azure AI Search, retrieve top-k matches per query, and inject them into the prompt with instructions to cite sources.

  • Sampling parameters: temperature (0-2) controls randomness and should be near 0 for extraction or classification; top_p performs nucleus sampling and is usually adjusted instead of temperature, not both.

  • Token budgeting: prompt tokens plus max_tokens for the completion must fit inside the model's context window, so long retrieved context must be truncated or summarized before the call.

  • Provisioned throughput units (PTU) reserve model capacity for predictable latency and throughput, while standard and global-standard deployments bill per token on shared capacity.

  • Content filtering assigns severity levels safe, low, medium, and high across hate, sexual, violence, and self-harm categories, and blocks prompts or completions at or above the configured threshold.

  • Evaluation metrics for generated answers include groundedness (supported by retrieved context), relevance, coherence, and fluency; scores come from a judge model over a labeled test dataset.

  • Embedding models convert text into fixed-length vectors; semantic search ranks results by cosine similarity between the query vector and indexed document vectors.