Chuyển đến nội dung chính

Bài 2: GCP AI/ML Ecosystem Overview

Vertex AI platform tổng quan. AutoML vs Custom Training. BigQuery ML. Pre-trained APIs (Vision, NLP, Translation). Khi nào dùng service nào — decision tree.

GCP AI/ML Ecosystem

GCP AI/ML Ecosystem: Vertex AI, AutoML, BigQuery ML, Pre-trained APIs và khi nào dùng cái nào

1. GCP ML Landscape Overview

GCP ML Capability Spectrum:

LOW CODE ◄────────────────────────────────────► HIGH CONTROL
  │                        │                           │
  ▼                        ▼                           ▼
Pre-trained APIs      Vertex AI AutoML        Custom Training
(Vision, NLP,         (no code needed,        (full control,
Translation)          you bring data)         you bring code)
  │                        │                           │
No ML expertise       Some domain              ML expertise
needed                expertise               required

BigQuery ML ────── SQL interface for ML on warehouse data

2. Vertex AI — Unified ML Platform

Vertex AI là GCP's unified platform cho toàn bộ ML lifecycle. Hiểu rõ các component là bắt buộc cho kỳ thi.

ComponentPurpose
Vertex AI WorkbenchManaged Jupyter notebooks cho data scientists
Vertex AI TrainingCustom training jobs (CPUs, GPUs, TPUs)
Vertex AI AutoMLNo-code model training (Tabular, Image, Text, Video)
Vertex AI EndpointsDeploy models cho online prediction
Vertex AI Batch PredictionAsynchronous batch scoring
Vertex AI Feature StoreServe features consistently across training/serving
Vertex AI PipelinesKubeflow Pipelines-based ML workflow orchestration
Vertex AI ExperimentsTrack runs, compare metrics
Vertex AI Model RegistryVersion control for models
Vertex AI Model MonitoringDetect feature skew và prediction drift

3. AutoML vs. Custom Training

CriteriaAutoMLCustom Training
ML expertise neededMinimalRequired
Training timeHours (automated)Variable (you control)
Model interpretabilityLimitedFull control
CostHigher per modelPay per compute used
Best forQuick prototypes, standard tasksCustom architectures, research
Supported data typesTabular, Image, Text, VideoAny (you write the code)

Exam tip: Câu hỏi có "team doesn't have ML expertise" hoặc "fastest time to deployment" → AutoML. Câu hỏi có "custom neural architecture" hoặc "full control over training loop" → Custom Training.

4. BigQuery ML

BigQuery ML cho phép train và serve ML models bằng SQL — không cần export data khỏi BigQuery.

Model TypeSQL KeywordUse Case
Linear RegressionLINEAR_REGPrice prediction
Logistic RegressionLOGISTIC_REGClassification
K-Means ClusteringKMEANSCustomer segmentation
XGBoostBOOSTED_TREE_CLASSIFIER/REGRESSORTabular classification/regression
Deep Neural NetworkDNN_CLASSIFIER/DNN_REGRESSORComplex patterns
Matrix FactorizationMATRIX_FACTORIZATIONRecommendations
Imported TF modelsTENSORFLOWCustom TF models

5. Pre-trained AI APIs

APICapabilitiesUse Case
Cloud Vision APILabels, OCR, faces, logos, safe searchImage analysis without training
Cloud Natural Language APIEntities, sentiment, syntax, categoriesText analytics
Cloud Translation API100+ language pairsMulti-language content
Cloud Speech-to-TextTranscription, speaker diarizationAudio processing
Cloud Text-to-SpeechWaveNet voices, SSMLVoice UI, accessibility
Document AIForm parsing, invoice extractionDocument automation
Recommendations AIReal-time product recommendationsE-commerce personalization

6. Service Selection Decision Tree

WHICH GCP ML SERVICE?

Do you have LABELED DATA?
│
├── NO → Pre-trained API sufficient for your task (Vision, NLP)?
│         YES → Use Pre-trained API
│         NO  → Vertex AI Custom Training (unsupervised)
│
└── YES → Is your data already IN BigQuery?
          │
          ├── YES → BigQuery ML (SQL-based, fast, no export)
          │
          └── NO → Need rapid prototyping, no ML team?
                    │
                    ├── YES → Vertex AI AutoML
                    │
                    └── NO  → Vertex AI Custom Training

7. Practice Questions

Q1: A data analytics team has petabytes of customer transaction data in BigQuery. They want to build a churn prediction model using their existing SQL skills without data exports. Which approach is BEST?

  • A) Export to Cloud Storage, then use Vertex AI Custom Training
  • B) Use Cloud Natural Language API
  • C) Use BigQuery ML with CREATE MODEL LOGISTIC_REGRESSION ✓
  • D) Use Vertex AI AutoML Tabular

Explanation: BigQuery ML allows training classification models directly on BigQuery data using SQL, leveraging existing data infrastructure and skills without exporting data. This is the fastest path when data is already in BigQuery.

Q2: A small startup needs to add sentiment analysis to customer reviews. They have no ML team and no labeled sentiment data. Which solution requires the LEAST effort?

  • A) Vertex AI AutoML Text Sentiment
  • B) Train a custom BERT model on Vertex AI
  • C) Cloud Natural Language API sentiment analysis ✓
  • D) BigQuery ML DNN classifier

Explanation: Cloud Natural Language API is a pre-trained, fully managed service that requires no training data, no ML expertise, and no infrastructure setup. Just call the API. AutoML requires labeled sentiment examples; custom BERT requires significantly more expertise.

Q3: Which Vertex AI component should a team use to ensure that feature values used during model training are identical to those served at prediction time?

  • A) Vertex AI Experiments
  • B) Vertex AI Feature Store ✓
  • C) Vertex AI Model Registry
  • D) Vertex AI Pipelines

Explanation: Vertex AI Feature Store provides a centralized repository for storing, serving, and sharing ML features. It ensures training-serving consistency by using the same feature definitions and values for both training and online/batch prediction, preventing training-serving skew.