3.3 Building and Using Google Cloud AI and ML Solutions
Key Takeaways
- BigQuery ML lets analysts train and run ML models directly in BigQuery using standard SQL — logistic regression, k-means clustering, ARIMA forecasting, XGBoost — with no data movement
- Google Cloud pre-trained APIs include Vision API (image understanding and OCR), Natural Language API (text sentiment and entity extraction), Translation API (language translation), Speech-to-Text (audio transcription), and Text-to-Speech (generating audio from text)
- AutoML creates business value by training custom models on your own labeled data without ML coding — AutoML Vision, Video Intelligence, Language, and Tables
- Vertex AI is the unified platform for building, deploying, and managing custom ML models at scale, with MLOps for the full lifecycle and differentiation for data-science teams
- TensorFlow is Google's end-to-end open-source ML toolkit; Cloud TPU is Google's proprietary custom hardware (tensor processing unit) optimized for TensorFlow and high-performance ML training
BigQuery ML: Machine Learning in SQL
BigQuery ML lets you create, train, evaluate, and run machine learning models directly inside BigQuery using standard SQL queries. The key business value: no data movement. Traditionally, to build an ML model you had to extract data from your warehouse, move it to a separate ML environment, train, and move predictions back — slow, costly, and risky. BigQuery ML eliminates that pipeline because the model lives where the data lives.
Analysts who already know SQL can build models without learning Python or a separate ML framework. Supported model types include:
- Logistic regression and linear regression for classification and numeric prediction
- K-means clustering for customer or product segmentation
- ARIMA and ARIMA_PLUS for time-series forecasting (e.g., demand, revenue)
- XGBoost for boosted-tree models on tabular data
- Deep neural network classification/regression for more complex tabular patterns
- Imported TensorFlow models for scoring BigQuery data with a model trained elsewhere
A typical workflow is a few SQL statements: CREATE MODEL, ML.EVALUATE, ML.PREDICT. Because data never leaves BigQuery, governance and security are simpler, and iteration is fast. BigQuery ML is the right choice when your data is already in BigQuery and your team is analyst-centric.
Google Cloud Pre-Trained APIs
Pre-trained APIs give you Google's models — trained on massive datasets — as simple REST/RPC endpoints. You send data in, you get intelligence back. The exam expects you to match each API to its use case.
| API | Capability | Example business use case |
|---|---|---|
| Vision API | Image classification, object detection, OCR (text in images), face and landmark detection | Read text from scanned invoices and forms; classify product photos; detect inappropriate content |
| Natural Language API | Sentiment analysis, entity extraction, syntax analysis, content classification | Route support tickets by topic; detect negative sentiment in reviews; extract people and places from contracts |
| Cloud Translation API | Text translation across 100+ languages, language detection | Localize a website or app instantly; translate customer support chats in real time |
| Speech-to-Text API | Convert audio to text, speaker diarization, punctuation, domain models | Transcribe call center audio for compliance and search; caption video lectures |
| Text-to-Speech API | Generate natural-sounding speech from text in many voices and languages | Produce audio for IVR systems; read news articles aloud for accessibility |
Choosing Among the APIs
Match the input type to the API: image → Vision; text → Natural Language or Translation; audio speech → Speech-to-Text; written text to audio → Text-to-Speech. The exam often mixes these up — remember that Vision includes OCR (text inside images), while Natural Language works on text you already have.
AutoML: Custom Models on Your Data, No ML Coding
AutoML creates business value by letting an organization train custom models on its own labeled data without writing ML code. You upload a labeled dataset (e.g., images tagged with product categories, documents labeled by type, a tabular dataset with a target column), and AutoML handles feature engineering, model selection, hyperparameter tuning, and evaluation. You get a trained model accessible through the same prediction infrastructure as pre-trained APIs.
AutoML products on Google Cloud:
- AutoML Vision — Custom image classification and object detection on your labeled images.
- AutoML Video Intelligence — Custom video classification and object tracking.
- AutoML Natural Language — Custom text classification, sentiment, and entity extraction.
- AutoML Tables — Custom models on structured/tabular data with a target column.
The value story: differentiation without an ML team. A generic Vision API cannot tell your proprietary product variants apart, but AutoML Vision trained on your labeled photos can — and you did not hire a data scientist. The tradeoff is more effort than a pre-trained API (labeling data, evaluating results) but far less than building from scratch.
Vertex AI: Building Custom Models for Differentiation
Vertex AI is Google Cloud's unified ML platform for data-science teams that need full control. It brings training, deployment, experiment tracking, feature stores, model monitoring, and MLOps pipelines into one platform. Where AutoML automates modeling, Vertex AI gives you the steering wheel: you choose the framework (TensorFlow, PyTorch, XGBoost, scikit-learn, JAX), the architecture, the features, and the training pipeline.
How custom models create differentiation:
- Proprietary features — You engineer features no competitor has.
- Proprietary architecture — You can design or fine-tune model architectures for your domain.
- MLOps at scale — Reproducible training pipelines, model registries, versioning, and monitoring let you iterate faster than competitors who script everything by hand.
- End-to-end ownership — From data preparation (Vertex AI Feature Store) through training, evaluation, deployment (endpoints with autoscaling), and drift monitoring.
A payments company with a unique fraud feature pipeline and a dedicated ML team should use Vertex AI because the bespoke model — continuously retrained on proprietary features — is a competitive advantage no off-the-shelf API can match. The cost is expertise and time; the payoff is differentiation.
TensorFlow and Cloud TPU
TensorFlow is Google's end-to-end open-source machine learning framework. It supports the full ML lifecycle — data ingestion, model building, distributed training, serving, and deployment — and is widely used outside Google as well as inside. The exam frames TensorFlow as the toolkit; Cloud TPU as the hardware that accelerates it.
Cloud TPU (Tensor Processing Unit) is Google's proprietary custom hardware designed specifically to accelerate TensorFlow and ML workloads. Compared with general-purpose GPUs, TPUs are optimized for the dense matrix math at the heart of deep learning, and they scale to very large models. Cloud TPU is accessed as a Google Cloud service (TPU VMs, TPU pods) and is especially valuable for large-scale training jobs — language models, image and video models, and recommendation systems.
The pairing: TensorFlow gives you the software stack; Cloud TPU gives you performance. Together they reduce training time for large models from days or weeks to hours, which itself creates business value by shortening the iteration cycle from idea to production.
Product-to-Use-Case Recap
The exam rewards fast, accurate matching. Memorize this summary table:
| Need | Product |
|---|---|
| ML on BigQuery data using SQL | BigQuery ML |
| Read text in scanned documents/images | Vision API (OCR) |
| Analyze sentiment and entities in text | Natural Language API |
| Translate text between languages | Cloud Translation API |
| Transcribe audio to text | Speech-to-Text API |
| Generate speech from text | Text-to-Speech API |
| Custom image model on my labeled data, no ML coding | AutoML Vision |
| Custom model on my tabular data | AutoML Tables or BigQuery ML |
| Full-control custom ML at scale | Vertex AI |
| Open-source ML framework | TensorFlow |
| Hardware optimized for TensorFlow training | Cloud TPU |
Key Takeaways
- BigQuery ML trains models in-place with SQL — no data movement, analyst-friendly, model types include logistic regression, k-means, ARIMA, and XGBoost.
- Five pre-trained APIs — Vision, Natural Language, Translation, Speech-to-Text, Text-to-Speech — each maps to an input/output type.
- AutoML trains custom models on your labeled data without ML coding, differentiating on your domain without a data-science team.
- Vertex AI gives data-science teams full control and MLOps for maximum differentiation.
- TensorFlow is the open-source framework; Cloud TPU is Google's custom silicon that accelerates TensorFlow and large ML training.
A BigQuery analyst wants to forecast next month's product demand using historical sales already stored in BigQuery, without moving the data. Which Google Cloud product is the best fit?
A company wants to analyze the sentiment of thousands of customer support emails that are already in text form. Which Google Cloud pre-trained API should it use?
A manufacturer has 50,000 labeled photos of defective and non-defective parts from its own production line and wants an automated inspection model, but has no ML engineers. What is the most appropriate Google Cloud solution?
Which statement about Vertex AI is correct?
What is the relationship between TensorFlow and Cloud TPU?