Prepare and test your skills
Prepare and test your skills
Choosing the development and experimentation environment is the decision between fast interactive prototyping and managed, reproducible execution with the right accelerator. Interactive work uses Cloud Data Fusion and Dataflow notebooks to test logic quickly, while managed execution uses Dataflow (opens in a new tab) pipelines, Gemini Enterprise Agent Platform Pipelines, or self-managed Kubeflow Pipelines on Google Kubernetes Engine (GKE) to capture runs, lineage, and scale. Framework code flows from the development container through the runtime to central processing units (CPUs), graphics processing units (GPUs), or Cloud tensor processing units (TPUs), so container, machine type, and accelerator choice control performance and reproducibility.
Interactive prototyping with graphical pipelines and notebooks is code-free pipeline building paired with code-level testing of dataflow patterns. Interactive prototyping in Cloud Data Fusion builds a directed acyclic graph (DAG) in the user interface by connecting sources to transforms, sinks, error collectors, and actions, and the planner converts that DAG into parallel computations executed as an Apache Spark job on Managed Service for Apache Spark. Data flows from source databases through Java Database Connectivity (JDBC) drivers and plugin transforms to destinations such as BigQuery, so the same graph defines both logic and parallel execution.
Dataflow notebooks (opens in a new tab) complement the user interface by testing Apache Beam patterns before formalizing a pipeline. Representative patterns include enrichment with the Beam enrichment transform and Vertex AI Feature Store, text embeddings with the Vertex AI text-embeddings API or Hugging Face SentenceTransformers, vocabulary and scaling with MLTransform, model updating with side inputs, multi-model inference with KeyedModelHandler, remote inference with the Vision API or custom spaCy models, and generative inference with Gemma 2B, Hugging Face large language models (LLMs), and ensemble or cascade models. Choose graphical prototyping when sources, transforms, and sinks are known and standard, and choose notebook prototyping when vocabulary handling, scaling, per-key logic, or generative inference must be validated first.
Managed tracking of pipeline runs and serving telemetry is the capture of what ran, what it consumed, and how it performed outside the notebook cell. Dataflow provides in-system telemetry for the pipeline itself, including total bytes per stage, data locality that avoids materialization between stages, and autoscaling where resources scale as data moves through stages. Because one system owns all stages, Dataflow removes the need for an external orchestrator to coordinate multiple pipelines.
Durable artifacts and serving signals flow into surrounding managed services. Dataflow integrates with Pub/Sub for event ingestion, Bigtable for low-latency wide-column caching and serving, Cloud Storage for object storage, and BigQuery for petabyte-scale warehousing. Bigtable supports 6 ms reads and writes at the 90th percentile with many thousands of concurrent clients, which makes it usable as both source and sink inside a DoFn. For inference, GKE Inference Gateway reports GPU or TPU utilization, key-value (KV) cache hits and utilization, queue length, and model latency, while GKE Gateway with custom metrics relies on application-reported metrics viewed in Cloud Monitoring.
Managed orchestration versus self-managed orchestration is the tradeoff between serverless governance and direct control of cluster, network, and accelerators. Managed orchestration with Gemini Enterprise Agent Platform Pipelines triggers serverless runs from a pipeline definition, where data flows from training and evaluation steps into governed artifacts and then into deployment and monitoring without operating the orchestrator control plane. The pipeline depends on surrounding services for lineage, registration, and oversight:
Self-managed orchestration on GKE runs each pipeline step as containers scheduled by Kubernetes. The GKE cluster provides the control plane, nodes, and system components, the Kubernetes scheduler assigns workloads and manages lifecycle and upgrades, and the kubelet on each node starts the containers. Traffic flows from users through Cloud Load Balancing to serving containers, data flows from Cloud Storage through Cloud Storage FUSE volumes into training containers, and control signals flow from the control plane to each kubelet. The team retains control of the Virtual Private Cloud (VPC), GPU or TPU selection, and storage tuning with Cloud Storage Rapid Bucket, Rapid Cache, and Managed Lustre, but also retains overhead for images, networking, drivers, and volumes.
Storage choice follows the artifact bottleneck:
| Pipeline artifact pattern | Primary choice | Why it fits |
|---|---|---|
| Training datasets | Cloud Storage Rapid Bucket | Zonal throughput up to 15 TB/s with sub-millisecond open latency for massive volumes |
| Checkpoint weight transfers | Managed Lustre | Parallel access for thousands of workers pulling the same file |
| Model downloads for inference | Cloud Storage Rapid Cache or Rapid Bucket | Pre-warmed zonal weights reduce cold start |
| KV cache offloading | Managed Lustre | Parallel access lets nodes resume chats without reprocessing |
Exam tip: Use Rapid Bucket as primary for training datasets and Managed Lustre as primary for concurrent checkpoint weight transfers — the zonal bucket fits dataset scale while the parallel file system fits concurrent checkpoint reads.
Matching frameworks to processors decides whether an experiment is limited by flexibility, programmability, or matrix throughput. Cloud TPUs are Google application-specific integrated circuits (ASICs) for large matrix operations, with high-bandwidth memory (HBM) for larger models and TPU slices that scale with little code change. Code for TPUs must be compiled by the accelerated linear algebra (XLA) compiler, which compiles the framework graph into TPU machine code while the rest runs on the TPU host, so container and host images must expose compatible XLA and framework versions. The XLA compiler tiles multiplies for the 128x128 systolic array matrix unit (MXU) and prefers dimensions that are multiples of 8.
| Option | Best for | Avoid when |
|---|---|---|
| Central Processing Units (CPUs) | Quick prototyping, simple models, small batch sizes, host I/O or network-bound models | Large matrix-heavy training needing weeks of throughput |
| Graphics Processing Units (GPUs) | Medium-to-large models, TensorFlow ops missing on TPU, significant custom PyTorch or JAX ops | Ultra-large matrix workloads where TPU slices and HBM give higher throughput |
| Cloud TPUs | Matrix-dominated models, no custom ops in the main loop, weeks-long training, large batches and embeddings | Frequent branching, many element-wise ops, high-precision arithmetic, or custom ops in the main loop |
Framework containers make the choice reproducible. Agent Platform custom training accepts pre-built TensorFlow, PyTorch, and JavaScript Extension (JAX) containers and custom containers for extra libraries, custom C++ ops, or Hugging Face stacks such as Optimum TPU, JetStream, or vLLM. Optimum TPU serves Hugging Face models on GKE with continuous batching, token streaming, and greedy and sampling decoding. Choose JetStream for latest Google LLM optimizations, vLLM or quantized Ollama on Cloud Run for portable GPU inference, and Optimum TPU to stay in the transformers ecosystem on TPUs.
Scaling development, training, and serving connects interactive notebooks to distributed jobs and autoscaled endpoints. Vertex AI Workbench provides per-member notebooks for prototyping and small-dataset training, Experiments on Gemini Enterprise Agent Platform logs parameters, code and dataset versions, and results, and custom training moves code to a managed job where the worker-pool specification defines machine type, accelerator type and count, and pool count. Managed training depends on Cloud Storage for datasets, checkpoints, and artifacts and on Model Registry for versioned outputs, while Terraform, Cluster Toolkit, and Config Connector define GKE node pools, endpoints, and buckets declaratively. Spot virtual machines (VMs) reduce cost when training code checkpoints and tolerates preemption.
Autoscaling and availability differ by plane. Agent Platform endpoints scale replicas between a minimum and maximum on traffic and CPU or replica utilization, with at least two replicas for high availability (HA). Dataflow scales workers on CPU, parallelism, and pending data, GKE cluster autoscaler scales nodes on pending CPU, memory, GPU, and TPU requests, and Horizontal Pod Autoscaler scales deployments on utilization or custom AI metrics. Cloud Run scales containers to zero when idle and supports GPU instances for agents and vLLM or Ollama workloads, while global endpoints route across regions for low latency. Hardware faults on GKE or Compute Engine are handled by monitoring Xid errors, resetting GPUs or instances, reporting faulty hosts, and using elastic or Pathways resilient training.
Evaluating predictive and generative AI solutions is the repeatable measurement of model quality on fixed data plus continuous watching of quality in production. Predictive tasks compare predictions to labeled ground truth with numeric scores, while generative tasks judge free-form text for usefulness, truthfulness, and safety. In Google Cloud, Agent Platform Pipelines (opens in a new tab) orchestrates evaluation steps, Model Monitoring on Agent Platform tracks drift and skew, and Cloud Monitoring fires alerts that flow back to retraining or rollback.
Standardized evaluation pipelines and production monitoring create a closed loop from datasets to pipeline components to dashboards to remediation. Standardized evaluation starts by separating training loss from business success: a fraud model may train with cross-entropy loss but be evaluated on recall because recall measures coverage of fraud. Computation-based metrics are calculated by formulas, while qualitative indicators such as fluency require LLM-as-a-judge or human labeling (opens in a new tab). Evaluation data must be large and varied, using a golden dataset that reflects production, a judge LLM where an LLM can judge the task, and user feedback from production traffic. Data is stored in BigQuery for SQL-based tasks or Cloud Storage for large cost-efficient datasets.
Agent Platform Pipelines, built on Kubeflow Pipelines, packages evaluation as a versioned component that loads a model version and fixed dataset, computes metrics, checks thresholds such as minimum accuracy or F1-score, and logs parameters, code, dataset versions, and results to Agent Platform ML Metadata, Experiments, and Model Registry. Building the process follows an ordered sequence:
Model Monitoring on Agent Platform then compares live input and output distributions to a baseline from training data analyzed with TensorFlow Data Validation (TFDV) or past production traffic. Version 2 monitors managed endpoints and self-hosted GKE serving at model level, tracks input feature drift, output drift, and feature-attribution change, and applies to structured numerical and categorical features rather than unstructured images. Feature attribution from Vertex Explainable AI is an early signal when the model relies on different features than in training.
| Approach | Baseline compared | Use when |
|---|---|---|
| Skew detection | Production data vs training data | Training data is available and training-serving distortion matters |
| Drift detection | Production data vs earlier production data | Training data is unavailable and change over time matters |
The Gen AI evaluation service extends monitoring to response quality, safety, instruction adherence, grounding, style, verbosity, toxicity, and user ratings, with grounding checks against source text and human-in-the-loop review. Model Armor screens outputs for unsafe or off-topic content. Serving health is tracked separately through time to first token (TTFT), queries per second, token throughput, latency, error rate, and service-level objectives (SLOs) such as 99.9% successful calls, 95th percentile latency below 300 ms, TTFT below 500 ms for 99% of requests, and harmful-output rate below 0.1%. Alerts flow from Cloud Monitoring through Pub/Sub to Slack, email, SMS, or PagerDuty, triggering retraining pipelines or rollback to the last stable registry version.
Exam tip: Choose skew detection when the monitoring job can point at training data; choose drift detection when training data is unavailable and only production data over time can be watched.
Predictive and generative quality metrics for retrieval-augmented generation (RAG) match the metric to the prediction type and business risk. The F1 Score balances precision against recall in one score for predictive output, so a model cannot score well by favoring missed positives over false positives. Information extraction needs this balance because both finding all relevant facts and avoiding incorrect facts affect quality. Factual accuracy and relevance judge generative RAG responses from the serving subsystem: factual accuracy measures grounding in retrieved domain data such as electronic health records, PubMed, statutes, or product reviews, while relevance measures whether the response answers the request in context.
| Task type | Example metric | Choose when |
|---|---|---|
| Predictive classification and extraction | F1 Score | Both precision and recall matter |
| Generative RAG response | Factual accuracy, relevance | Generated text must be grounded and useful |
An automated quality subsystem decouples scoring from serving so evaluation runs continuously. Evaluation data flows from storage through compute to analysis in order:
BigQuery depends on function output for offline comparison, which lets teams track quality over time and justify promotion.
LLM-as-a-judge with AutoSxS and human alignment is automated side-by-side scoring validated against people. LLM-as-a-judge uses a high-quality foundation model such as Gemini to score candidate outputs for coherence, relevance, and safety, which solves the problem where prompts and outputs are too complex for string-overlap metrics such as Bilingual Evaluation Understudy (BLEU) or Recall-Oriented Understudy for Gisting Evaluation (ROUGE). AutoSxS is the Google Cloud implementation that compares Model A against Model B with an autorater LLM and benchmarks the autorater against systematic human evaluation.
Custom evaluation datasets are required because a foundation model's pre-training distribution is unknown and generic. The dataset curates essential, average, and edge prompts plus RAG context, versioned prompt templates, rewritten queries, and vector-database embeddings and chunking. LLMs can generate and augment rare cases, but humans must check synthetic data. Manual review works for prototyping but becomes a bottleneck, so automation improves speed and reproducibility while human preferences remain ground truth.
An AutoSxS run flows in order:
Each judgment row preserves inference_instruction, inference_context, response_a, response_b, choice of Model A, Model B, or Error, confidence from 0 to 1, and explanation. Aggregate win rates report the percentage of examples where the autorater chose each model, but wins alone do not prove correctness. When human preferences exist, accuracy, precision, recall, F1, and Cohen's Kappa measure agreement, where Kappa corrects for chance from -1.0 to 1.0: at or below 0.0 is chance, 0.0 to 0.2 slight, 0.2 to 0.4 fair, 0.4 to 0.6 moderate, 0.6 to 0.8 substantial, 0.8 to 1.0 nearly perfect, and 1.0 perfect. A high win rate with low accuracy or Kappa means the autorater prompt or model must be revised.
Tracking and comparing model artifacts, versions, and lineage is the system that logs, stores, versions, and links every machine learning artifact so any model can be reproduced and audited. Agent Platform ML Metadata records lineage and relationships, Gemini Enterprise Agent Platform Experiments (opens in a new tab) logs parameters, metrics, and dataset and model linkages per run, and Model Registry applies immutable versions. Together they provide traceability from raw data to prediction.
Artifact versioning by store assigns each artifact type to the store that provides storage, versioning, and access control. Code versions flow from Git into builds, data versions flow from storage into training, and both converge in ML Metadata and Model Registry where pointers, parameters, and binaries are linked. Metadata and pointers are stored in version control or a data catalog so locations resolve without copying data.
| Artifact type | Primary store | Versioning and integration |
|---|---|---|
| Code, containers, pipeline components | Artifact Registry with GitHub or GitLab | Git tracks code; Artifact Registry versions images and integrates with Cloud Build and Cloud Deploy |
| Training and evaluation datasets | BigQuery and Cloud Storage | Structured versioning in BigQuery; sharded files such as TFRecord or Avro grouped in buckets |
| Feature data | Agent Platform Feature Store backed by BigQuery | Maintains consistency and historical offline versions |
| Trained models and serving metadata | Model Registry on Gemini Enterprise Agent Platform | Stores, organizes, versions, and deploys model versions |
For unstructured Cloud Storage data, combine clips into large container files with a target of at least 100 MB per file and 100 to 10,000 shards to improve throughput. Managed datasets strengthen lineage by linking custom models directly to training data, providing statistics and train, test, and validation splits, with BigQuery Storage API reads supporting tabular tracking.
Model Registry preserves provenance for each version, including training parameters and code version, evaluation metrics, dataset version traced to the Knowledge Catalog, framework and fine-tuning parameters, and generative quality and safety results. Registration follows an ordered lifecycle:
Immutability and auditability protect the chain. Encrypt artifacts with Cloud Key Management Service (Cloud KMS), enforce least-privilege Identity and Access Management (IAM) with dedicated pipeline service accounts and IAM Conditions, sign approved builds, and use multi-region or dual-region buckets for durability. Audit logs for Agent Platform record endpoint creation, deployment, and configuration changes, with analysis in Observability Analytics, real-time analysis in Cloud Logging, long-term retention in BigQuery, and routing to security information and event management (SIEM) systems.
Exam tip: Use Knowledge Catalog to search pipeline artifact lineage and enterprise assets, use Agent Platform ML Metadata to analyze the full MLOps pipeline and runs, and use Model Registry to apply and manage model versions.
A lineage graph is a connected record that traces a model backward to its dataset and pipeline and forward to its predictions. Agent Platform ML Metadata stores graph-based lineage for models, datasets, and artifacts encrypted at rest, including data sources, transformations, parameters, and experiment results, plus resources and runs from Agent Platform Pipelines. A processed dataset points back to its raw source and creating pipeline, a training run points back to dataset and code versions, and a registered version points back to its run and forward to its endpoint.
Complete lineage requires automatic registration during execution rather than manual entry. Model files and weights land in Cloud Storage, custom images land in Artifact Registry, datasets are tagged with ownership, sensitivity, and source links, and Knowledge Catalog discovers inventories from BigQuery, Cloud Storage, and Pub/Sub while tracking pipeline-artifact lineage. Track an individual artifact in Knowledge Catalog when debugging a single step, and track the entire MLOps pipeline in ML Metadata when auditing or reproducing the full lifecycle.
Interpreting lineage means traversing in two directions. A backward walk starts from a bad prediction, identifies the serving version in Model Registry, follows the edge to its training and evaluation run in ML Metadata, then follows the edge to dataset version and raw source in Knowledge Catalog to check drift or upstream change. A forward walk starts from a changed dataset, finds downstream runs that consumed it, then lists dependent registered versions to decide retraining or rollback. Audit coverage depends on Cloud Audit Logs to record who accessed or modified data and models and when.
| Surface | What it tracks | Choose when |
|---|---|---|
| Agent Platform ML Metadata | Full MLOps lineage plus resources and runs | Full traceability, run comparison, or compliance evidence is needed |
| Knowledge Catalog | Pipeline-artifact lineage plus searchable resources | Finding a resource or debugging one artifact is needed |
| Model Registry | Model versions and links to training, evaluation, dataset, and code | Managing iterations or governing promotion is needed |
| Cloud Audit Logs | API calls and administrative actions | Who and when for access or configuration change is needed |
Comparing experiment runs across teams is the practice of building many variants and contrasting metrics, hyperparameters, and artifacts to find the optimal model. Data scientists vary architectures, input datasets, hyperparameters, and hardware, then compare aggregate metrics such as accuracy, precision, and recall overall and on important data subsets, versions, and architectures.
Vertex AI TensorBoard provides visual, collaborative comparison of training behavior over time. Data flows from training jobs into TensorBoard, where loss and accuracy curves, model graphs, and low-dimensional embedding projections from different runs appear side by side. Teams compare hyperparameter choices and training dynamics directly without exchanging isolated charts. Choose TensorBoard when the question is how training evolved and how visual differences explain the gap.
Experiments on Agent Platform provides linked tracking of parameters, metrics, and artifacts through Vertex ML Metadata. Each run records hyperparameters, metrics, dataset pointers, and model outputs, so different accuracy numbers can be traced to parameters, data, or code rather than undocumented change. Choose Experiments when provenance and reproducibility across Agent Platform and Gemini Enterprise Agent Platform matter.
| Capability | Primary comparison unit | Use when the question is |
|---|---|---|
| Vertex AI TensorBoard | Visual run with curves, graphs, and embeddings | How loss and accuracy evolved across hyperparameter variants |
| Experiments on Agent Platform | Linked run with parameters, metrics, and artifacts | Which parameters plus which dataset produced the result |
Hyperparameter-driven comparison automates the search. The Gemini Enterprise Agent Platform Managed Training service runs jobs on Google processing infrastructure while Vertex AI Vizier selects and tests configurations across trials. Each trial flows back into Experiments and TensorBoard as a comparable run, which removes manual tuning and lets teams promote only the configuration with verified lineage.
Use Cloud Data Fusion when sources, transforms, and sinks are known and standard because it builds a directed acyclic graph in the user interface that executes as an Apache Spark job on Managed Service for Apache Spark. Use Dataflow notebooks when vocabulary handling, scaling, per-key logic, or generative inference must be validated first because they test Apache Beam patterns before formalizing a pipeline.
Skew detection compares production data to training data and is used when training data is available and training-serving distortion matters. Drift detection compares production data to earlier production data and is used when training data is unavailable and change over time matters.
Use Vertex AI TensorBoard when the question is how training evolved because it provides visual comparison of loss and accuracy curves, model graphs, and low-dimensional embedding projections side by side across runs. Use Experiments on Agent Platform when provenance and reproducibility matter because each run records hyperparameters, metrics, dataset pointers, and model outputs linked through Vertex ML Metadata.
Last updated