PMLE · LESSON 1
Section 1: Architecting low-code AI solutions約13% · 2 topics
Learn low-code model building with BigQuery ML and AutoML, and choosing and optimizing models from Model Garden, industry APIs and generative AI.
1.1Building models with BigQuery ML and AutoML
Building models with BigQuery ML and Agent Platform AutoML (classification, regression, forecasting, clustering), feature engineering and prediction in BigQuery ML, and fine-tuning Gemini from BigQuery
Concept
BigQuery ML lets you build models inside BigQuery with the SQL CREATE MODEL statement, so you can do classification (logistic regression, boosted trees), regression, time-series forecasting (ARIMA_PLUS), clustering (k-means) and more without moving data. Preprocessing defined in the TRANSFORM clause is applied automatically at prediction time too. Predict with ML.PREDICT and evaluate with ML.EVALUATE. Agent Platform AutoML builds high-quality models from tabular, image, text and other data with very little code. You can also call and tune Gemini models from BigQuery.
How it works / steps
- If the data is in BigQuery and you want to stay in SQL, use BigQuery ML
- Write preprocessing in the TRANSFORM clause to keep training and prediction consistent
- For accuracy with little effort, use AutoML
- Evaluate with ML.EVALUATE and predict with ML.PREDICT
Workplace example
An analyst builds an ARIMA_PLUS model in SQL on a BigQuery sales table and forecasts next month's sales for each store.
Common confusions and exam tips
- BigQuery ML trains without moving data out
- Without the TRANSFORM clause, you must reproduce preprocessing at prediction time
- Time-series forecasting is ARIMA_PLUS; clustering is k-means
Mini quiz
Q1. Which function makes predictions with a model trained in BigQuery ML?
- EXPORT DATA PREDICT
- ML.PREDICT
- CREATE PREDICTION TABLE
- ML.TRAIN_ALL_ROWS
Show answer and explanation
Answer: B ML.PREDICT
Train with CREATE MODEL, evaluate with ML.EVALUATE, predict with ML.PREDICT.
Q2. What is the most appropriate advantage of BigQuery ML's TRANSFORM clause?
- It automatically decides and adds the number of GPUs needed for training
- It automatically moves training data to Cloud Storage to speed processing
- It automatically applies the same preprocessing at training and prediction
- It converts SQL queries to Python code and runs them in notebooks
Show answer and explanation
Answer: C It automatically applies the same preprocessing at training and prediction
Preprocessing defined in TRANSFORM is saved with the model and applied at prediction too, preventing skew.
Reference links
1.2Choosing and optimizing models from Model Garden, industry APIs and generative AI
Evaluating and choosing models from Model Garden, industry APIs (Document AI, Vision, Translation), tuning Gemini, Imagen, Veo and MaaS models, and optimizing cost, latency and availability of Gemini apps
Concept
Model Garden is a catalog for evaluating and deploying models from Google (Gemini, Imagen, Veo), partners and open models (such as Gemma), and also offers MaaS (Model as a Service) for using models as APIs. Routine tasks can often be solved with pretrained APIs such as Document AI (document parsing), Vision API (images) and Translation API (translation). Gemini apps optimize cost, latency and availability through model size choice, context caching, batch prediction, provisioned throughput and more.
How it works / steps
- First check whether a pretrained API meets the requirements
- Compare candidate models in Model Garden on evaluation data
- If needed, align output with tuning (such as supervised tuning)
- Choose model size and delivery method to fit cost and latency
Workplace example
Invoices are processed by extracting fields with a pretrained Document AI processor, and inquiry summaries are handled cheaply with a lightweight Gemini model and batch prediction.
Common confusions and exam tips
- Building your own model when a pretrained API is enough is inefficient
- Batch prediction suits large workloads that don't need instant responses
- Tuning suits adjusting format and behavior more than adding current facts
Mini quiz
Q1. What is the most appropriate way to use Gemini models in BigQuery?
- Export BigQuery data to CSV each time and paste it into prompts by hand
- BigQuery can't handle generative AI models at all, so move to another database
- Store Gemini's model weights in a BigQuery table and compute directly
- Create a remote model and call it from SQL with generation functions
Show answer and explanation
Answer: D Create a remote model and call it from SQL with generation functions
With remote models and ML.GENERATE_TEXT and the like, you can use Gemini from SQL. Tuning Gemini from BigQuery is also possible.
Q2. When is it most appropriate to fine-tune Gemini using BigQuery?
- Training examples are in BigQuery and you want to tune while staying in SQL
- You want responses in a fixed format, returned reliably as JSON
- You want answers based on searching internal documents
- You want daily answers to reflect news the model does not know
Show answer and explanation
Answer: A Training examples are in BigQuery and you want to tune while staying in SQL
Reflecting the latest information suits grounding and RAG. [Other options] Fresh information and internal documents call for grounding or RAG. Format can be controlled with prompts or structured output.
Reference links
Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.
Notes (unofficial, original questions, no pass guarantee)
- The questions on this site are original practice questions written by this site based on publicly available skills outlines and exam guides. They are not actual exam questions.
- Google Cloud, Gemini, Vertex AI and Google Workspace are trademarks of Google LLC. This site is not affiliated with or endorsed by Google.
- This content is a study aid and does not guarantee a pass. Exam content, format and prerequisites may change without notice; always check the latest information on the official page before taking the exam.
- Your accuracy on the mock exam cannot be converted to the official (scaled) score and does not predict a pass or fail.
- Progress is saved only in this browser (localStorage) unless you sign in with Google to sync it. You can delete it from the Cookie & storage settings page (Japanese).