First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Architecting ML solutions
You are designing a document summarization system on Google Cloud using Vertex AI Gemini models. The input documents average 40 pages and must be processed within a few seconds per request. Which architectural decision best addresses the context window constraint?
- Enable a provisioned throughput endpoint sized to the document length
- Increase the temperature to allow broader token generation
- Use streaming responses to reduce total input token count
- Chunk documents and apply a map-reduce summarization pattern Correct answer.
Explanation
Long documents frequently exceed a model's input token limit, so splitting text into chunks and summarizing hierarchically (map-reduce) keeps each call within the context window while preserving coverage. Provisioned throughput affects capacity and latency, not the token limit, and streaming changes delivery of output rather than input size.
Question 2Architecting ML solutions
A team needs a model that must never send data outside their Google Cloud project boundary and must be callable with the same Vertex AI SDK. Which deployment approach satisfies both requirements?
- Call the Gemini API through its public endpoint with an API key
- Use Vertex AI Model Garden's third-party partner APIs
- Route requests through Cloud Functions to an external provider
- Deploy an open model to a Vertex AI endpoint in the project Correct answer.
Explanation
Deploying a model to a Vertex AI endpoint keeps inference inside the customer's project and VPC Service Controls perimeter while preserving SDK compatibility. Public Gemini API endpoints and partner-hosted APIs move data outside the project boundary.
Question 3Architecting ML solutions
Which Vertex AI component provides a managed feature store for serving features to both training and online prediction with low latency?
- Vertex AI Workbench
- Vertex AI Model Registry
- Vertex AI Feature Store Correct answer.
- Vertex AI Pipelines
Explanation
Vertex AI Feature Store is the managed service for ingesting, storing, and serving feature values consistently to training jobs and online prediction. The other services handle orchestration, notebook development, and model versioning respectively.
Question 4Architecting ML solutions
A generative application must ground answers in a company's internal documents and cite sources. Which Google Cloud architecture most directly provides retrieval-augmented generation?
- Enable safety filters and rely on the model's parametric knowledge
- Store documents in Cloud Storage and pass all of them in each prompt
- Use Vertex AI Search with a connected data store and Grounding Correct answer.
- Fine-tune Gemini on the document corpus and disable retrieval
Explanation
Vertex AI Search indexes the corpus and Grounding injects retrieved passages into the prompt, enabling citation of source documents. Fine-tuning bakes knowledge into weights without retrieval citations, and passing every document in each prompt does not scale.
Question 5Architecting ML solutions
An ML engineer wants reproducible, containerized training steps with artifact lineage tracked automatically. Which Vertex AI service should be the foundation?
- Vertex AI Endpoints with traffic splitting
- Vertex AI Notebooks with local scripts
- Vertex AI Model Monitoring
- Vertex AI Pipelines with metadata tracking Correct answer.
Explanation
Vertex AI Pipelines runs containerized steps as a directed acyclic graph and records artifacts and parameters in Vertex ML Metadata for lineage. Endpoints serve models, monitoring detects drift, and notebooks alone do not provide orchestrated lineage.
Question 6Architecting ML solutions
A recommendation model's online predictions must reflect user actions from the last few minutes. Which design choice is most appropriate?
- Streaming ingestion into Feature Store with online serving Correct answer.
- Batch predictions refreshed nightly into BigQuery
- Caching static features in Cloud Storage
- Training a new model for every user action
Explanation
Streaming ingestion updates feature values continuously, and Feature Store online serving returns fresh values at low latency for real-time prediction. Nightly batch refreshes and static caches cannot reflect minute-level behavior.
Question 7Architecting ML solutions
Which statement accurately describes the role of Vertex AI Model Registry in an MLOps architecture?
- It serves predictions at low latency with autoscaling
- It monitors feature drift in production traffic
- It stores and versions models with aliases for deployment Correct answer.
- It trains models automatically when new data arrives
Explanation
Model Registry is a central catalog that versions models and supports aliases so pipelines can reference a specific version for deployment. Training, serving, and drift monitoring are handled by other Vertex AI services.
Question 8Architecting ML solutions
A company wants to compare two candidate Gemini model versions on a curated prompt set before rollout. Which approach best supports this evaluation?
- Manually inspect a handful of outputs in a notebook
- Rely on the model card's benchmark scores only
- Use Vertex AI evaluation with a reference-based or model-based metric on a dataset Correct answer.
- Deploy both to production and compare billing reports
Explanation
Vertex AI evaluation runs both models against a curated dataset and computes metrics such as similarity or model-based grading, giving a repeatable comparison. Production billing and small manual checks lack statistical rigor, and public benchmarks may not reflect the task.
Question 9Architecting ML solutions
Which practice best reduces the risk of prompt injection in a retrieval-augmented generative application?
- Increase the model temperature for more varied responses
- Concatenate user input and system instructions into one string
- Treat retrieved content as untrusted and isolate instructions from data Correct answer.
- Remove safety filters to avoid blocking legitimate answers
Explanation
Prompt injection is mitigated by clearly delimiting untrusted retrieved content from system instructions and validating outputs, so embedded instructions in documents are not followed. Raising temperature or removing filters increases risk, and merging instructions with user input removes the trust boundary.
Question 10Architecting ML solutions
A team needs to expose a fine-tuned model through a private endpoint reachable only from their VPC. Which configuration accomplishes this?
- API key authentication on the shared public endpoint
- Cloud Run proxy without a VPC connector
- Private Service Connect or VPC peering on the endpoint Correct answer.
- Public endpoint with an allowlisted IP range
Explanation
Vertex AI supports private endpoints using Private Service Connect or VPC peering so traffic stays on private networks. Public endpoints with IP allowlists still traverse the internet, and a proxy without a VPC connector cannot reach private resources.
Question 11Architecting ML solutions
Which factor most directly determines whether a workload should use batch prediction instead of online prediction?
- The need for sub-second responses to individual user requests
- The requirement for per-request explanations
- The need to autoscale with traffic spikes
- The tolerance for delayed, bulk-scored outputs Correct answer.
Explanation
Batch prediction is appropriate when results are consumed later in bulk and latency is not user-facing. Sub-second per-request responses and traffic-driven autoscaling are characteristics of online prediction.
Question 12Architecting ML solutions
An organization must prove that training data was not used to train a model after a deletion request. Which Vertex AI capability most directly supports this?
- Batch prediction job logs
- Model Monitoring skew detection
- Vertex ML Metadata artifact lineage Correct answer.
- Endpoint traffic splitting
Explanation
Vertex ML Metadata records lineage between datasets, training runs, and models, allowing auditors to trace which data produced a model. Monitoring, traffic splitting, and batch logs do not establish training data provenance.
Question 13Architecting ML solutions
Which Vertex AI feature allows a team to allocate dedicated compute capacity to a model endpoint for predictable latency?
- Preemptible training jobs
- Autoscaling with min replicas set to zero
- Dedicated provisioned throughput Correct answer.
- Spot VMs for serving
Explanation
Provisioned throughput reserves dedicated capacity so throughput and latency remain predictable under load. Autoscaling to zero, spot VMs, and preemptible jobs do not guarantee dedicated serving capacity.
Question 14Architecting ML solutions
A team wants to reduce inference cost for a high-volume classification workload with simple inputs. Which model selection strategy is most appropriate?
- Disable caching to reduce token usage
- Use the largest available multimodal model for all requests
- Increase output length limits to amortize calls
- Route simple requests to a smaller, cheaper model Correct answer.
Explanation
Model routing sends simpler requests to smaller, lower-cost models while reserving large models for complex cases, reducing average cost. Using the largest model for everything and inflating output limits both increase spend.
Question 15Architecting ML solutions
Which statement about grounding with Vertex AI Search is accurate?
- It returns responses with citations to retrieved sources Correct answer.
- It replaces the need for any safety filters
- It requires documents to be less than one page
- It retrains the base model on indexed documents
Explanation
Grounding retrieves relevant passages from an indexed data store and includes citations so users can verify claims. It does not retrain the model, does not remove the need for safety controls, and has no one-page document restriction.
Question 16Architecting ML solutions
A pipeline must fail fast when a newly trained model's evaluation metric drops below a threshold. Where should this gate be implemented?
- Inside the training container after saving the model
- In Cloud Monitoring alert policies only
- In the endpoint's autoscaling configuration
- As a conditional step in Vertex AI Pipelines that inspects the metric Correct answer.
Explanation
A conditional pipeline step evaluates the recorded metric and halts or branches before deployment, preventing a bad model from reaching production. Container-internal checks are opaque to orchestration, and monitoring alerts fire after deployment.
Question 17Architecting ML solutions
Which consideration most strongly favors fine-tuning over retrieval-augmented generation for a generative task?
- The answers must reflect the latest policy revisions
- The task needs a consistent output style learned from many examples Correct answer.
- The task requires citing frequently changing source documents
- The knowledge base updates several times per day
Explanation
Fine-tuning is well suited to teaching consistent format, tone, or task behavior from many examples. When facts change frequently and citations are required, retrieval keeps answers current without retraining.
Question 18Architecting ML solutions
Which Google Cloud service is designed to run containerized custom training code with managed compute and automatic artifact upload to Cloud Storage?
- Cloud Functions
- Vertex AI custom training jobs Correct answer.
- App Engine flexible environment
- Cloud Run jobs
Explanation
Vertex AI custom training jobs run a container or Python package on managed compute and can write the resulting model artifacts to a Cloud Storage location. The other services run application workloads and are not ML training orchestrators.
Question 19Architecting ML solutions
A team observes that model quality degrades gradually in production as user behavior shifts. Which Vertex AI capability detects this without labeled ground truth?
- Model Registry alias updates
- Vertex AI Pipelines scheduling
- Model Monitoring skew and drift detection Correct answer.
- Feature Store batch ingestion
Explanation
Model Monitoring compares serving feature and prediction distributions against training baselines to detect skew and drift without requiring labels. Pipelines, registry aliases, and batch ingestion do not perform distributional monitoring.
Question 20Architecting ML solutions
Which design best supports multi-tenant isolation for a generative application where tenants must not see each other's data?
- Caching all responses in a shared bucket
- A single index containing all tenants' documents without filters
- A shared index filtered by tenant ID at query time with per-tenant access checks Correct answer.
- One global API key shared by all tenants
Explanation
Per-tenant filtering enforced at query time, combined with access checks, prevents cross-tenant retrieval while allowing a shared index. Unfiltered shared indexes, shared keys, and shared caches create data leakage risk.
Question 21Architecting ML solutions
Which statement best describes the purpose of Vertex AI Experiments?
- It deploys models to endpoints with autoscaling
- It generates synthetic training data
- It stores feature values for online serving
- It tracks runs, parameters, and metrics to compare training experiments Correct answer.
Explanation
Vertex AI Experiments records parameters, metrics, and artifacts across runs so teams can compare and reproduce experiments. Deployment, feature serving, and data synthesis are handled by other services.
Question 22Architecting ML solutions
A latency-sensitive application calls a Gemini model repeatedly with a long, static system instruction. Which optimization most directly reduces repeated processing cost?
- Switching to batch prediction
- Lowering the max output tokens to one
- Context caching for the static instruction prefix Correct answer.
- Disabling logging on the endpoint
Explanation
Context caching stores a reusable prompt prefix so repeated calls avoid reprocessing the long static instruction, reducing cost and latency. Limiting output to one token breaks the task, batch prediction is not interactive, and disabling logs does not affect processing.
Question 23Architecting ML solutions
Which security control most directly limits which users can invoke a Vertex AI endpoint?
- Enabling request logging in Cloud Logging
- IAM roles and service account bindings on the endpoint Correct answer.
- A larger machine type for the endpoint
- Setting a higher request timeout
Explanation
IAM policies bind principals to roles that permit or deny prediction calls, providing authorization at the endpoint. Machine type, logging, and timeouts affect performance and observability, not access control.
Question 24Architecting ML solutions
An architect must choose between a single large model and an ensemble of smaller specialized models for a complex reasoning task with strict latency budgets. Which analysis is most sound?
- Benchmark quality and end-to-end latency of each option on representative data Correct answer.
- Choose the large model because parameter count guarantees accuracy
- Avoid benchmarking and rely on vendor marketing claims
- Always prefer the ensemble because smaller models are cheaper
Explanation
The decision should be driven by measured quality and end-to-end latency on representative data, since ensembles add orchestration overhead and a larger model does not guarantee better task accuracy. Vendor claims are not a substitute for task-specific evaluation.
Question 25Architecting ML solutions
Which storage choice is most appropriate for large training datasets accessed by Vertex AI training jobs?
- A single Cloud SQL instance
- Local SSD on the developer laptop
- Firestore collections
- Cloud Storage buckets mounted or read by the training job Correct answer.
Explanation
Cloud Storage is the standard, scalable location for training datasets that Vertex AI training jobs read directly. Transactional databases and local disks are not designed for large-scale training data access.
Question 26Architecting ML solutions
An ML architect is deciding how to serve a generative application that must remain available during regional zonal failures and must keep per-request latency low. Which Vertex AI deployment design best satisfies both requirements?
- Deploy the model to a single endpoint and place a Cloud Load Balancing proxy in front of it to absorb failures.
- Deploy the model to a single endpoint in one zone with a large machine type to maximize throughput.
- Deploy the model to an endpoint with automatic resource scaling and deploy the endpoint to multiple zones within the region. Correct answer.
- Deploy the model to an endpoint with dedicated private Service Connect attachment and rely on VPC redundancy.
Explanation
Vertex AI endpoints support deployment across multiple zones within a region, and automatic resource scaling adjusts replicas to traffic. Combining multi-zone deployment with autoscaling provides resilience to zonal failures while keeping capacity matched to demand, which supports low latency. A single-zone deployment or a proxy alone does not provide compute redundancy at the model-serving layer.
Question 27Architecting ML solutions
A team is designing a Vertex AI pipeline that trains a model, evaluates it on a held-out dataset, and only deploys when the evaluation metric exceeds a threshold. They want the pipeline to stop automatically when the threshold is not met and to record the decision for audit. Which design choice best meets these requirements?
- Schedule a Cloud Function that reads the metric from Cloud Logging and deletes the model artifact when the threshold is not met.
- Configure the training component to raise an exception whenever the evaluation metric is below the threshold.
- Set the endpoint's traffic split to zero until a human manually confirms the metric in the Vertex AI console.
- Add a conditional pipeline step that checks the metric and gates the deployment component, and log the metric and decision to Vertex ML Metadata. Correct answer.
Explanation
Vertex AI Pipelines supports conditional execution, so a metric check can gate downstream deployment components and stop the pipeline cleanly when the threshold is not met. Recording the metric and the gate outcome in Vertex ML Metadata provides the audit trail. The other options either couple evaluation to training code, rely on external polling, or require manual intervention that does not automatically stop the pipeline.
Question 28Architecting ML solutions
An architect is comparing a single large Gemini model against an ensemble of smaller specialized models for a complex reasoning workload. The workload has strict cost and latency budgets, and the team can invest in routing logic. Which analysis best supports the decision?
- The ensemble is preferable only when each specialized model can be evaluated independently and the router's added latency and error rate are measured against the budgets. Correct answer.
- The single large model is preferable because Gemini models cannot be combined behind a router in a Vertex AI architecture.
- The ensemble is preferable because smaller models always have lower total cost than a single large model for any workload.
- The single large model is preferable because it eliminates the need for evaluation and monitoring of routing behavior.
Explanation
An ensemble of specialized models can reduce cost and latency only if each model is accurate on its slice and the routing layer is fast and reliable. The architect must measure router overhead and misrouting error against the budgets before choosing. Blanket claims about cost or the impossibility of routing are not supported by the platform's capabilities.
Question 29Designing data preparation and processing systems
You need a managed, serverless data warehouse on Google Cloud that natively integrates with BigQuery ML and Vertex AI for feature engineering. Which service should you choose as the central analytics store for your GenAI feature pipeline?
- Cloud Spanner
- Firestore
- Cloud Bigtable
- BigQuery Correct answer.
Explanation
BigQuery is Google Cloud's serverless analytics warehouse and provides native integration with BigQuery ML and Vertex AI, making it the standard choice for feature engineering and analytics serving in GenAI pipelines. Spanner, Bigtable, and Firestore are operational databases optimized for transactional or low-latency key lookups rather than large-scale analytical feature preparation.
Question 30Designing data preparation and processing systems
Your team ingests raw documents into Cloud Storage and wants an event-driven pipeline that triggers a Cloud Run function whenever a new object lands in the bucket. Which mechanism should you configure?
- A Cloud Scheduler cron job polling the bucket
- A BigQuery scheduled query on the bucket
- A VPC Service Controls perimeter on the bucket
- A Cloud Storage Pub/Sub notification on the bucket Correct answer.
Explanation
Cloud Storage can publish object change notifications to a Pub/Sub topic, and Pub/Sub can push events to Cloud Run, giving a native event-driven trigger for new objects. Polling with Cloud Scheduler is inefficient and not event-driven, while VPC Service Controls and scheduled queries do not emit per-object events.
Question 31Designing data preparation and processing systems
You are preparing training data for a retrieval-augmented generation system and need to split long PDFs into chunks before embedding. Which approach best preserves semantic coherence for retrieval quality?
- Split on document structure such as headings and paragraphs with modest overlap Correct answer.
- Split every document into exactly two equal halves
- Split each page into single sentences with no overlap
- Split on fixed character counts with no overlap
Explanation
Structure-aware chunking respects natural boundaries like headings and paragraphs, and a modest overlap preserves context that would otherwise be cut across chunk edges, improving retrieval relevance. Fixed-size or arbitrary splits can sever sentences and ideas, degrading embedding quality.
Question 32Designing data preparation and processing systems
Which file format is generally preferred for storing large analytical datasets in Cloud Storage that will be queried by BigQuery external tables, because it is columnar and compresses well?
- JSON Lines
- CSV
- Parquet Correct answer.
- XML
Explanation
Parquet is a columnar format with efficient compression and predicate pushdown, which reduces bytes scanned and improves performance for analytical queries over external tables. CSV, JSON Lines, and XML are row-oriented text formats that are larger and slower to scan selectively.
Question 33Designing data preparation and processing systems
You must remove personally identifiable information from a dataset before it is used to fine-tune a model. Which Google Cloud service provides configurable de-identification transforms such as redaction and format-preserving encryption?
- Cloud Armor
- Identity-Aware Proxy
- Sensitive Data Protection (Cloud DLP) Correct answer.
- Cloud CDN
Explanation
Sensitive Data Protection offers infoType detectors and de-identification transforms including redaction, masking, tokenization, and format-preserving encryption, which are applied to data before downstream use. The other services are networking and access-control products with no data transformation capability.
Question 34Designing data preparation and processing systems
Your pipeline writes curated features into BigQuery and must guarantee that a batch load either fully succeeds or leaves the table unchanged. Which BigQuery capability should you use?
- Streaming inserts with best-effort deduplication
- Multi-statement transactions Correct answer.
- Legacy SQL with allowLargeResults
- A wildcard table query
Explanation
BigQuery multi-statement transactions provide atomic commit semantics so a set of DML statements either all apply or none do, which satisfies the all-or-nothing requirement. Streaming inserts are append-oriented and only offer best-effort deduplication, while the other options concern query output or table naming, not atomicity.
Question 35Designing data preparation and processing systems
When preparing a supervised fine-tuning dataset for a text classification model, which practice improves label quality most directly?
- Having multiple annotators label a sample and measuring inter-annotator agreement Correct answer.
- Removing all examples where annotators disagreed
- Increasing the learning rate during training
- Adding more unlabeled examples to the training file
Explanation
Measuring inter-annotator agreement on a labeled sample surfaces ambiguous guidelines and unreliable labels, which is the most direct way to improve label quality before training. Learning rate and unlabeled data affect training dynamics or quantity, not label correctness.
Question 36Designing data preparation and processing systems
You need to store embeddings generated from your document corpus so that a Vertex AI vector search index can serve approximate nearest-neighbor queries. Which storage pattern is most appropriate for the source embeddings before indexing?
- A Cloud SQL table with embeddings stored as comma-separated text
- A Pub/Sub topic retaining embedding messages
- A BigQuery table with an ARRAY<FLOAT64> embedding column Correct answer.
- A Cloud Storage bucket of uncompressed TIFF images
Explanation
BigQuery supports repeated FLOAT64 arrays and is a common staging location for embeddings that are then exported to a Vertex AI vector index, keeping embeddings queryable and joinable with metadata. Image files, CSV-in-a-column, and message topics are poor representations for numeric vector data at scale.
Question 37Designing data preparation and processing systems
A data engineer wants to validate that incoming JSON records conform to an expected schema before loading them into BigQuery. Which BigQuery feature enforces column types and rejects or nulls malformed values during load?
- Schema with max_bad_records and ignore_unknown_values load options Correct answer.
- Partition expiration
- Table expiration settings
- Column-level access policies
Explanation
Load jobs accept an explicit schema plus options such as max_bad_records and ignore_unknown_values, which control how nonconforming rows are handled during ingestion. Expiration settings and access policies govern lifecycle and permissions rather than schema validation.
Question 38Designing data preparation and processing systems
You are designing a pipeline that must process streaming clickstream events and compute rolling aggregates before writing features to BigQuery. Which combination best fits low-latency streaming aggregation on Google Cloud?
- Cloud Storage triggers with Cloud Functions per object
- Pub/Sub for ingestion with Dataflow windowed aggregations Correct answer.
- Cloud Scheduler with batch Dataflow jobs every hour
- BigQuery scheduled queries reading from a staging table
Explanation
Pub/Sub provides durable streaming ingestion and Dataflow supports event-time windowing and stateful aggregation, which is the standard pattern for low-latency streaming feature computation. Object triggers, hourly batch jobs, and scheduled queries introduce batching latency unsuitable for streaming.
Question 39Designing data preparation and processing systems
Your team must ensure that training data stored in BigQuery is reproducible for audits. Which practice most directly supports reproducibility of a feature set?
- Granting all users edit access to the dataset
- Versioning the transformation SQL in source control and pinning snapshots with table clones or snapshots Correct answer.
- Relying on engineers to remember the queries they ran
- Overwriting the source table daily with the latest snapshot
Explanation
Reproducibility requires that the transformation logic be version-controlled and that the exact input data state be preserved, which table snapshots or clones provide. Overwriting tables destroys history, and informal or overly permissive practices undermine auditability.
Question 40Designing data preparation and processing systems
A pipeline reads CSV files from Cloud Storage, but downstream consumers need a schema that evolves as new columns appear. Which approach best handles schema evolution without breaking existing queries?
- Reject any file that contains a new column
- Load into BigQuery with schema autodetect and allow additive columns, then query with explicit column lists Correct answer.
- Drop and recreate the table on every load
- Convert everything to a single STRING column
Explanation
BigQuery supports adding columns to existing tables, and autodetect can infer new fields on load; consumers that select explicit columns remain stable as the schema grows. Collapsing to a single string column or rejecting new fields defeats the purpose, and dropping tables destroys data and breaks consumers.
Question 41Designing data preparation and processing systems
You are preparing a dataset for fine-tuning and notice that one class dominates 95 percent of the examples. Which data preparation step most directly addresses the resulting model bias?
- Increasing the batch size
- Removing the validation split
- Resampling or reweighting classes to balance the training distribution Correct answer.
- Increasing the number of training epochs
Explanation
Class imbalance is addressed at the data level through resampling, synthetic minority examples, or loss reweighting so the model sees a more balanced signal. Batch size, validation removal, and epoch count affect optimization but do not correct the underlying distribution skew.
Question 42Designing data preparation and processing systems
Your organization requires that raw customer text never leaves the project boundary unredacted before being sent to a generative model. Which design satisfies this requirement?
- Store raw text in a public bucket to simplify access
- Run Sensitive Data Protection de-identification in the pipeline before the model call Correct answer.
- Send raw text to the model and redact the response
- Log raw prompts to Cloud Logging for debugging
Explanation
Applying de-identification before the model call ensures sensitive content is transformed while still inside the controlled boundary, satisfying the data-handling requirement. Redacting only responses, exposing data publicly, or logging raw prompts all leak unredacted content.
Question 43Designing data preparation and processing systems
A team wants to compute features from BigQuery data and serve them to a Vertex AI model with low latency at inference time. Which pattern best fits this requirement?
- Cache features in a spreadsheet shared by the team
- Export features nightly to CSV files in Cloud Storage
- Use Vertex AI Feature Store to ingest from BigQuery and serve online Correct answer.
- Query BigQuery directly on every inference request
Explanation
Vertex AI Feature Store ingests feature data from BigQuery and provides both online low-latency serving and offline batch access, avoiding training-serving skew. Nightly CSV exports, per-request warehouse queries, and spreadsheets are too slow or unreliable for online inference.
Question 44Designing data preparation and processing systems
You need to process a very large collection of documents in parallel to generate embeddings, and each document takes several minutes. Which execution model is most cost-effective and scalable?
- A single long-running Compute Engine VM processing documents sequentially
- A Dataflow or Batch job that fans out work across many workers Correct answer.
- A cron job on a personal workstation
- A Cloud Function with a 60-second timeout per document
Explanation
Batch or Dataflow jobs distribute work across many workers with automatic scaling and retry, which suits long per-item processing at scale. A single VM, a short-timeout function, or a personal workstation cannot scale or reliably handle multi-minute tasks.
Question 45Designing data preparation and processing systems
A pipeline joins a large fact table with a small dimension table in BigQuery, and the dimension table is read on every run. Which optimization reduces bytes scanned and cost?
- Use a CROSS JOIN instead of a regular join
- Cluster or partition the fact table and rely on BigQuery to broadcast the small dimension table Correct answer.
- Disable query caching for every run
- Select all columns with SELECT *
Explanation
Partitioning and clustering prune the fact table scan, and BigQuery can efficiently handle small dimension tables in joins, lowering bytes processed and cost. Cross joins explode row counts, SELECT * reads unnecessary columns, and disabling caching forgoes free repeated results.
Question 46Designing data preparation and processing systems
You must ensure that a data preparation pipeline is idempotent so reruns do not create duplicate rows. Which technique best achieves this?
- Writing to a staging table and using MERGE to upsert on a natural key Correct answer.
- Truncating the destination table before every partial load
- Using random partitioning on each run
- Appending results with an auto-generated UUID each run
Explanation
A MERGE statement keyed on a natural or surrogate key inserts new rows and updates existing ones, so rerunning the same batch produces the same final state. Random identifiers, pre-truncation partial loads, and random partitioning all risk duplicates or data loss.
Question 47Designing data preparation and processing systems
A team stores training data in Cloud Storage and wants automatic classification of sensitive content plus the ability to inspect findings before sharing the dataset. Which workflow is appropriate?
- Encrypt the bucket with CMEK and assume all content is safe
- Run a Sensitive Data Protection inspection job and review findings, then apply de-identification Correct answer.
- Copy the data to another project and treat it as anonymized
- Enable uniform bucket-level access and consider the data de-identified
Explanation
An inspection job detects and reports sensitive infoTypes, and after review you can apply de-identification transforms to produce a shareable dataset. Encryption and access controls protect data at rest or restrict access but do not classify or remove sensitive content, and copying data does not anonymize it.
Question 48Designing data preparation and processing systems
You are evaluating whether to use BigQuery external tables over Parquet files in Cloud Storage versus native BigQuery tables for a feature pipeline that runs frequent complex queries. Which consideration favors native tables?
- External tables always provide better query performance for complex joins
- Native tables cannot be partitioned
- Native tables store data in BigQuery's optimized columnar format, improving performance and reducing repeated external reads Correct answer.
- External tables cannot be queried with SQL
Explanation
Native BigQuery tables use the internal columnar storage format and support partitioning and clustering, which generally gives better performance for frequent complex queries than repeatedly scanning external files. External tables are convenient for querying data in place but incur external read overhead.
Question 49Designing data preparation and processing systems
A pipeline must redact sensitive entities from free text while preserving consistent pseudonyms so that the same entity maps to the same token across records. Which Sensitive Data Protection transform should you use?
- Character masking with a fixed mask character
- Bucketing into fixed ranges
- Date shifting by a random offset per record
- Crypto-based tokenization with a deterministic key Correct answer.
Explanation
Crypto-based tokenization with a deterministic key maps the same input value to the same surrogate token, preserving joinability and consistency across records. Masking, date shifting, and bucketing either destroy consistency or are not applicable to free-text entity replacement.
Question 50Designing data preparation and processing systems
You are designing a feature pipeline that must avoid training-serving skew. Which practice most directly prevents skew?
- Computing features with separate code paths for training and serving
- Reusing the same transformation logic for batch training and online serving Correct answer.
- Manually editing feature values before serving
- Training on a different time window than serving uses
Explanation
Training-serving skew arises when features are computed differently in each environment, so sharing one transformation definition (for example via a feature store or shared SQL/UDF) keeps values consistent. Separate code paths, manual edits, and mismatched time windows all introduce divergence.