This domain is about 14% of the exam. It covers the work before and around training: finding and preparing organisation-wide data, building features once and sharing them, prototyping safely in notebooks, and recording experiments so that results can be reproduced and compared.
Exploring and organising data
Where the data lives
| Store | Best for ML | Notes |
|---|---|---|
| Cloud Storage | Files: images, video, audio, text, TFRecord, Parquet, CSV | Cheap, durable, the default source for training jobs. Mounted into custom training with Cloud Storage FUSE |
| BigQuery | Large tabular data and analytics features | Direct source for BQML, AutoML and Vertex AI training (BigQuery Storage Read API is fast) |
| Spanner, Cloud SQL, AlloyDB | Operational data | Use federated queries from BigQuery, or export/replicate via Datastream. Avoid training directly against the production database |
| Bigtable | Low-latency, high-volume key lookups | Often the serving store for features and history |
| Dataproc / Managed Service for Apache Spark | Existing Spark and Hadoop code | Spark ML or heavy ETL when migrating on-premises jobs |
Organising data for efficient training
- Prefer columnar and binary formats at scale: Parquet or Avro for tabular; TFRecord for TensorFlow input pipelines. CSV and JSON are slow to parse.
- Shard large files (hundreds of MB each) rather than millions of tiny files. Thousands of small objects starve accelerators, and Cloud Storage handles throughput better with parallel reads over large objects.
- Co-locate the bucket and the training job in the same region to avoid latency and egress fees. Use a regional or dual-region bucket, not multi-region, for training data used in one place.
- Images/video/audio: keep binaries in Cloud Storage and a manifest (CSV or JSONL) of URIs and labels. Vertex AI datasets use import files this way.
- Text: JSONL records, one document per line, with the label or prompt/response fields.
- Tabular: partition and cluster BigQuery tables by time or key so training reads only the slice it needs. Use
TABLESAMPLEor hashed splits (MOD(FARM_FINGERPRINT(id), 10)) for repeatable train/validation/test splits. Hashing on the entity (user ID) keeps one entity in one split. - Keep raw, cleaned and feature layers separate and versioned.
Vertex AI managed datasets
A managed dataset wraps data (image, text, video or tabular) with a schema, labels and splits, and plugs into AutoML and custom training.
- Create from Cloud Storage import files or BigQuery tables. Datasets are regional.
- Dataset versioning and dataset annotation sets let you track label changes. Data labelling jobs send items to human labellers with instructions.
- Stats and visualisations help spot missing values, skew and imbalance before training.
- Training/validation/test split: set fractions or a predefined split column. Never evaluate on training rows.
- Data Catalog / Dataplex Universal Catalog records lineage and metadata for discovery across projects, and BigQuery sharing (formerly Analytics Hub) shares datasets without copying them.
Data preprocessing
| Tool | Use |
|---|---|
| BigQuery SQL | First choice for tabular transformations: joins, aggregates, window features, bucketing, imputation. Scales without servers |
| Dataflow (Apache Beam) | Large-scale batch and streaming preprocessing. One Beam pipeline can serve both modes. Best for event streams, image/text transformation at scale, and TFX components that run on Beam |
| Dataproc / Spark | Reuse existing Spark code or Spark ML |
| TensorFlow Transform (TFT) | Preprocessing defined once, applied during training with full-pass analysis (means, vocabularies), and exported as part of the model graph so serving uses identical logic |
| TFX | A production pipeline library: ExampleGen, StatisticsGen, SchemaGen, ExampleValidator, Transform, Trainer, Tuner, Evaluator, Pusher. Runs on Vertex AI Pipelines with Dataflow as the Beam runner |
| Dataprep by Trifacta (legacy) / BigQuery data preparation | Visual wrangling for analysts |
| Cloud Data Fusion | Visual ETL |
Preprocessing choices that the exam probes:
- Missing values: impute (mean/median/mode, model-based) or add an “is-missing” indicator. Don’t silently drop many rows.
- Scaling: standardise or normalise numeric features for gradient-descent and distance models. Trees don’t need it.
- Categorical: one-hot for few categories, embeddings or hashing for high cardinality.
- Skewed numerics: log transform or bucketise.
- Imbalanced classes: resample, class weights, or an appropriate metric (precision-recall AUC, F1) rather than accuracy.
- Leakage: features that wouldn’t exist at prediction time, or statistics computed over the full dataset before the split. Fit transforms on the training split only.
- Training-serving skew appears when preprocessing is rewritten separately for serving. Fix by sharing one transformation (TFT, a
TRANSFORMclause, a shared container, or a feature store).
Vertex AI Feature Store
A feature store is a central, governed place to define, compute, share and serve features.
- The current Vertex AI Feature Store is built on BigQuery: your feature data stays in BigQuery tables or views, and Feature Store adds an online-serving layer. (The older “legacy” Feature Store with its own Bigtable storage is deprecated. Be aware old materials describe it.)
- Concepts: a feature group (a BigQuery source with entity ID and optional feature timestamp column), features (columns), a feature view (a selection of features synced for online serving), and an online store instance that holds the synced values.
- Offline use: read features from BigQuery for training, with point-in-time correct joins so a training row only sees feature values known at that row’s timestamp. This prevents leakage.
- Online use: low-latency reads by entity ID at prediction time. Sync is scheduled or on demand from BigQuery to the online store. Choose Bigtable-backed or optimized online serving depending on latency and scale.
- Benefits: reuse across teams, consistency between training and serving (same definition), monitoring and lineage, and less duplicated pipeline code.
- Choose it when several models share features, you need low-latency lookups of precomputed aggregates, or skew has hurt you. For one model with features computed in the request, a feature store is overkill.
Privacy and sensitive data
| Need | Tool or practice |
|---|---|
| Find PII/PHI in text, tables, images | Sensitive Data Protection (formerly Cloud DLP): inspection with infoTypes, plus custom detectors |
| Remove or mask it | De-identify with redaction, masking, tokenisation, format-preserving encryption, bucketing, date shifting. Pseudonymisation keeps joinability |
| Measure re-identification risk | k-anonymity, l-diversity, delta-presence risk analysis |
| Control who sees raw columns | BigQuery column-level security (policy tags), row-level security, dynamic data masking |
| Encrypt | Default encryption, CMEK (Cloud KMS keys you control), EKM for external keys |
| Limit exfiltration | VPC Service Controls perimeters around BigQuery, Cloud Storage and Vertex AI |
| Healthcare data | Cloud Healthcare API de-identification for FHIR, DICOM and HL7v2. HIPAA-eligible with a BAA |
| Audit | Cloud Audit Logs (data access logs must be enabled for reads) |
Principles: collect the minimum needed, de-identify before it reaches the notebook or training set, restrict access by IAM and policy tags, document purpose and retention, respect data residency (choose regions deliberately), and remember that models can memorise training data, so scrub sensitive records before training rather than after. Unstructured data (documents, call transcripts) must be scanned too.
Ingesting text documents for inference
Generative and search workloads need documents turned into something a model can use:
- Document AI or Layout Parser extracts text and structure from PDFs and scans.
- Chunk the text, embed it (Vertex AI embedding models), and store vectors in Vector Search, BigQuery, AlloyDB or a Vertex AI Search data store.
- For batch inference over documents, put them in Cloud Storage or BigQuery and run a batch prediction or
ML.GENERATE_TEXTjob. - For online inference over uploaded documents, send them to Gemini directly (multimodal input via Cloud Storage URI or inline) or process through a RAG endpoint.
- Streaming ingestion: Pub/Sub into Dataflow, which calls the embedding model and writes to the index.
Model prototyping in notebooks
Choosing the Jupyter backend
| Option | Pick when |
|---|---|
| Vertex AI Workbench instances | Full JupyterLab on a VM you control. Custom images and GPUs, VPC networking, no-public-IP, CMEK. The standard for enterprise data science work. (The older “managed notebooks” and “user-managed notebooks” were consolidated into instances) |
| Colab Enterprise | Serverless, managed notebooks inside Vertex AI and BigQuery Studio. Fast start, collaboration, IAM-governed, no VM to administer. Good for exploration and sharing |
| BigQuery Studio notebooks | Notebook beside SQL on BigQuery data (backed by Colab Enterprise) |
| Dataproc JupyterLab / Dataproc Serverless notebooks | Spark-scale exploration over data on Hadoop or Cloud Storage. Use Spark kernels (PySpark) |
| Local Jupyter or Colab (consumer) | Not for enterprise data: no governance |
Workbench can attach to Dataproc clusters or Dataproc Serverless interactive sessions, so a notebook runs PySpark code on the cluster. Pick Spark kernels when the data is too big for a single VM, or when the team already has Spark code.
Security best practices for Workbench
- Run instances with a dedicated service account holding least-privilege roles, rather than the default Compute service account. Control user access with IAM (
roles/notebooks.runner,iam.serviceAccountUser). - No external IP, use Private Google Access or Private Service Connect, deploy in a VPC with firewall rules, and place the project in a VPC Service Controls perimeter.
- Use CMEK for disk encryption, Shielded VM options (secure boot, vTPM), and disable root access and file download/terminal where policy requires.
- Use Secret Manager for credentials, never keys in notebooks. Enable idle shutdown to save cost and reduce exposure. Use OS Login and organisation policies for constraints.
- Keep PII out of notebooks, using de-identified extracts and policy tags.
Source control and frameworks
- Workbench integrates with Git (the JupyterLab Git extension, GitHub and Cloud Source Repositories or other providers). Keep notebooks and shared modules in a repo, review them with pull requests, and move reusable code into packages and pipeline components. Strip outputs and avoid committing data.
- Prebuilt Deep Learning VM/Container images ship TensorFlow, PyTorch, scikit-learn, XGBoost, JAX and Spark with CUDA drivers. Choose the framework to match the team’s code and the accelerator (JAX and TensorFlow for TPUs; PyTorch with XLA on TPU too).
- Prototype on a sample, then move to scalable training: package code and run a Vertex AI custom training job (see the next domain).
Model Garden for prototyping
Browse, test in the console, and call Gemini, Imagen, partner and open models. Open models can be deployed to your own endpoint or opened in a notebook (sample notebooks). Use Agent Studio (previously Vertex AI Studio) to design and test prompts, compare models and export code. Use open-source models when you need local weights, custom licensing terms or tuning.
Tracking and running experiments
| Tool | Role |
|---|---|
| Vertex AI Experiments | Track runs: parameters, metrics (scalars, time series, confusion matrix), artifacts. Compare runs in a table or chart. Log with aiplatform.init(experiment=...), start_run, log_params, log_metrics |
| Vertex AI TensorBoard | Managed TensorBoard for loss curves, histograms, profiler traces, embeddings. Works with TensorFlow and PyTorch (via torch.utils.tensorboard). Custom jobs can write logs to a TensorBoard instance |
| Vertex ML Metadata | The underlying store of artifacts, executions and contexts and their lineage. Pipelines write to it automatically |
| Kubeflow Pipelines | Orchestrated, repeatable experiment workflows (open source, on GKE). Vertex AI Pipelines runs KFP DSL without managing a cluster |
| MLflow | Open source tracker. Use if the org standardised on it, hosted on Cloud Run or GKE, or log to Vertex |
| Vertex AI Model Evaluation | Standard metrics and comparisons for models, including slice-based evaluation |
Choose by framework and need: TensorFlow/PyTorch training-curve debugging goes to TensorBoard. Comparing hyperparameters and metrics across runs goes to Experiments. Repeatable multi-step workflows go to Pipelines.
Reproducibility checklist: fix random seeds, record data version (BigQuery snapshot or table decorator, dataset version, Cloud Storage object generation), code version (commit hash), container image digest, hyperparameters and the environment. If any is missing you can’t rerun the experiment.
Evaluating generative AI solutions
Generative outputs have no single ground truth, so evaluation mixes methods:
- Gen AI evaluation service (Vertex AI): computation-based metrics (ROUGE, BLEU, exact match) where reference answers exist; model-based (LLM-as-judge) metrics such as fluency, coherence, groundedness, safety, instruction following; pairwise comparison between two models or prompts (autorater); custom rubrics; and for RAG, retrieval metrics (context precision/recall) and answer groundedness.
- Golden datasets of prompts with expected outputs are the regression suite. Run them whenever prompt, model or retrieval changes.
- Human evaluation for subjective quality and for calibrating autoraters.
- Track evaluation runs in Experiments.
- Responsible-AI checks: safety filters, toxicity, bias across groups, jailbreak/red-team prompts.
- Online, collect user feedback and sample traffic for review.
Exam checklist
- Pick the store by access pattern: Cloud Storage for files, BigQuery for tabular, Bigtable for key lookups at serving.
- Use sharded, columnar or TFRecord data in the training region. Hash by entity for repeatable splits.
- Dataflow for streaming and large preprocessing, BigQuery SQL for tabular, TFT/TFX to share preprocessing with serving.
- Feature Store (BigQuery-based) gives reuse, point-in-time correctness and train/serve consistency.
- Sensitive Data Protection finds and de-identifies PII. Policy tags and VPC Service Controls limit exposure. Fit transforms on training data only.
- Workbench instances for governed full control, Colab Enterprise for serverless, Dataproc backends for Spark.
- Lock Workbench down: own service account, no public IP, CMEK, VPC-SC, Secret Manager, Git.
- Experiments compares runs, TensorBoard shows training curves, Metadata records lineage.
- Evaluate generative output with golden sets, autoraters, groundedness and human review.