GCP: Overview
College Credits
Google learning and cloud content divides into at least the following kinds:
- Google Certification
- Proctored examinations through Pearson.
- These are not ACE College Credit eligible in-of-themselves (although they are more valuable professionally).
- Google Certificates
- Through skills.google/
- Not all Google Courses, Labs, etc. result in a Certificate.
- In fact only a handful do - and of these only those described here are ACE College Credit eligible.
- Coursera Certificates
- These are offered through Coursera but don't automatically confer a Google Certificate nor a Google Certification.
- These don't appear to be ACE College Credit eligible.
Idioms
Ways that Google defines/does things:
- PaaS - a "type of cloud computing service lets you bind your application code to libraries that give access to the infrastructure your application needs".
- FaaS - Function-as-a-Service a subset of PaaS.
- Virtual Private Cloud (VPC) - a "secure, individual, private cloud-computing model hosted within a public cloud".
Some Quick Comparison with AWS
Subnets
- Are actually Regional (spanning multiple Zones) in GCP.
- (In AWS, these are restricted to single Available Zones.)
Cloud Load Balancer
- Load balances between Compute Engine Regions in GCP.
- (In AWS, these typically load balance within the same Region althought there are some exceptions)
Projects
- Permissions, environments, etc. are usually grouped by Project in GCP.
- (In AWS, these are usually grouped by Account or Organizational Unit.)
Billing
- Projects require a Billing Account to use paid features.
- Billing Account are associated with one or more Projects.
Google App Engine's most direct comparison is AWS Lightsail.
- Developers focus solely on source code (rather than the underlying infrastructure), to quickly skaffold and deploy apps.
GKE vs. EKS
- Respective Kubernetes Services
- GKE is classified as a PaaS using GCP's classification taxonomies.
Cost Summary
- Generally, AWS is better for high-traffic, resource and data intensive Enterprise operations (it has slightly better discount data and I/O rates, better Instance Reservation discounts, and better pricing for Large Tier Instances and SSD).
- At scale, GCP quickly becomes more expensive.
- GCP is slightly more cost-performant (roughly
10%) for low-volume, low-traffic, Applications demanding smaller Containers and Compute Instances.- It's also often considered to have better NVIDIA and GPU support although AWS has continued to mature its offerings.
Studies, models, cost comparisons:
- https://www.qovery.com/blog/google-cloud-vs-aws-cost-breakdown-by-service
- https://spot.rackspace.com/blog/cloud-computing-cost
- https://www.usage.ai/blogs/finops/multi-cloud/cloud-pricing-comparison/
Resources and Links
- https://docs.aws.amazon.com/whitepapers/latest/real-time-communication-on-aws/cross-region-dns-based-load-balancing-and-failover.html
- https://www.acenet.edu/National-Guide/Pages/Organization.aspx?oid=3fdb1492-e04f-e911-a97b-000d3a363c81
- https://www.qovery.com/blog/google-cloud-vs-aws-cost-breakdown-by-service
- https://spot.rackspace.com/blog/cloud-computing-cost
- https://www.usage.ai/blogs/finops/multi-cloud/cloud-pricing-comparison/
GCP: Google Cloud Computing Foundations Certificate
Cloud Computing Fundamentals
Notes.
Best ways to interact with Google Cloud Resources:
- Google Cloud CLI
- Google Cloud Console
- Official Google Cloud Client Libraries and Google API Client Libraries
Useful Google Cloud Shell Commands
Used in many Google Skill Labs and Challenges.
Note that the early Skill Labs and Challenges tend to be Imperative (emphasizing sequences of CLI commands for new users to gain familiarity).
Google Cloud Shell (gcloud through the interactive terminal):
gcloud config set compute/region asia-southeast1
gcloud config get-value compute/region
gcloud config set compute/zone asia-southeast1-a
gcloud config get-value compute/zone
gcloud compute project-info describe --project $(gcloud config get-value project)
# Define an Environment Variable
export PROJECT_ID=$(gcloud config get-value project)
export ZONE=$(gcloud config get-value compute/zone)
export REGION=$(gcloud config get-value compute/region)
echo -e "PROJECT ID: $PROJECT_ID\nZONE: $ZONE\nZONE: $REGION"
Resources and Links
GCP: CCF VMs
Virtual Machines
# Create VM
## Used in several skill labs
gcloud compute instances create www1 --machine-type e2-medium --zone $ZONE
gcloud compute instances create www2 \
--zone=asia-southeast1-b \
--tags=network-lb-tag \
--machine-type=e2-small \
--image-family=debian-12 \
--image-project=debian-cloud \
--metadata=startup-script='#!/bin/bash
apt-get update
apt-get install apache2 -y
service apache2 restart
echo "<h3>Web Server: www1</h3>" | tee /var/www/html/index.html'
## Then list and filter them
gcloud compute instances list
gcloud compute instances list --filter="name=('www1')"
# SSH
gcloud compute ssh www2 --zone $ZONE
# Deploy contents of current directory to App Engine
gcloud app deploy
gcloud app browse
Resources and Links
GCP: CCF Compute
Compute Services Comparison
| Service | Description | Workload | Type |
|---|---|---|---|
| GCP Compute Engine | Configurable Virtual Machines. | VM's | IaaS |
| GCP App Engine | Quickly deploying Applications from Source Code. | Managed Serverless Applications | PaaS |
| GCP Cloud Run | Deploy Fully Managed Containerized Applications. | Managed Serverless Containers | PaaS |
| GCP Cloud Run Functions | Serverless Function execution environment. | Serverless Functions | FaaS (PaaS) |
| GCP Google Kubernetes Engine | Managed Kubernetes Service. | Serverless Kubernetes, Containers/Pods | PaaS |
Resources and Links
GCP: CCF Load Balancers
Load Balancers
gcloud config set compute/region asia-southeast1
gcloud config set compute/zone asia-southeast1-b
export ZONE=$(gcloud config get-value compute/zone)
export REGION=$(gcloud config get-value compute/region)
Network Load Balancer:
gcloud compute instances create web1 \
--zone=$ZONE\
--tags=network-lb-tag \
--machine-type=e2-small \
--image-family=debian-12 \
--image-project=debian-cloud \
--metadata=startup-script='#!/bin/bash
apt-get update
apt-get install apache2 -y
service apache2 restart
echo "<h3>Web Server: web1</h3>" | tee /var/www/html/index.html'
gcloud compute firewall-rules create www-firewall-network-lb \
--target-tags network-lb-tag --allow tcp:80
gcloud compute addresses create network-lb-ip-1 \
--region $REGION
gcloud compute http-health-checks create basic-check
gcloud compute target-pools create www-pool \
--region $REGION --http-health-check basic-check
gcloud compute target-pools add-instances www-pool \
--instances web1,web2,web3
gcloud compute forwarding-rules create www-rule \
--region $REGION \
--ports 80 \
--address network-lb-ip-1 \
--target-pool www-pool
Application Load Balancer:
- Managed Instance Group - akin to an Autoscaling Group.
- Backend Service - akin to a Target Group, how the Managed Instance Group is associated with the Load Balancer.
- Target HTTP Proxy - akin to AWS ELB Listeners.
- URL Maps, Global Forwarding Rule - akin to AWS Route 53 Records.
gcloud compute instance-templates create lb-backend-template \
--region=$REGION \
--network=default \
--subnet=default \
--tags=allow-health-check \
--machine-type=e2-medium \
--image-family=debian-12\
--image-project=debian-cloud \
--metadata=startup-script='#!/bin/bash
apt-get update
apt-get install apache2 -y
a2ensite default-ssl
a2enmod ssl
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
http://169.254.169.254/computeMetadata/v1/instance/name)"
echo "Page served from: $vm_hostname" | \
tee /var/www/html/index.html
systemctl restart apache2'
# Managed Instance Group
## Automatically creates and associates VM Instances
## using the Template created above.
gcloud compute instance-groups managed create lb-backend-group \
--template=lb-backend-template --size=2 --zone=$ZONE
# Health Checks, Firewall Rules
## Make sure the Tags match!
gcloud compute firewall-rules create fw-allow-health-check \
--network=default \
--action=allow \
--direction=ingress \
--source-ranges=130.211.0.0/22,35.191.0.0/16 \
--target-tags=allow-health-check \
--rules=tcp:80
gcloud compute addresses create lb-ipv4-1 \
--ip-version=IPV4 \
--global
gcloud compute health-checks create http http-basic-check \
--port 80
# Create the Backend Service...
gcloud compute backend-services create web-backend-service \
--protocol=HTTP \
--port-name=http \
--health-checks=http-basic-check \
--global
## ...and Associate the Managed Instance Group
gcloud compute backend-services add-backend web-backend-service \
--instance-group=lb-backend-group \
--instance-group-zone=asia-southeast1-b \
--global
# Expose the Application Load Balancer
gcloud compute url-maps create web-map-http \
--default-service web-backend-service
## And define listeners
gcloud compute target-http-proxies create http-lb-proxy \
--url-map web-map-http
gcloud compute forwarding-rules create http-content-rule \
--address=lb-ipv4-1\
--global \
--target-http-proxy=http-lb-proxy \
--ports=80
Resources and Links
GCP: CCF Security
Secure a Bastion
export ZONE="asia-south1-b"
export REGION="asia-south1"
export TAG_ONE=accept-ssh-iap-ingress-ql-609
export TAG_TWO=accept-http-ingress-ql-609
export TAG_THREE=accept-ssh-internal-ingress-ql-609
gcloud compute firewall-rules delete open-access
gcloud compute instances start bastion --zone=$ZONE
gcloud compute instances add-tags bastion \
--zone=$ZONE \
--tags=$TAG_ONE
gcloud compute firewall-rules create allow-ssh-iap-ingress \
--network acme-vpc \
--direction=INGRESS \
--action=ALLOW \
--rules=tcp:22 \
--source-ranges=35.235.240.0/20 \
--target-tags=$TAG_ONE
gcloud compute instances add-tags juice-shop \
--zone=$ZONE \
--tags=$TAG_TWO
gcloud compute firewall-rules create allow-http-juice-shop \
--network acme-vpc \
--direction=INGRESS \
--action=ALLOW \
--rules=tcp:80 \
--source-ranges=0.0.0.0/0 \
--target-tags=$TAG_TWO
gcloud compute instances add-tags juice-shop \
--zone=$ZONE \
--tags=$TAG_THREE
## Subnet must be represented by exact IP Range
### Fetch it
export MGMT_SUBNET_RANGE=$(gcloud compute networks subnets describe acme-mgmt-subnet \
--region=$REGION \
--format="value(ipCidrRange)")
gcloud compute firewall-rules create allow-ssh-internal-ingress \
--network=acme-vpc \
--direction=INGRESS \
--action=ALLOW \
--rules=tcp:22 \
--source-ranges=$MGMT_SUBNET_RANGE \
--target-tags=$TAG_THREE
## SSH in then run
gcloud compute ssh juice-shop --internal-ip
Resources and Links
GCP: CCF Data and Storage
Big Query Dataflow
gcloud services disable dataflow.googleapis.com --project qwiklabs-gcp-02-3087b0d6e7e5 --force
gcloud services enable dataflow.googleapis.com --project qwiklabs-gcp-02-3087b0d6e7e5
bq mk lab_737
## Create Table in the UI
## Create Bucket in the UI
## Create Dataflow from batch template "Text Files on Cloud Storage to BigQuery"
Managed Apache Spark
gcloud dataproc clusters create example-cluster \
--region=us-central1 \
--master-machine-type=n2d-standard-2 \
--master-boot-disk-type=pd-standard \
--master-boot-disk-size=100GB \
--worker-machine-type=n2d-standard-2 \
--worker-boot-disk-type=pd-standard \
--worker-boot-disk-size=100GB \
--num-workers=2
## Create a Job through the UI
GCP Databases
| Service | Description | Type |
|---|---|---|
| GCP Spanner | Globally distributed, strongly consistent SQL relational database for structured data. | Managed, SQL |
| GCP Firestore | Serverless NoSQL document database for semi-structured and unstructured data. | Managed, NoSQL |
| GCP Bigtable | Scalable NoSQL wide-column database for large-scale, low-latency structured and semi-structured data (time series, telemetry). | Managed, NoSQL |
| GCP Cloud Storage | Scalable object storage for unstructured data such as files, images, videos, and backups. | Managed, Blob |
| GCP Cloud SQL | Managed relational database service for MySQL, PostgreSQL, and SQL Server with structured data. | Managed, SQL |
Of course other Databases can still be deployed and used (say from GCP Cloud Marketplace) but these aren't Managed by Google and aren't GCP products themselves (varying licensing).
A relevant example is MongoDB:
- Unlike AWS, MongoDB isn't a full Service offering (GCP has fewer native NoSQL solutions overall).
- MongoDB can still be provisioned on a VM, through GKE, or via Managed (Enterprise) Atlas MongoDB (third-party Management through MongoDB Inc., not GCP itself).
Resources and Links
GCP: CCF Machine Learning
Google Cloud Speech-to-Text
## Create an API Key
export API_KEY=<YOUR_API_KEY>
## SSH into a Linux VM
touch request.json
nano request.json
## Copy contents into request.json
### {
### "config": {
### "encoding":"FLAC",
### "languageCode": "en-US"
### },
### "audio": {
### "uri":"gs://cloud-samples-tests/speech/brooklyn.flac"
### }
### }
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \
"https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}"
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \
"https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}" > result.json
## Upload and rename result.json to and within the relevant bucket
Cloud Natural Language API
export GOOGLE_CLOUD_PROJECT=$(gcloud config get-value core/project)
gcloud iam service-accounts create my-natlang-sa \
--display-name "my natural language service account"
gcloud iam service-accounts keys create ~/key.json \
--iam-account my-natlang-sa@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com
export GOOGLE_APPLICATION_CREDENTIALS="/home/USER/key.json"
## SSH into a VM
gcloud ml language analyze-entities --content="Old Norse texts portray Odin as one-eyed and long-bearded, frequently wielding a spear named Gungnir and wearing a cloak and a broad hat." > result.json
## Upload and rename result.json to and within the relevant bucket
Resources and Links
GCP: Associate Cloud Engineer Certification
https://cloud.google.com/learn/certification/cloud-engineer/
I'd highly recommend this great Udemy course.
gcloud
For many gcloud compute operations, these are two primary commands (not compute/zone) since many GCP Compute Engine Resources are multi-Zone.
gcloud auth login
gcloud config set project my-project
Application Default Credentials
GOOGLE_APPLICATION_CREDENTIALSused to find your Service Account JSON Key File.- This will be automatically discovered once set through Application Default Credentials (ADC).
https://docs.cloud.google.com/docs/authentication/application-default-credentials
Resources and Links
GCP: ACE Organization
Cloud Billing
Centralized Cloud Billing Account
- A Centralized Cloud Billing Account is typically associated with an entire Organization (and all billable Resources through their respective Projects).
- A Centralized Cloud Billing Account can add company credit cards, grant access to those payment methods (but without sharing payment method details like a card card number).
- Engineers can be granted the
Project Creator(roles/resourcemanager.projectCreator) andBilling Account User(roles/billing.user) Roles to both create new Projects and associate them with a Cloud Billing Account or Organization.
gcloud
For many gcloud compute operations, these are two primary commands (not compute/zone) since many GCP Compute Engine Resources are multi-Zone.
gcloud auth login
gcloud config set project my-project
IAM
GCP Hierarchy
- GCP Organization - consist of one or more GCP Folders.
- GCP Folders - consist of one or more GCP Projects.
- GCP Projects - consist of one or more GCP Services.
GCP Organization Policies apply at the GCP Organization level and are akin to:
- AWS Permission Boundaries and AWS Service Control Policies.
- GCP Organization Policies apply Constraints to all/specific Folders, Projects within the Organization (rather than
ALLOW/DENYstatements).
Billing typically happens at the GCP Project level.
https://docs.cloud.google.com/iam/docs/resource-hierarchy-access-control
Resources and Links
GCP: ACE Compute
Google Cloud Dynamic Workload Scheduler
| Consumption option | Best for | Capacity assurance | Lifespan | Preemptible | Quota | Discounts |
|---|---|---|---|---|---|---|
| Flex-start | Short-duration workloads up to seven days that can wait for capacity. | Best-effort | Up to seven days | No | Preemptible quota | Discounted (up to 53%) on supported series |
| Spot VMs | Fault-tolerant, short-duration general GPU workloads. | Best-effort | Preemptible | Yes | Preemptible quota | Deeply discounted (up to 91%) |
| Standard Reservations | Critical general GPU workloads that require a very high level of assurance for capacity. | Very high | Very high | User-defined | No | No quota consumed |
| Future Reservations | Large-scale, long-running training on clustered GPU. | Very high | Unlimited within the reservation period. | No | Automatically increased | Discounted (up to 53%) with CUDs |
| Future Reservations in Calendar Mode | Clustered GPU workloads up to 90 days that require reserved capacity. | Very high | Up to 90 days | No | No quota consumed | Discounted (up to 53%) |
| On-Demand VMs | General GPU workloads with no specific duration. | Best-effort | Unlimited | No | On-demand quota | None (pay-as-you-go) |
https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler
Cloud Run Functions vs. Cloud Tasks
| Entity | Service | Description | Execution | Use Scenario | Retries |
|---|---|---|---|---|---|
| Cloud Tasks | Cloud Tasks | Fully managed work-queing and dispatching Service. | Does not itself execute code. | Queuing scheduled jobs (calling Cloud Run Functions at a specific time). | In-built exponential back-off. |
| Cloud Run Functions | Cloud Run | Lightweight serverless compute Functions. | Handling and code execution. | Handling business logic. | Relies on calling Service or trigger. |
Both are commonly used together:
- A specific action is initiated by a Cloud Task acting as a Client that calls some Cloud Run Function.
- The Cloud Run Function processes/handles that Request eventually returning the Response back the to calling Cloud Task.
Compute Services
Minimum number of Instances:
- GCP App Engine Flexible Environment cannot scale an active application version down to
0Instances. - GCP Cloud Run can.
GCP Compute Engine Preemptible VMs can only run for up to 24 hours.
Service Accounts
GCP recommends creating a Service Account and attaching that to a Compute Engine VM with minimal IAM Roles sufficient to perform its tasks.
Resources and Links
GCP: ACE Load Balancers
Network Load Balancers
Passthrough Network Load Balancers don't terminate the Connection between the Client and target.
By contrast:
- Network Load Balancer with TCP Proxy will first terminate the Connection between the Client and Load Balancer.
- Then open a Connection from Load Balancer to the target.
DNS
CNAME entries can't be associated with AWS Route 53 roots or GCP Load Balancer IP Addresses directly so in both cases:
- Use an
ALIAS(Arecord).
Resources and Links
GCP: ACE Networking
Shared VPC
- Create a Shared VPC in a Project (Host Project).
- Attach Projects to the Host Project.
- Hierarchical Rules, IAM Roles, Firewall Policies, etc. apply.
Resources and Links
GCP: ACE Deployments
Resource Management, Deployments
Managed Instance Group
- Will apply updates automatically if set to
proactive. - https://docs.cloud.google.com/compute/docs/instance-groups/updating-migs
GCP Config Connector
- Allows GCP Resources to be managed through Kuberetes.
GCP Application Design Center
- GCP Service akin to AWS Service Catalog that allows approved Terraform templates to be shared and used.
- https://docs.cloud.google.com/application-design-center/docs/application-centric-google-cloud
GCP Infrastructure Manager
- Newer GCP Service that manages Terraform configurations, deployments, etc. automatically.
- Akin to AWS Cloud Formation
Deployment Strategy (very high-level overview):
| Service | Target Unit | Splitting Criteria/Mechanism | Best Use Case |
|---|---|---|---|
| App Engine | Versions | IP Address or HTTP Cookies | Persistent A/B Testing with consistent user routing |
| Cloud Run | Immutable Revisions | Direct Percentage Allocation per Container Snapshot | Canary Deployments and instant operational rollbacks |
| GKE | Kubernetes Services | HTTPRoute weights, URL Paths, or custom Headers | Complex microservices, routing, Resource, and Kubernetes Deployments |
Resources and Links
- https://docs.cloud.google.com/compute/docs/instance-groups/updating-migs
- https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler
- https://docs.cloud.google.com/vpc/docs/private-service-connect
- https://docs.cloud.google.com/vpc/docs/private-services-access
- https://docs.cloud.google.com/vpc/docs/private-google-access
- https://www.skills.google/paths/11/course_templates/1403
- https://medium.com/google-cloud/part-i-gke-managed-dranet-with-tpus-ece22b31e4d9
- https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/examples/gke-tpu-v6e
- https://docs.cloud.google.com/kubernetes-engine/docs/concepts/about-gke-inference-gateway
- https://docs.cloud.google.com/application-design-center/docs/application-centric-google-cloud
- https://docs.cloud.google.com/tasks
- https://docs.cloud.google.com/alloydb/docs/overview
- https://cloud.google.com/database-migration
- https://docs.cloud.google.com/iam/docs/resource-hierarchy-access-control
GCP: ACE GKE
Features
Inference Gateway:
GKE Autopilot
- Teams can still manage Deployments, Services, ConfigMaps, and Horizontal Autoscaling policies.
- GCP will handle configuration and management of worker Nodes, Node Pools, and most Cluster infrastructure.
GKE Kubernetes LoadBalancer is the primary way to expose access to the Public Internet. (Not ClustIP which is used for coordinating IP Addresses within the Clusters.)
Resources and Links
GCP: ACE Machine Learning
XLA
Accelerated Linear Algebra (XLA) integrates with existing, widely used, ML libraries while offering deep compiler-level optimizations:
PyTorch/XLAJAX/XLA
GKE TPU
Kubernetes added DRA in 2025:
ResourceClaimswere added then as well.- Kubernetes workloads are often used to manage AI workloads in the cloud (GKE, TPU, DRA).
See:
- https://www.skills.google/paths/11/course_templates/1403
- https://medium.com/google-cloud/part-i-gke-managed-dranet-with-tpus-ece22b31e4d9
- https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/examples/gke-tpu-v6e
Resources and Links
- https://www.skills.google/paths/11/course_templates/1403
- https://medium.com/google-cloud/part-i-gke-managed-dranet-with-tpus-ece22b31e4d9
- https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/examples/gke-tpu-v6e
- https://docs.cloud.google.com/kubernetes-engine/docs/concepts/about-gke-inference-gateway
GCP: ACE Data and Storage
Other Database Services
GCP AlloyDB (for PostgresSQL)
- Fully managed PostgresSQL on GCP.
- Significantly faster performance than traditional PostgresSQL.
- Massive scaling capabilities (vastly exceeding what PostgresSQL can handle data-wise).
- Horizontal READ and vertical scaling.
- Cost-efficient High Availability Node and READ Pool sharing of storage layer.
- Built in AI Assistance.
GCP Database Migration Service
- Available for MySQL, PostgreSQL, SQL Server, and Oracle databases.
- Typical migration paths are to GCP CloudSQL or (if Postgres) to GCP AlloyDB.
- Can migrate from AWS RDS and AWS Aurora to GCP CloudSQL
BigQuery
- An OLAP Query Engine and Data Warehouse, not a Database.
- Sometimes used with GCP Bigtable (NoSQL Database) to offload costly operations from Bigtable.
- Useful for adhoc SQL Queries against massive datasets.
INFORMATION_SCHEMAprovides real-time metadata (not just Table or configuration data).
Backup and Export
GCP Cloud SQL Exports are complete, portable, logical copy of a Database.
GCP Cloud SQL Backups are Service-managed (and hence aren't standalone).
Storage
| Storage Option | Service or Feature | Type | Interface | Ephermeral | Description | Cost | Performance |
|---|---|---|---|---|---|---|---|
| Local SSD | Feature | Local block storage | VM | Yes | Very fast temporary storage for caching, scratch space, and transient processing. | π²π² | β‘β‘β‘β‘ |
| RAM / tmpfs | Feature | Memory-backed storage | Local filesystem | Yes | Ultra-fast temporary filesystem storage backed by VM memory. | π² | β‘β‘β‘β‘β‘ |
| Persistent Disk | Feature | Block storage | VM | No | Durable block storage for OS disks, databases, and applications that persists independently of the VM. | π²π² | β‘β‘β‘ |
| Hyperdisk | Feature | High-performance block storage | VM | No | Configurable, high-performance block storage for demanding databases and analytics workloads. | π²π²π² | β‘β‘β‘β‘ |
| Boot Disk | Feature | Block storage | VM | No | Persistent storage containing a VM's operating system and boot files, backed by Persistent Disk or Hyperdisk. | π²π² | β‘β‘β‘ |
| Hyperdisk Storage Pools | Feature | Block-storage capacity pool | VM | No | Shared pools of Hyperdisk capacity that simplify storage provisioning across large VM fleets. | π²π²π² | β‘β‘β‘β‘ |
| Cloud Storage | Service | Object storage | API / HTTP(S) | No | Managed object storage for backups, media, data lakes, and long-term archives. | π² | β‘β‘β‘ |
| Filestore | Service | Managed file storage | NFS | No | Managed shared file storage for enterprise applications and workloads requiring NFS. | π²π²π² | β‘β‘β‘ |
| Managed Lustre | Service | Parallel file storage | Lustre | No | Managed high-throughput parallel file storage designed for HPC, AI/ML, and scientific workloads. | π²π²π² | β‘β‘β‘β‘β‘ |
| NetApp Volumes | Service | Enterprise file storage | NFS / SMB | No | Managed enterprise file storage for applications, file shares, and demanding database workloads. | π²π²π² | β‘β‘β‘β‘ |
Resources and Links
GCP: ACE Pub/Sub
Pub/Sub
export SUBSCRIPTION_NAME=my-subscription-name
gcloud pubsub subscriptions list
gcloud pubsub subscriptions describe $SUBSCRIPTION_NAME
## Pull messages from a pull-based subscription
gcloud pubsub subscriptions pull $SUBSCRIPTION_NAME --limit=5
## Acknowledge receipt
gcloud pubsub subscriptions ack $SUBSCRIPTION_NAME --ack-ids=ACK_ID
Resources and Links
GCP: ACE AWS
Comparison with AWS
Observability Analytics is GCPβs recommended capability for running SQL queries directly against log data stored in GCP Cloud Logging.
- This is analogous to persisting logs to an AWS S3 Bucket then using AWS Athena to query over them.
Private Service Connect Endpoint
- Can assign a specific Private, Internal, IP Address to a (Google) Service within a VPC.
- This uses NAT and Forwarding Rules to route traffic to that target Service.
- https://docs.cloud.google.com/vpc/docs/private-service-connect
- Comparable to AWS PrivateLink.
Private Google Access
- VM's in a Subnet without External IP Addresses can connect directly with Google API's through their (the Google API's) default Public IP Addresses.
- Comparable to AWS VPC Interface Endpoints.
Attached Service Accounts are attached directly to a Resource (like a VM) and are analogous to both an AWS Task Role and AWS Task Execution Role.
- GCP Resources can also Impersonate GCP Service Accounts (analogous to AWS STS Assume).
Resources and Links
GCP: PCA GKE
GKE
| Problem | Solution |
|---|---|
| Need more pods | Horizontal Pod Autoscaler (HPA) |
| Need more nodes | Cluster Autoscaler |
| Pods need different resource requests | Vertical Pod Autoscaler (VPA) |
| Pods are Pending because the cluster lacks capacity | Cluster Autoscaler |
Recollect that Kubernetes Secrets are akin to Kubernetes Config Maps but are specifically intended to store Secrets.
Useful Google Cloud Shell Commands
Used in many Google Skill Labs and Challenges.
export PROJECT_ID="qwiklabs-gcp-01-00ab3bd88327"
export REGION="us-central1"
export ZONE="us-central1-a"
export CLUSTER_NAME="hello-world-uuyh"
export NAMESPACE_NAME="gmp-t3gp"
export REPO_NAME="demo-repo"
export SERVICE_NAME="helloweb-service-5t69"
export DEFAULT_CLUSTER_VER=$(gcloud container get-server-config)
## Create Cluster with specified settings
gcloud container clusters create $CLUSTER_NAME \
--zone=$ZONE \
--release-channel=regular \
--cluster-version=$DEFAULT_CLUSTER_VER \
--enable-autoscaling \
--num-nodes 3 \
--min-nodes 2 \
--max-nodes 6
## This has to be run for credit
gcloud container clusters update $CLUSTER_NAME \
--zone=$ZONE \
--enable-managed-prometheus
## Create Namespace
kubectl create ns $NAMESPACE_NAME
## Download yaml
gcloud storage cp gs://spls/gsp510/prometheus-app.yaml .
### Edit
nano prometheus-app.yaml
## Deploy into the Namespace
kubectl -n $NAMESPACE_NAME apply -f prometheus-app.yaml
## Download yaml
gcloud storage cp gs://spls/gsp510/pod-monitoring.yaml .
### Edit
nano pod-monitoring.yaml
kubectl -n $NAMESPACE_NAME apply -f pod-monitoring.yaml
## Download yaml
gcloud storage cp -r gs://spls/gsp510/hello-app/ .
### Edit
cd hello-app/manifests
nano helloweb-deployment.yaml
## Deploy
kubectl create -f helloweb-deployment.yaml
## Use this filter in 'Logs explorer'
### "Error: InvalidImageName" OR "Failed to apply default image tag \"<todo>\": couldn't parse image name \"<todo>\": invalid reference format"
### severity="WARNING"
### resource.type="k8s_pod"
## This was unnecessarily convoluted
### The lab says that the repo is already created, it isn't...
### I finally figured out that you have to create it like so
export REPO_NAME=demo-repo
gcloud auth configure-docker $REGION-docker.pkg.dev
gcloud artifacts repositories list
docker build -t $REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/hello-app:v2 .
gcloud artifacts repositories create $REPO_NAME \
--repository-format=docker \
--location=$REGION \
--description="Docker repository for lab"
docker push $REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/hello-app:v2
## Expose the deployment through an external kubernetes loadbalancer
kubectl expose deployment helloweb --name=helloweb-service-5t69 --type=LoadBalancer --port=8080 --target-port=8080
https://docs.cloud.google.com/sdk/gcloud/reference/container/clusters/create
export REGION=europe-west1
export ZONE=europe-west1-c
export PROJECT=qwiklabs-gcp-01-8dd3c7a798ca
gcloud config set compute/region $REGION
gcloud config set compute/zone $ZONE
source <(gcloud storage cat gs://spls/gsp318/script.sh)
gcloud storage cp gs://spls/gsp318/valkyrie-app.tgz .
tar -xzf valkyrie-app.tgz
cd valkyrie-app
touch Dockerfile
nano Dockerfile
## FROM golang:1.10
## WORKDIR /go/src/app
## COPY source .
## RUN go install -v
## ENTRYPOINT ["app","-single=true","-port=8080"]
cat Dockerfile
docker build -t valkyrie-dev:v0.0.1 .
docker images
# Find ImageID
## export IMAGEID=
docker run -p 8080:8080 $IMAGEID &
docker ps -a
gcloud auth configure-docker $REGION-docker.pkg.dev
docker images
# Retag
export REPONAME=valkyrie-repo
## Use this exact name going forward
export IMAGEID=valkyrie-dev:v0.0.1
docker tag valkyrie-dev:v0.0.1 $REGION-docker.pkg.dev/$PROJECT/$REPONAME/$IMAGEID
gcloud artifacts repositories create $REPONAME \
--repository-format=docker \
--location=$REGION \
--description="Docker repository for lab"
## Verify
docker images
## Push
docker push $REGION-docker.pkg.dev/$PROJECT/$REPONAME/$IMAGEID
# Deployment and Expose 80
## Replace with the above
## e.g. - europe-west1-docker.pkg.dev/qwiklabs-gcp-01-8dd3c7a798ca/valkyrie-repo/valkyrie-dev:v0.0.1
nano k8s/deployment.yaml
cat k8s/deployment.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl expose deployment valkyrie-dev --name=valkyrie-dev --type=LoadBalancer --port=80 --target-port=80
# Info
kubectl get pods
gcloud compute instances list
kubectl get services
## Find CONTAINERID
export CONTAINERID=
docker logs $CONTAINERID
Resources and Links
GCP: PCA Terraform
Useful Google Cloud Shell Commands
Used in many Google Skill Labs and Challenges.
https://www.skills.google/paths/12/course_templates/636/labs
This lab uses "Modules" that are actually "Resource" definitions. This was confusing to me.
You have to install tf in the outer shell (not from within the Open Editor).
Create necessary files:
terraform --version
export REGION=europe-west1
export ZONE=europe-west1-d
export PROJECT=qwiklabs-gcp-02-1ec38e8c48e3
touch main.tf
touch variables.tf
mkdir modules && mkdir modules/instances
touch modules/instances/instances.tf
touch modules/instances/outputs.tf
touch modules/instances/variables.tf
mkdir modules/storage
touch modules/storage/storage.tf
touch modules/storage/outputs.tf
touch modules/storage/variables.tf
Create root variables.tf:
cat << EOF > variables.tf
variable "region" {
type = string
default = "$REGION"
}
variable "zone" {
type = string
default = "$ZONE"
}
variable "project_id" {
type = string
default = "$PROJECT"
}
EOF
Prepare instances.tf:
cat << EOF > modules/instances/instances.tf
resource "google_compute_instance" "tfinstance1" {
name = "tf-instance-1"
machine_type = "e2-micro"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
resource "google_compute_instance" "tfinstance2" {
name = "tf-instance-2"
machine_type = "e2-micro"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
EOF
Prep main.tf:
cat << EOF > main.tf
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}
module "instances" {
source = "./modules/instances"
}
EOF
So one can import by the instance name: tf-instance-1 rather than the id:
terraform init
terraform fmt
terraform import 'module.instances.google_compute_instance.tfinstance1' projects/$PROJECT/zones/$ZONE/instances/tf-instance-1
terraform import 'module.instances.google_compute_instance.tfinstance2' projects/$PROJECT/zones/$ZONE/instances/tf-instance-2
terraform show
terraform plan
terraform apply --auto-approve
export BUCKET=tf-bucket-963122
cat << EOF > modules/storage/storage.tf
resource "google_storage_bucket" "storage-bucket" {
name = "$BUCKET"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}
EOF
Prep main.tf:
cat << EOF > main.tf
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}
module "instances" {
source = "./modules/instances"
}
module "storage" {
source = "./modules/storage"
}
EOF
terraform fmt
terraform init
terraform apply --auto-approve
The Bucket must be created in GCP before switching backends over:
cat << EOF > main.tf
terraform {
backend "gcs" {
bucket = "$BUCKET"
prefix = "terraform/state"
}
}
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}
module "instances" {
source = "./modules/instances"
}
module "storage" {
source = "./modules/storage"
}
EOF
terraform init -migrate-state
Update instances.tf with the correct tfinstance3.name:
cat << EOF > modules/instances/instances.tf
resource "google_compute_instance" "tfinstance1" {
name = "tf-instance-1"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
resource "google_compute_instance" "tfinstance2" {
name = "tf-instance-2"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
resource "google_compute_instance" "tfinstance3" {
name = "tf-instance-230370"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
EOF
terraform apply
Update instances.tf:
cat << EOF > modules/instances/instances.tf
resource "google_compute_instance" "tfinstance1" {
name = "tf-instance-1"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
resource "google_compute_instance" "tfinstance2" {
name = "tf-instance-2"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "default"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
EOF
terraform apply
export VPC=tf-vpc-803543
Update main.tf with the correct network_name:
cat << EOF > main.tf
terraform {
backend "gcs" {
bucket = "$BUCKET"
prefix = "terraform/state"
}
required_providers {
google = {
source = "hashicorp/google"
version = "~> 7.46.0"
}
}
}
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}
module "instances" {
source = "./modules/instances"
}
module "storage" {
source = "./modules/storage"
}
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 18.2"
project_id = "$PROJECT"
network_name = "$VPC"
routing_mode = "GLOBAL"
subnets = [
{
subnet_name = "subnet-01"
subnet_ip = "10.10.10.0/24"
subnet_region = "$REGION"
},
{
subnet_name = "subnet-02"
subnet_ip = "10.10.20.0/24"
subnet_region = "$REGION"
},
]
}
EOF
Note that the exact combination:
~> 18.2and~> 7.46.0were required to finish the lab (the lab itself states that one must use10.0.0). Otherwise, Provider and version errors will prevent the creation of required resources.
Also note that the lab seemingly requires creating the
vpcin two places you will see an error that the Resource already exists but this can be ignored.
To be clearer it requires the student to create the
vpcModule inmain.tfbefore referring to it withininstances.tf-instances.tf, however, is already referenced bymain.tfso it has to be added toinstances.tf- this strange convention is apparently what others have done to complete the challenge as well.
rm .terraform.lock.hcl
terraform init
terraform apply
Update instances.tf:
cat << EOF > modules/instances/instances.tf
resource "google_compute_instance" "tfinstance1" {
name = "tf-instance-1"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "$VPC"
subnetwork = "subnet-01"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
resource "google_compute_instance" "tfinstance2" {
name = "tf-instance-2"
machine_type = "e2-standard-2"
zone = "$ZONE"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
}
}
network_interface {
network = "$VPC"
subnetwork = "subnet-02"
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
}
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 18.2"
project_id = "$PROJECT"
network_name = "$VPC"
routing_mode = "GLOBAL"
subnets = [
{
subnet_name = "subnet-01"
subnet_ip = "10.10.10.0/24"
subnet_region = "$REGION"
},
{
subnet_name = "subnet-02"
subnet_ip = "10.10.20.0/24"
subnet_region = "$REGION"
},
]
}
EOF
terraform apply
Update main.tf one last time updating the tf-firewall.name:
cat << EOF > main.tf
terraform {
backend "gcs" {
bucket = "$BUCKET"
prefix = "terraform/state"
}
required_providers {
google = {
source = "hashicorp/google"
version = "~> 7.46.0"
}
}
}
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}
module "instances" {
source = "./modules/instances"
}
module "storage" {
source = "./modules/storage"
}
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 18.2"
project_id = "$PROJECT"
network_name = "$VPC"
routing_mode = "GLOBAL"
subnets = [
{
subnet_name = "subnet-01"
subnet_ip = "10.10.10.0/24"
subnet_region = "$REGION"
},
{
subnet_name = "subnet-02"
subnet_ip = "10.10.20.0/24"
subnet_region = "$REGION"
},
]
}
resource "google_compute_firewall" "tf-firewall"{
name = "tf-firewall"
network = "projects/$PROJECT/global/networks/$VPC"
allow {
protocol = "tcp"
ports = ["80"]
}
source_tags = ["web"]
source_ranges = ["0.0.0.0/0"]
}
EOF
terraform apply
Resources and Links
GCP: PCA Serverless
Useful Google Cloud Shell Commands
Used in many Google Skill Labs and Challenges.
export REGION=us-west1
export REPO_NAME=lab
export PROJECT_ID=qwiklabs-gcp-02-4304b07c61f7
gcloud artifacts repositories create $REPO_NAME \
--repository-format=docker \
--location=$REGION \
--description="Docker repository for lab"
gcloud auth configure-docker $REGION-docker.pkg.dev
gcloud artifacts repositories list
# Backend
export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/billing-staging-api:0.1
## From within the relevant lab directory...
docker build -t $IMAGE .
docker push $IMAGE
gcloud run deploy public-billing-service-607 \
--image $IMAGE \
--platform managed \
--region $REGION \
--max-instances=1
# Frontend
export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/frontend-staging:0.1
## From within the relevant lab directory...
docker build -t $IMAGE .
docker push $IMAGE
gcloud run deploy frontend-staging-service-740 \
--image $IMAGE \
--platform managed \
--region $REGION \
--max-instances=1
# Private
export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/billing-staging-api:0.2
## From within the relevant lab directory...
docker build -t $IMAGE .
docker push $IMAGE
gcloud run deploy private-billing-service-875 \
--image $IMAGE \
--platform managed \
--region $REGION \
--no-allow-unauthenticated \
--max-instances=1
BILLING_URL=$(gcloud run services describe private-billing-service-875 \
--platform managed \
--region us-west1 \
--format "value(status.url)")
curl -X get -H "Authorization: Bearer $(gcloud auth print-identity-token)" $BILLING_URL
# Billing Service Account
gcloud iam service-accounts create billing-service-sa-101 --display-name "Billing Service Cloud Run"
# Associate Service Account
## And deploy Prod Billing Service
export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/billing-prod-api:0.1
docker build -t $IMAGE .
docker push $IMAGE
gcloud run deploy billing-prod-service-460 \
--image $IMAGE \
--platform managed \
--region $REGION \
--no-allow-unauthenticated \
--max-instances=1
gcloud run services add-iam-policy-binding billing-prod-service-460 --member=serviceAccount:billing-service-sa-101@$PROJECT_ID.iam.gserviceaccount.com --role=roles/run.invoker --region $REGION
# Frontend Service Account
gcloud iam service-accounts create frontend-service-sa-119 --display-name "Billing Service Cloud Run Invoker"
## These steps were out of order in the lab
# Associate Service Account
## And deploy Prod Frontend Service
export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/frontend-prod:0.1
## From within the relevant lab directory...
docker build -t $IMAGE .
docker push $IMAGE
gcloud run deploy frontend-prod-service-711 \
--image $IMAGE \
--platform managed \
--region $REGION \
--no-allow-unauthenticated \
--max-instances=1
gcloud run services add-iam-policy-binding frontend-prod-service-711 --member=serviceAccount:frontend-service-sa-119@$PROJECT_ID.iam.gserviceaccount.com --role=roles/run.invoker --region $REGION
Resources and Links
GCP: PMLE Overview
https://cloud.google.com/learn/certification/machine-learning-engineer
ChatGPT helped format and generate many tables below.
Verbiage
- Labels - in GCP terminology this corresponds to what you're trying to predict (
hot dog,not hot dog) - Features - the measurable parts of a data point.
BigQuery ML
SELECT
pickup_datetime,
pickup_longitude,
pickup_latitude,
dropoff_longitude,
dropoff_latitude,
passenger_count,
tolls_amount,
fare_amount AS fare_amount_910
FROM `qwiklabs-gcp-04-7085cf65a05f.taxirides.historical_taxi_rides_raw`
# Must use reasonable values
WHERE trip_distance > 0
AND fare_amount BETWEEN 0 and 3
AND pickup_longitude BETWEEN -180 AND 180
AND pickup_latitude BETWEEN -90 AND 90
AND dropoff_longitude BETWEEN -180 AND 180
AND dropoff_latitude BETWEEN -90 AND 90
LIMIT 999999
CREATE OR REPLACE MODEL `taxirides.fare_model_243`
OPTIONS
(
model_type='linear_reg',
input_label_cols = ['fare_amount_910']
) AS
# input_label_cols must be exposed in SELECT
# too many features with throw a label error!
SELECT
fare_amount_910,
passenger_count,
ST_Distance(ST_GeogPoint(pickup_longitude, pickup_latitude), ST_GeogPoint(dropoff_longitude, dropoff_latitude)) AS euclidean
FROM
`qwiklabs-gcp-04-7085cf65a05f.taxirides.taxi_training_data_195`;
CREATE OR REPLACE MODEL `qwiklabs-gcp-04-7085cf65a05f`.`taxirides`.`fare_model_243`
OPTIONS (
model_type = 'LINEAR_REG',
labels = ['fare_amount_910']
) AS SELECT
pickup_datetime,
pickup_longitude,
pickup_latitude,
dropoff_longitude,
dropoff_latitude,
passenger_count,
tolls_amount,
fare_amount_910
FROM
`qwiklabs-gcp-04-7085cf65a05f`.`taxirides`.`taxi_training_data_195`;
CREATE OR REPLACE TABLE `qwiklabs-gcp-04-7085cf65a05f`.`taxirides`.`2015_fare_amount_predictions`
AS SELECT *
FROM
ML.PREDICT( MODEL `qwiklabs-gcp-04-7085cf65a05f`.`taxirides`.`fare_model_243`,
(SELECT
pickup_datetime,
pickuplon AS pickup_longitude,
pickuplat AS pickup_latitude,
dropofflon AS dropoff_longitude,
dropofflat AS dropoff_latitude,
passengers AS passenger_count,
0.0 AS tolls_amount /* Assuming tolls_amount is 0 for prediction data if not available */
FROM
`qwiklabs-gcp-04-7085cf65a05f`.`taxirides`.`report_prediction_data`
WHERE
EXTRACT(YEAR
FROM
pickup_datetime) = 2015 ));
Resources and Links
GCP: PMLE Solutions
AI and ML Solutions on GCP
AI Solutions
| Name | Type | Service Family | AI Task | Description | Use Scenario | Documentation |
|---|---|---|---|---|---|---|
| Anti Money Laundering AI (AML AI) | Service | Financial Crime AI | Anomaly detection; risk scoring; financial crime detection | Enhances transaction monitoring with AI-powered risk scores. | A bank prioritizes suspicious transactions for investigation. | URL |
| Gemini Enterprise for Customer Experience (GECX) | Service | Customer Experience AI | Conversational AI; customer service automation | Suite for building and managing AI agents across the customer lifecycle. | A retailer automates customer interactions from product discovery to post-purchase support. | URL |
| CX Agent Studio | Feature | GECX | Agent development; evaluation; deployment; monitoring | Visual platform for building and managing multimodal conversational agents in multiple languages. | A support team creates, tests, and monitors a multilingual virtual agent. | URL |
| Conversational Agents | Feature | GECX | Conversational AI; voice and text automation | Self-service agents supporting voice, text, and images. | Customers ask questions or complete service requests without a human representative. | URL |
| Flows (formerly Dialogflow CX) | Feature | GECX β Conversational Agents | Intent classification; NLU; deterministic dialogue management | Uses intents and defined flows to control conversations predictably. | A customer follows a fixed troubleshooting or appointment-booking workflow. | URL |
| Playbooks | Feature | GECX β Conversational Agents | Generative dialogue; instruction following; agent orchestration | Builds generative agents using natural-language instructions and modular components. | An agent answers varied questions and invokes appropriate workflow steps. | URL |
| Agent Assist | Feature | GECX | Real-time agent assistance; summarization; recommendation | Supports human representatives with live coaching and automated call summaries. | A contact center suggests responses during calls and drafts post-call notes. | URL |
| CX Insights | Feature | GECX | Conversation analytics; classification; quality analysis | Analyzes conversations to uncover customer issues, coaching needs, and improvement opportunities. | A contact center identifies recurring complaints across thousands of calls. | URL |
| Contact Center as a Service (CCaaS) | Service | GECX | Omnichannel contact-center operations; AI integration | Cloud-native contact-center foundation integrating customer experience capabilities. | A company manages customer support across voice and digital channels. | URL |
| Food Ordering AI Agent | Service | GECX β Industry AI Agents | Voice recognition; conversational ordering; speech synthesis; analytics | Prebuilt food-ordering agent using Gemini and speech technologies, with BigQuery and Looker integration. | A restaurant automates drive-through orders and analyzes operational trends. | URL |
| Automotive AI Agent | Service | Automotive AI | Voice interaction; conversational assistance; on-device AI | Hybrid on-asset and online framework for automotive voice experiences. | An automaker deploys voice assistance in a vehicle or automotive device. | URL |
| Automotive AI Agent API | Service | Automotive AI | Voice-agent integration; agent lifecycle management | API for creating, managing, and deploying automotive voice agents, including supported pretrained agents. | A developer integrates an automotive voice assistant into an application. | URL |
| Automotive AI Agent Premium Software | Feature | Automotive AI | Automotive conversational AI; voice-agent functionality | Premium software components associated with the Automotive AI Agent solution. | An automotive product uses supported premium components to deliver voice-agent functionality. | URL |
| Document AI | Service | Document AI | OCR; document classification; information extraction; document splitting | Provides document-processing models and tools, including pretrained and custom models. | A financial institution extracts fields from forms, invoices, and identity documents. | URL |
| Talent Solution | Service | Talent AI | Candidate matching; recruitment search; talent recommendations | Applies Google's machine learning to improve recruitment experiences on hiring platforms. | A job board improves candidate-to-job matching. | URL |
| Translation Hub | Service | Translation | Document translation; multilingual content processing | Managed document-translation solution for organizations. | A global company translates internal documents into multiple languages. | URL |
| Agent Search on Gemini Enterprise Agent Platform (formerly Vertex AI Search) | Service | Gemini Enterprise Agent Platform β Search | Semantic search; retrieval; question answering; recommendations | Combines foundation models with search and recommendation technology for multimodal experiences. | Employees search enterprise documents using natural-language questions. | URL |
| Agent Search for Industry on Gemini Enterprise Agent Platform | Service | Gemini Enterprise Agent Platform β Industry Search | Vertical search; semantic retrieval; recommendations | Search and recommendation capabilities tailored to industries such as retail and media. | A media platform improves discovery of relevant content. | URL |
| AI Commerce Search on Gemini Enterprise for Customer Experience | Service | GECX β Commerce AI | Product search; ranking; product discovery | Uses Google's retail search capabilities in retailer websites and applications. | An online store returns relevant products for a customer's query. | URL |
| Recommendations AI | Service | GECX β Commerce AI | Personalization; recommendation ranking | Enables personalized recommendation systems using machine-learning models. | An ecommerce site recommends products based on user behavior and context. | URL |
| Agent Search API on Gemini Enterprise Agent Platform | Service | Gemini Enterprise Agent Platform β Search | Search; retrieval; question answering | API for integrating Google's search capabilities into websites and document experiences. | A company adds semantic search across its help center and documentation. | URL |
Pre-Trained APIs
| Name | Type | Service Family | AI Task | Description | Use Scenario | Documentation |
|---|---|---|---|---|---|---|
| Cloud Natural Language API | Service | Google Cloud Pre-Trained APIs | Entity extraction; sentiment analysis; language and syntax analysis | Analyzes text to identify entities, sentiment, language, and syntax. | A company analyzes customer reviews to extract product names and sentiment. | URL |
| Cloud Translation API | Service | Google Cloud Pre-Trained APIs | Text translation; multilingual processing | Translates text between languages using pretrained and custom translation models. | An application translates user-generated content into a reader's language. | URL |
| Cloud Vision API | Service | Google Cloud Pre-Trained APIs | Image classification; object and face detection; OCR | Provides pretrained visual detection and image-analysis capabilities. | An application detects objects in images or reads text from scanned receipts. | URL |
| Speech-to-Text | Service | Google Cloud Pre-Trained APIs | Automatic speech recognition (ASR) | Converts audio into text using machine-learning models. | A call-recording pipeline transcribes conversations for analysis. | URL |
| Text-to-Speech | Service | Google Cloud Pre-Trained APIs | Speech synthesis; text-to-audio generation | Generates human-like spoken audio from text in different voices and languages. | An application reads notifications aloud or provides spoken navigation. | URL |
| Timeseries Insights API | Service | Google Cloud Pre-Trained APIs | Time-series anomaly detection; forecasting and trend analysis | Supports large-scale time-series analysis and real-time anomaly detection. | An operations team detects unusual changes in service metrics or business activity. | URL |
| Video Intelligence API | Service | Google Cloud Pre-Trained APIs | Video analysis; entity detection; metadata extraction | Analyzes video to extract metadata, annotations, and detected entities. | A media organization searches video archives for particular objects or scenes. | URL |
Gemini Enterprise Agent Platform
| Name | Type | Service Family | AI Task | Description | Use Scenario | Documentation |
|---|---|---|---|---|---|---|
| Gemini Enterprise Agent Platform (formerly Vertex AI Platform) | Service | Gemini Enterprise Agent Platform | ML lifecycle management; model training; deployment; evaluation; governance | Platform for building, deploying, scaling, and governing AI agents and ML models, with datasets, pipelines, experiments, model serving, and notebooks. | A team trains a custom model, evaluates it, deploys an endpoint, and manages its lifecycle. | URL |
| Neural Architecture Search (NAS) on Gemini Enterprise Agent Platform | Service | Gemini Enterprise Agent Platform | Neural architecture search; model optimization | Uses neural architecture search technology to generate, evaluate, and train candidate model architectures. | A team searches for a suitable neural-network architecture for a computer-vision task. | URL |
| Gemini Enterprise Agent Platform Vision (formerly Vertex AI Vision) | Service | Gemini Enterprise Agent Platform | Computer vision; visual stream processing | Managed environment for developing, deploying, and managing computer-vision applications. | A manufacturer builds a visual inspection pipeline to identify defects on a production line. | URL |
GAN
| Name | Type | Service Family | AI Task | Description | Use Scenario | Documentation |
|---|---|---|---|---|---|---|
| Gemini for Google Cloud | Service | Gemini for Google Cloud | Generative assistance; code and cloud workflow support | Embeds AI-powered assistance in Google Cloud products for developers, data scientists, and operators. | A cloud engineer asks for help understanding a configuration or troubleshooting a deployment. | URL |
| Gemini Code Assist | Feature | Gemini for Google Cloud | Code generation; code explanation; debugging; development assistance | Provides AI assistance throughout application development and operations. | A developer generates unit tests, explains unfamiliar code, or investigates a bug. | URL |
| Gemini in BigQuery | Feature | Gemini for Google Cloud | SQL generation; data exploration; data engineering assistance | Helps users understand, query, and work with data across the data lifecycle. | An analyst generates SQL from a natural-language question about a dataset. | URL |
| Generative AI on Gemini Enterprise Agent Platform (formerly Generative AI on Vertex AI) | Service | Gemini Enterprise Agent Platform β Generative AI | Foundation-model access; generative application development; agent building | Enables production generative AI applications and agents using Google's models and infrastructure. | A team builds a grounded enterprise assistant or a generative content workflow. | URL |
| Gemini Enterprise Agent Platform API (formerly Vertex AI API) | Service | Gemini Enterprise Agent Platform β Generative AI | Foundation-model inference; text and multimodal generation | API access to generative AI foundation models. | An application sends a prompt to a model and uses the generated response. | URL |
| Gemini Live API on Gemini Enterprise Agent Platform | Service | Gemini Enterprise Agent Platform β Generative AI | Real-time multimodal interaction; streaming voice and video | Supports low-latency, bidirectional voice and video conversations with Gemini. | A live assistant responds conversationally to a user's speech and visual input. | URL |
| Grounding with Google Search | Feature | Gemini Enterprise Agent Platform β Grounding | Web retrieval; factual grounding; source-informed generation | Grounds Gemini responses in information retrieved from Google Search. | An assistant answers questions about recent events using current web information. | URL |
| Web Grounding for Enterprise | Feature | Gemini Enterprise Agent Platform β Grounding | Enterprise web grounding; retrieval-augmented generation | Provides web-grounding capability for Gemini models in enterprise contexts. | An enterprise application grounds generated answers in relevant web information. | URL |
| Grounding with Google Maps | Feature | Gemini Enterprise Agent Platform β Grounding | Geospatial retrieval; place-based question answering | Connects Gemini models with geospatial information from Google Maps. | A travel assistant answers questions about nearby places and location-based options. | URL |
| Embeddings API | Service | Gemini Enterprise Agent Platform β Embeddings | Vector embeddings; semantic similarity; multimodal retrieval | Generates vector embeddings for text, images, video, and audio to support semantic search, classification, and retrieval workflows. | A knowledge system finds documents semantically related to a user's question. | URL |
| NotebookLM Enterprise | Service | NotebookLM Enterprise | Document-grounded summarization; information extraction; question answering | Uses generative AI to summarize and extract information from user-provided data. | An employee asks questions across a collection of reports and receives source-grounded summaries. | URL |
Agentic
| Name | Type | Service Family | AI Task | Description | Use Scenario | Documentation |
|---|---|---|---|---|---|---|
| Gemini Enterprise | Service | Gemini Enterprise | Enterprise search; agent orchestration; workflow automation; generative AI | Combines AI agents, Gemini models, and Google search technologies to connect enterprise data and applications and automate employee workflows. | An employee searches internal knowledge sources and uses an agent to complete a multistep business workflow. | URL |
| Computer Use | Service | Agentic AI | Visual UI understanding; browser and operating-system interaction; action execution | Enables agents to interact with computer browsers, operating systems, or mobile devices based on visual screen input. | An agent navigates a website and completes a permitted workflow through its user interface. | URL |
| Firebase AI Logic | Service | Firebase AI Logic | Application-integrated generative AI; model inference; multimodal AI | Provides a proxy service, client SDKs, and related capabilities for adding generative AI to web and mobile applications, with configurable model providers and models. | A mobile application adds a conversational assistant or image-understanding feature. | URL |
Resources and Links
GCP: PMLE Challenges
Common AI Challenges
| AI Challenge | PMLE Example Prompt / Question | Description | Recommendation | Related GCP Services | Remedy Type | Documentation URL |
|---|---|---|---|---|---|---|
| Data imbalance (class imbalance) | A fraud model misses most fraudulent transactions because positive examples are rare. How can minority-class detection improve? | Unequal representation of target classes can impair minority-class performance. | Apply class weighting, resampling, threshold tuning and suitable metrics such as recall and PR-AUC. | Vertex AI Training, BigQuery ML, Vertex AI Model Evaluation | Methodological | Model evaluation |
| Data drift (feature drift) | Production feature distributions change significantly from the training baseline. How can this be detected? | Input distributions change over time or differ from a reference dataset. | Configure supported skew/drift monitoring, investigate changes and validate model performance before retraining. | Vertex AI Model Monitoring, BigQuery | GCP Feature/Service, Methodological | Model Monitoring |
| Concept drift | Accuracy declines although feature distributions remain stable. What should you investigate? | The relationship between features and the target changes over time. | Evaluate against newly labeled outcomes; investigate changing relationships and retrain or recalibrate if justified. | Vertex AI Model Monitoring, BigQuery, Vertex AI Pipelines | GCP Feature/Service, Methodological | ML best practices |
| Training-serving skew | Offline evaluation is strong, but production predictions are poor because transformations differ. How should this be addressed? | Training and serving data or preprocessing differ. | Standardize feature transformations and monitor training-serving distributions. | Vertex AI Model Monitoring, BigQuery, Dataflow | GCP Feature/Service, Methodological | Model Monitoring |
| Data leakage | A feature records an event that happens after the outcome being predicted. What should change? | Training uses information unavailable at prediction time, inflating evaluation results. | Remove leakage-prone features, use time-aware splits and fit preprocessing only on training data. | BigQuery, Vertex AI Pipelines | Methodological | ML best practices |
| Sampling bias / selection bias | A model performs well in one region but poorly in another. What data issue might explain this? | Training data does not adequately represent the target population. | Improve sampling coverage and assess subgroup and population differences. | BigQuery, Vertex AI, Vertex AI Model Evaluation | Methodological | Responsible AI |
| Overfitting | Training accuracy is high while validation accuracy is low. Which techniques improve generalization? | The model learns training-specific patterns that do not generalize. | Use regularization, early stopping, appropriate validation splits and representative test data. | Vertex AI Training, Vertex AI Experiments, BigQuery ML | Methodological | Vertex AI |
| Underfitting | Both training and validation performance are poor. What should you investigate? | The model has insufficient capacity, inadequate training or ineffective features. | Improve features, increase capacity where appropriate and tune hyperparameters. | Vertex AI Training, Vertex AI Experiments, BigQuery ML | Methodological | Vertex AI |
| Vanishing gradients | Early layers of a deep network learn very slowly. What training problem could explain this? | Gradients become extremely small during backpropagation. | Consider residual connections, suitable activations, normalization, initialization and learning-rate tuning. | Vertex AI Custom Training, Vertex AI TensorBoard | Methodological | Custom training |
| Catastrophic forgetting | Fine-tuning improves a domain task but degrades previously learned capabilities. How can this be mitigated? | New training degrades previously learned capabilities. | Evaluate old and new tasks; consider replay data, parameter-efficient tuning or multi-task training. | Vertex AI supervised tuning, Vertex AI Model Evaluation | GCP Feature/Service, Methodological | Tune foundation models |
| Context loss / limited context window | An LLM misses important details in a lengthy document. How can this improve? | Relevant information may exceed the context window or be poorly utilized. | Retrieve relevant passages, summarize history, manage token limits and cache repeated content when appropriate. | Gemini on Vertex AI, Vertex AI RAG Engine | GCP Feature/Service, Methodological | Context caching |
| Hallucinations / factuality errors | A chatbot invents policy details. How can unsupported answers be reduced? | A model produces plausible but incorrect or unsupported claims. | Ground answers in trusted sources, evaluate factuality and abstain when evidence is insufficient. | Gemini on Vertex AI, Vertex AI RAG Engine, Vertex AI Search | GCP Feature/Service, Methodological | Grounding overview |
| Knowledge cutoff / stale knowledge | A model cannot accurately answer questions about a policy published yesterday. What should be used? | Learned model knowledge may not include current information. | Retrieve current information at inference time from authoritative sources. | Gemini on Vertex AI, Grounding with Google Search, Vertex AI Search | GCP Feature/Service, Methodological | Grounding with Google Search |
| Irrelevant responses / poor relevance | RAG retrieves documents related to the topic but not to the actual question. How can retrieval improve? | Responses or retrieved passages fail to address the user's intent. | Improve query formulation, chunking, metadata filters, embeddings and ranking; evaluate retrieval separately from generation. | Vertex AI RAG Engine, Vertex AI Search, Vertex AI embeddings | GCP Feature/Service, Methodological | Grounding with search APIs |
| Low accuracy / poor predictive performance | A team needs to determine whether a candidate model is production-ready. What should it evaluate? | The model fails to meet required performance for its task. | Choose appropriate metrics, use representative evaluation data, compare baselines and validate before deployment. | Vertex AI Model Evaluation, Gen AI evaluation, BigQuery ML | GCP Feature/Service, Methodological | Model evaluation |
| Memorization and parroting ("parrot effect") | How can you test whether an LLM generalizes rather than reproduces familiar training examples? | The model reproduces memorized content or familiar patterns without reliably handling novel cases. | Test novel and counterfactual examples, assess memorization risks and measure generalization. | Gemini on Vertex AI, Gen AI evaluation, Vertex AI tuning | Methodological | Generative AI evaluation |
| Prompt sensitivity / prompt degradation | A minor prompt edit causes response quality to deteriorate. How should changes be evaluated? | Prompt changes can cause inconsistent or lower-quality outputs. | Clarify instructions and output constraints; run repeatable regression evaluations. | Vertex AI Studio, Gemini on Vertex AI, Gen AI evaluation | GCP Feature/Service, Methodological | Prompt design strategies |
| Adversarial attacks / prompt injection | An agent follows malicious instructions embedded in a retrieved document. How should it be secured? | Malicious inputs or retrieved content manipulate model behavior or attempt to bypass safeguards. | Treat retrieved content as untrusted, enforce permissions outside the model, validate tool calls and screen prompts and responses. | Model Armor, Gemini on Vertex AI, IAM, VPC Service Controls | GCP Feature/Service, Methodological | Model Armor |
| Model bias / unfairness | A model has different error rates across demographic groups. How should fairness be assessed? | Data or model behavior systematically disadvantages certain groups. | Audit subgroup metrics, review representation and apply appropriate mitigation and human oversight. | Vertex AI Model Evaluation, Vertex Explainable AI, BigQuery | GCP Feature/Service, Methodological | Responsible AI |
| Limited interpretability / black-box behavior | A regulated organization needs explanations for individual predictions. Which capability should it consider? | Complex models can be difficult to explain or audit. | Use supported feature-attribution methods, document limitations and retain audit records. | Vertex Explainable AI, Vertex AI Model Monitoring | GCP Feature/Service, Methodological | Vertex Explainable AI |
| Insufficient or low-quality training data | Inconsistent labels cause poor performance. How can the data pipeline catch these problems? | Missing values, mislabeled examples, duplicates and noise reduce model quality. | Profile data, validate schemas, audit labels and automate quality checks. | BigQuery, Dataflow, Vertex AI, TensorFlow Data Validation | GCP Feature/Service, Methodological | ML best practices |
| Retrieval failure / poor RAG grounding | A RAG chatbot returns outdated information despite using retrieval. What should be investigated? | Retrieval misses relevant sources, selects stale documents or supplies insufficient evidence. | Check document freshness, retrieval recall, ranking, chunking and metadata. | Vertex AI RAG Engine, Vertex AI Search, Vertex AI embeddings | GCP Feature/Service, Methodological | RAG Engine |
| Unsafe or toxic output (content filter) | How can harmful responses be reduced while accounting for false positives from stricter safety thresholds? | Generated responses may contain harmful, abusive or disallowed content. | Configure appropriate Gemini safety filters; use Model Armor for supported prompt/response screening and evaluate false positives and false negatives. | Gemini on Vertex AI, Model Armor | GCP Feature/Service, Methodological | Safety filters; Model Armor |
| Sensitive data exposure / privacy leakage | A chatbot must prevent users from retrieving another department's confidential documents. How should access be enforced? | Prompts, logs, retrieved documents or outputs expose confidential or personal information. | Enforce authorization in the application and retrieval layers, apply least-privilege IAM, minimize sensitive data and redact where appropriate. | IAM, Sensitive Data Protection, Model Armor, VPC Service Controls | GCP Feature/Service, Methodological | Generative AI security controls |
| Model serving latency, throughput or availability | Prediction latency spikes during traffic surges. Which serving and monitoring strategies should be applied? | Inference is too slow, exceeds resource limits or becomes unavailable under load. | Load-test, configure scaling, optimize requests and monitor latency and errors. | Vertex AI endpoints, Cloud Monitoring, Cloud Logging | GCP Feature/Service, Methodological | Deploy models |
| Model versioning and reproducibility | A team must reproduce a prior release and identify its training data and parameters. Which services help? | Models, datasets, parameters and pipelines cannot be reliably traced or reproduced. | Version model artifacts, track lineage and experiments, and retain evaluation results before release. | Vertex AI Model Registry, Vertex AI Experiments, Vertex AI Pipelines, Vertex ML Metadata | GCP Feature/Service, Methodological | MLOps on Vertex AI |
Resources and Links
GCP: PMLE Architecture
Machine Learning
Neural Network Architecture
| Name | Type | Topic | AI Task | Description | Use Scenario | PMLE In-Scope |
|---|---|---|---|---|---|---|
| Artificial Neural Network (ANN) | Architecture | Deep Learning | Nonlinear prediction; classification; regression | Network of interconnected computational units that learn patterns from data. | Predict customer churn from structured customer attributes. | β |
| Convolutional Neural Network (CNN) | Architecture | Computer Vision | Image classification; spatial feature extraction | Uses convolutional filters to learn local spatial patterns, often in images. | Classify product images or detect defects in manufacturing images. | β |
| Recurrent Neural Network (RNN) | Architecture | Sequence Modeling | Sequential prediction; temporal pattern learning | Processes sequences using recurrent hidden states that carry information across time steps. | Model sensor readings or sequences of events. | β |
| Long Short-Term Memory (LSTM) | Architecture | Sequence Modeling | Long-range sequence dependencies | RNN variant with gates and a memory cell designed to preserve information over longer sequences. | Forecast demand from historical time-series data. | β |
| Gated Recurrent Unit (GRU) | Architecture | Sequence Modeling | Sequential modeling; temporal prediction | Gated recurrent architecture that is often simpler than an LSTM. | Build a compact sequence model when recurrent modeling is appropriate. | β |
| Transformer | Architecture | Deep Learning; Generative AI; NLP | Attention-based sequence modeling; multimodal learning | Uses attention mechanisms to model relationships between sequence elements, enabling parallel processing during training. | Build language models, translation systems, or multimodal models. | β |
| EncoderβDecoder | Architecture Pattern | Sequence Modeling; Generative AI | Sequence-to-sequence transformation | An encoder transforms input into a representation and a decoder produces the output. Transformers and recurrent networks can use this pattern. | Translate a sentence into another language or summarize a document. | β |
| Autoencoder | Architecture | Representation Learning; Unsupervised Learning | Dimensionality reduction; reconstruction; anomaly detection | Learns a compressed representation by reconstructing its input. | Identify unusual equipment behavior from high reconstruction error. | β |
| Variational Autoencoder (VAE) | Architecture | Generative AI; Representation Learning | Probabilistic latent-variable modeling; generation | Learns a probability distribution over latent representations, enabling sampling and generation. | Generate new samples similar to a training dataset. | - |
| Generative Adversarial Network (GAN) | Architecture | Generative AI | Synthetic data generation; image synthesis | Trains a generator and discriminator in an adversarial process: the generator creates samples while the discriminator tries to distinguish generated from real samples. | Generate realistic synthetic images for experimentation or data augmentation. | - |
| Diffusion Model | Architecture / Generative Method | Generative AI | Image, audio, or other data generation | Learns to reverse a gradual noising process to generate data from noise. | Generate images from text prompts. | - |
| Large Language Model (LLM) | Model Type | Generative AI; NLP | Text generation; language understanding; reasoning | A large model trained on extensive text or multimodal data, commonly using a Transformer architecture. | Build a question-answering assistant or summarize reports. | β |
| Vision Transformer (ViT) | Architecture | Computer Vision | Image representation; classification | Applies Transformer attention to image patches rather than relying solely on convolutional layers. | Classify images using an attention-based vision model. | - |
| Graph Neural Network (GNN) | Architecture | Graph Machine Learning | Graph classification; node prediction; link prediction | Learns from entities and their relationships by propagating information across graph connections. | Predict suspicious links in a financial transaction network. | - |
| Mixture of Experts (MoE) | Architecture Pattern | Deep Learning; LLMs | Conditional computation; scalable model capacity | Uses a gating or routing mechanism to activate selected expert subnetworks for each input. | Serve a large model while activating only a subset of its experts per token. | - |
| Multilayer Perceptron (MLP) | Architecture | Deep Learning | Tabular prediction; nonlinear function approximation | Feed-forward network of fully connected layers with nonlinear activations. | Predict a numeric outcome from a fixed set of input features. | β |
| Perceptron | Model / Neural Unit | Neural Networks | Linear classification; learn a decision boundary | A simple computational unit that applies a weighted sum and activation function; the single-layer perceptron is a basic linear classifier. | Introduce the foundations of neural-network learning and classification. | β |
Training, Optimization, and Regularization
| Name | Type | Topic | AI Task | Description | Use Scenario | PMLE In-Scope |
|---|---|---|---|---|---|---|
| Gradient Descent | Optimization Algorithm | Model Training | Minimize a loss function | Updates model parameters in the direction that reduces the loss, using gradient information. | Train a regression model by minimizing prediction error. | β |
| Stochastic Gradient Descent (SGD) | Optimization Algorithm | Model Training | Iterative parameter optimization | Updates parameters using individual examples or small batches, producing noisy but often efficient updates. | Train a neural network on a large dataset using mini-batches. | β |
| Mini-Batch Gradient Descent | Optimization Method | Model Training | Efficient gradient estimation | Computes each update from a subset of training examples, balancing memory use and gradient stability. | Train a deep-learning model without loading the entire dataset into memory. | β |
| Adam Optimizer | Optimization Algorithm | Model Training | Adaptive learning-rate optimization | Combines momentum-like first-moment estimates with second-moment estimates to adapt parameter updates. | Use a strong general-purpose starting optimizer when training a neural network. | β |
| AdamW | Optimization Algorithm | Model Training | Adaptive optimization with decoupled weight decay | Separates weight decay from the gradient update, commonly used for Transformer and language-model training. | Fine-tune a Transformer while controlling weight magnitudes. | β |
| Momentum | Optimization Technique | Model Training | Smoother, faster gradient updates | Accumulates a moving average of past gradients to reduce oscillation and improve progress in consistent directions. | Improve optimization when gradients fluctuate across dimensions. | β |
| Learning-Rate Scheduling | Optimization Technique | Model Training | Control optimization step size | Changes the learning rate during training using a schedule, such as decay, cosine annealing, or warmup. | Start with gradual warmup and reduce the learning rate later in training. | β |
| Warmup | Optimization Technique | Model Training | Stabilize early training | Gradually increases the learning rate at the beginning of training before reaching the target rate. | Reduce unstable early updates when training a large Transformer. | β |
| Backpropagation | Training Algorithm | Neural Network Training | Compute gradients | Uses the chain rule to calculate how each parameter contributes to the loss. | Compute parameter gradients before an optimizer updates a network. | β |
| Batch Normalization | Technique / Layer | Deep Learning | Normalize intermediate activations | Normalizes activations using batch statistics during training and tracked statistics during inference. | Help stabilize and accelerate training in a suitable CNN architecture. | β |
| Layer Normalization | Technique / Layer | Deep Learning; Transformers | Normalize hidden representations | Normalizes activations across features within an example, rather than across the batch. | Stabilize Transformer training and inference. | β |
| Dropout | Regularization Technique | Deep Learning | Reduce overfitting | Randomly disables selected activations during training to discourage reliance on particular units. | Reduce a neural network's tendency to memorize training examples. | β |
| L1 Regularization | Regularization Technique | Model Training | Sparsity; overfitting reduction | Adds a penalty proportional to the absolute values of parameters to the training objective. | Encourage a sparse set of influential model coefficients. | β |
| L2 Regularization / Weight Decay | Regularization Technique | Model Training | Limit parameter magnitude; reduce overfitting | Penalizes large parameter values. Its exact relationship to weight decay depends on the optimizer implementation. | Reduce excessively large weights in a model. | β |
| Early Stopping | Regularization Technique | Model Training | Prevent overfitting | Stops training when a monitored validation metric no longer improves, often restoring the best checkpoint. | Stop training before validation loss begins to rise. | β |
| Gradient Clipping | Optimization Technique | Neural Network Training | Control exploding gradients | Limits gradient magnitude or norm before parameter updates. | Stabilize training when occasional gradients become excessively large. | β |
| Weight Initialization | Training Technique | Neural Network Training | Improve training stability | Sets initial parameter values using methods such as Xavier/Glorot or He initialization. | Reduce activation or gradient scale problems at the beginning of training. | β |
| Hyperparameter Tuning | Optimization Process | Model Development | Model selection; performance improvement | Searches for training settings such as learning rate, batch size, regularization strength, and architecture choices. | Compare configurations to improve validation performance. | β |
Learning Paradigms, Classical ML, and Data Techniques
| Name | Type | Topic | AI Task | Description | Use Scenario | PMLE In-Scope |
|---|---|---|---|---|---|---|
| Supervised Learning | Learning Paradigm | Machine Learning | Classification; regression | Learns a mapping from input features to known target labels or values. | Predict whether a transaction is fraudulent using labeled examples. | β |
| Unsupervised Learning | Learning Paradigm | Machine Learning | Clustering; structure discovery; representation learning | Finds patterns in data without requiring target labels. | Group customers by purchasing behavior without predefined customer categories. | β |
| Semi-Supervised Learning | Learning Paradigm | Machine Learning | Learn from limited labeled data | Combines a small labeled dataset with a larger unlabeled dataset. | Classify images when labeling every image is expensive. | β |
| Self-Supervised Learning | Learning Paradigm | Deep Learning; Foundation Models | Pretraining; representation learning | Creates training signals from the data itself, such as predicting masked tokens or missing input portions. | Pretrain a language model on text before task-specific fine-tuning. | β |
| Reinforcement Learning (RL) | Learning Paradigm | Decision Systems | Sequential decision-making; reward optimization | An agent learns a policy through interactions with an environment and feedback in the form of rewards. | Train an agent to make a sequence of decisions that maximizes cumulative reward. | β |
| Transfer Learning | Learning Technique | Model Adaptation | Reuse learned representations | Adapts a model trained on one task or dataset to a related target task. | Fine-tune a pretrained image model using a small labeled dataset. | β |
| Fine-Tuning | Training Technique | Model Adaptation; Foundation Models | Task-specific adaptation | Continues training a pretrained model on task-specific or domain-specific examples. | Adapt a language model to follow a particular response format or domain style. | β |
| Few-Shot Learning | Learning Technique | Foundation Models | Learn or perform tasks with few examples | Uses a small number of labeled examples or demonstrations to guide task performance. | Provide a few example input-output pairs in a prompt. | β |
| Zero-Shot Learning | Learning Technique | Foundation Models | Perform a task without task-specific examples | Uses prior model knowledge or semantic descriptions to handle a task without labeled examples for that task. | Ask a pretrained model to classify text into categories described in the prompt. | β |
| Active Learning | Data Selection Technique | Data-Centric ML | Choose high-value samples for labeling | Selects examples for human annotation, often based on uncertainty or expected information gain. | Send the most uncertain model predictions to experts for labeling. | β |
| Data Augmentation | Data Technique | Data-Centric ML; Computer Vision; NLP | Increase training diversity | Creates modified training examples using valid transformations or synthetic generation. | Apply suitable image flips, crops, or color changes to improve generalization. | β |
| Feature Engineering | Data Technique | Classical ML | Construct informative model inputs | Creates, transforms, or selects features that help a model learn useful patterns. | Derive transaction frequency and rolling spending statistics from event history. | β |
| Feature Scaling / Standardization | Preprocessing Technique | Classical ML; Deep Learning | Normalize numeric feature scales | Transforms features to comparable scales, such as zero mean and unit variance. | Prepare numeric features for a distance-based model or gradient-based learner. | β |
| One-Hot Encoding | Preprocessing Technique | Classical ML | Represent categorical variables | Represents each category as a binary indicator feature. | Encode product category for a model that requires numeric inputs. | β |
| Imputation | Preprocessing Technique | Data-Centric ML | Handle missing values | Fills missing values using methods such as median, most frequent category, or model-based estimates. | Prepare incomplete customer records for model training. | β |
| Data Interpolation | Preprocessing Technique | Data-Centric ML; Time-Series Analysis | Estimate values between observed data points | Estimates missing or intermediate values from nearby observations using methods such as linear or spline interpolation; it assumes a meaningful ordering or geometry in the data. | Fill gaps in regularly sampled sensor readings before analysis while avoiding information leakage across evaluation boundaries. | β |
| Feature Selection | Data Technique | Classical ML | Select informative input features | Selects a relevant subset of input features to improve generalization, reduce complexity, or improve interpretability. | Remove redundant or uninformative features before fitting a model. | β |
| Class Weighting | Training Technique | Imbalanced Classification | Address class imbalance | Changes the loss contribution of examples from different classes to increase the importance of underrepresented classes. | Increase the penalty for missing rare fraud cases. | β |
| Oversampling / Undersampling | Data Sampling Technique | Imbalanced Classification | Rebalance training data | Oversampling increases minority-class representation; undersampling reduces majority-class representation. | Adjust training data for a rare-event classifier while preserving an untouched evaluation set. | β |
| SMOTE | Data Sampling Technique | Imbalanced Classification | Synthetic minority-class sample generation | Creates synthetic minority-class examples by interpolating between nearby minority examples. | Test a resampling approach for an imbalanced tabular classification problem. | β |
| Ensemble Learning | Modeling Technique | Classical ML | Combine predictions; improve robustness | Combines multiple models to improve predictive performance or stability. | Combine several diverse classifiers to improve predictions. | β |
| Linear Regression | Model Algorithm | Classical ML; Regression | Predict continuous values | Models a target as a linear combination of input features, typically by minimizing a squared-error objective. | Estimate a numeric outcome such as demand or price from known features. | β |
| Logistic Regression | Model Algorithm | Classical ML; Classification | Binary or multiclass classification | Models class probabilities using a linear decision function and a logistic or softmax link. | Estimate the probability that a customer will churn. | β |
| Decision Tree | Model Algorithm | Classical ML | Classification; regression | Learns a tree of feature-based decisions that partition examples into prediction regions. | Build an interpretable baseline for a structured classification task. | β |
| Random Forest | Model Algorithm | Classical ML; Ensemble Learning | Classification; regression | Combines predictions from many decision trees trained with randomized data samples and feature selection. | Build a robust baseline for structured tabular data. | β |
| Gradient Boosting | Model Algorithm Family | Classical ML; Ensemble Learning | Classification; regression; ranking | Builds an ensemble sequentially, with each new learner improving on errors made by the current ensemble. | Predict customer churn from structured business data. | β |
| XGBoost | Model Algorithm | Classical ML; Gradient Boosting | Tabular classification and regression | An optimized gradient-boosted tree implementation with regularization and efficient training options. | Develop a high-performing model on structured numerical and categorical features. | β |
| Support Vector Machine (SVM) | Model Algorithm | Classical ML | Classification; regression | Learns a decision boundary that maximizes the margin between classes; kernels can model nonlinear boundaries. | Classify a moderate-sized dataset with informative features. | β |
| Naive Bayes | Model Algorithm | Classical ML; Probabilistic Classification | Classification | Uses Bayes' theorem with a conditional-independence assumption among features given the class. | Classify documents or messages using word-frequency features. | β |
| k-Nearest Neighbors (k-NN) | Model Algorithm | Classical ML | Similarity-based classification; regression | Predicts using labels or values from nearby examples under a distance metric. | Classify a new example based on similar historical observations. | β |
| Time-Series Forecasting | Problem / Technique Family | Time-Series Analysis | Predict future values from ordered observations | Uses temporal patterns, trend, seasonality, and relevant covariates to forecast future observations; evaluation should preserve time order. | Forecast future product demand using historical sales and calendar features. | β |
| Principal Component Analysis (PCA) | Dimensionality Reduction Technique | Unsupervised Learning | Dimensionality reduction; variance analysis | Projects data onto orthogonal directions that capture the greatest variance. | Reduce correlated numeric features before visualization or modeling. | β |
| k-Means Clustering | Clustering Algorithm | Unsupervised Learning | Partition data into clusters | Assigns examples to clusters by minimizing within-cluster squared distance to cluster centroids. | Segment customers using selected behavioral features. | β |
| DBSCAN | Clustering Algorithm | Unsupervised Learning | Density-based clustering; noise detection | Finds dense regions of points and can label isolated points as noise without requiring a preset number of clusters. | Identify spatial clusters and outliers in location data. | β |
| Anomaly Detection | Problem / Technique Family | Unsupervised Learning; Monitoring | Identify unusual observations | Detects observations that differ substantially from learned normal patterns or expected behavior. | Flag unusual server metrics or potentially suspicious transactions. | β |
| Markov Networks (Markov Random Fields) | Probabilistic Graphical Model | Probabilistic Modeling | Represent joint probability distributions | Undirected graphical models that represent dependencies among variables using a graph and associated potential functions. | Model dependencies among a set of related variables. | - |
| Monte Carlo Methods | Sampling / Inference Method | Probabilistic Modeling | Approximate quantities using random sampling | Use repeated random samples to estimate expectations, probabilities, or other quantities that are difficult to compute exactly. | Approximate an expectation when an exact calculation is impractical. | - |
| Automated Theorem Proving | AI Technique | Automated Reasoning | Prove or disprove formal statements | Uses algorithms to derive proofs from formal axioms and inference rules; it is a symbolic-AI topic rather than a core machine-learning method. | Verify whether a proposition follows from a formal specification. | - |
Evaluation, Validation, and Model Reliability
| Name | Type | Topic | AI Task | Description | Use Scenario | PMLE In-Scope |
|---|---|---|---|---|---|---|
| Train / Validation / Test Split | Evaluation Technique | Model Evaluation | Measure generalization; tune models | Separates data for fitting parameters, selecting configurations, and final unbiased evaluation. | Use validation data for model selection and reserve test data for final evaluation. | β |
| Cross-Validation | Evaluation Technique | Model Evaluation | Estimate generalization performance | Repeats model fitting and evaluation across multiple folds of the available data. | Compare algorithms when the labeled dataset is relatively small. | β |
| Data Leakage | Modeling Pitfall | Data Quality; Model Evaluation | Prevent invalid evaluation | Occurs when training or preprocessing uses information unavailable at prediction time or information from evaluation data. | Fit preprocessing only on training folds and exclude post-outcome features. | β |
| Overfitting | Modeling Problem | Model Generalization | Improve generalization | A model learns training-specific noise or details and performs poorly on unseen data. | Use regularization, data augmentation, simpler models, or early stopping. | β |
| Underfitting | Modeling Problem | Model Generalization | Improve model capacity or learning | A model fails to capture important patterns, performing poorly on training and unseen data. | Increase model capacity, improve features, or train more effectively. | β |
| Learning Curves | Diagnostic Technique | Model Development; Model Generalization | Diagnose model performance as training data or training progress changes | Plots training and validation performance against training-set size or training iterations to help identify high bias, high variance, and data-related limitations. | Determine whether adding training data is likely to improve validation performance. | β |
| BiasβVariance Trade-off | Concept | Model Generalization | Balance systematic error and sensitivity | Describes the tension between overly simple models and models overly sensitive to training data. | Diagnose whether poor generalization calls for greater model capacity or stronger regularization. | β |
| Confusion Matrix | Evaluation Tool | Classification Evaluation | Analyze classification errors | Counts true positives, true negatives, false positives, and false negatives. | Determine whether a fraud detector misses fraud or incorrectly flags legitimate transactions. | β |
| Accuracy | Evaluation Metric | Classification Evaluation | Measure overall classification correctness | Fraction of predictions that are correct across all evaluated examples. | Evaluate a reasonably balanced classification problem when error types have similar costs. | β |
| Precision | Evaluation Metric | Classification Evaluation | Measure correctness of positive predictions | Of predicted positives, the fraction that are actually positive. | Minimize false fraud alerts that create costly manual investigations. | β |
| Recall / Sensitivity | Evaluation Metric | Classification Evaluation | Measure detection of actual positives | Of actual positives, the fraction correctly identified by the model. | Prioritize detecting as many genuine fraud cases as possible. | β |
| F1 Score | Evaluation Metric | Classification Evaluation | Balance precision and recall | Harmonic mean of precision and recall. | Compare classifiers when both false positives and false negatives matter. | β |
| ROC-AUC | Evaluation Metric | Classification Evaluation | Measure ranking discrimination | Measures the area under the receiver operating characteristic curve across classification thresholds. | Compare how well models rank positive examples above negative examples. | β |
| PR-AUC | Evaluation Metric | Classification Evaluation | Evaluate precision-recall trade-off | Measures area under a precision-recall curve and is often informative for rare positive classes. | Compare rare-event classifiers when positive-class detection is the main concern. | β |
| Log Loss / Cross-Entropy Loss | Loss Function / Metric | Classification Evaluation | Evaluate probabilistic predictions | Penalizes incorrect predicted probabilities, especially confident incorrect predictions. | Compare probabilistic classifiers rather than only their thresholded labels. | β |
| Mean Absolute Error (MAE) | Evaluation Metric | Regression Evaluation | Measure absolute prediction error | Average absolute difference between predicted and actual numeric values. | Evaluate demand forecasts when errors should be interpreted in the target's units. | β |
| Mean Squared Error (MSE) / RMSE | Evaluation Metric | Regression Evaluation | Measure squared prediction error | MSE averages squared errors; RMSE takes its square root and returns to the target's units. | Penalize large forecast errors more heavily than smaller errors. | β |
| Calibration | Evaluation Technique | Probabilistic Prediction | Align predicted probabilities with observed frequencies | Checks whether predictions assigned a probability are correct at approximately that frequency over comparable examples. | Verify that predictions assigned 0.8 probability are positive roughly 80% of the time. | β |
| Threshold Tuning | Decision Technique | Classification Evaluation | Trade off false positives and false negatives | Adjusts the decision threshold applied to model scores or probabilities. | Lower a fraud detection threshold when missing fraud is more costly than investigating false alerts. | β |
| Data Drift | Monitoring Concept | Model Monitoring | Detect changes in input data | Occurs when the distribution or characteristics of production inputs change relative to a reference dataset. | Monitor changes in customer attributes after a product or market shift. | β |
| Concept Drift | Monitoring Concept | Model Monitoring | Detect changes in input-to-target relationships | Occurs when the relationship between features and the target changes over time. | Retrain a fraud model when fraud patterns evolve despite similar input distributions. | β |
| TrainingβServing Skew | Model Reliability Problem | Model Monitoring; MLOps | Maintain consistent training and inference behavior | Occurs when feature definitions or transformations differ between training and production inference. | Share preprocessing logic or validate feature parity between training and serving. | β |
| Explainability / Interpretability | Technique Family | Responsible AI | Explain model predictions | Uses methods such as feature attribution or interpretable model structures to explain predictions. | Explain which factors contributed to a loan-risk prediction. | β |
| SHAP | Explainability Method | Responsible AI | Feature attribution | Uses Shapley-value concepts to estimate each feature's contribution to a prediction under a defined explanation setup. | Inspect which features increased or decreased a particular model prediction. | β |
| Fairness Metrics | Evaluation Technique | Responsible AI | Measure performance disparities | Evaluates differences in outcomes or error rates across groups, using metrics appropriate to the context. | Compare false-negative rates across relevant demographic groups. | β |
| Reproducibility | Engineering Practice | MLOps | Recreate training and evaluation results | Tracks data, code, configuration, dependencies, and random seeds or other sources of variability. | Rebuild a model version for an audit or regression investigation. | β |
GAN, LLM, and RAG
| Name | Type | Service Family | AI Task | Description | Use Scenario | PMLE In-Scope |
|---|---|---|---|---|---|---|
| Tokenization | Preprocessing Technique | NLP; LLMs | Convert text into model input units | Splits text into tokens, which may be words, subwords, characters, or other learned units. | Estimate prompt length and prepare text for model inference. | β |
| Attention Mechanism | Architecture Component | Deep Learning; Transformers | Model relationships between input elements | Computes context-dependent weights that determine how elements contribute to a representation. | Enable a language model to relate words or tokens across a sequence. | β |
| Self-Attention | Architecture Component | Transformers; LLMs | Contextual representation learning | Allows tokens within a sequence to attend to other tokens in that sequence. | Represent a word differently depending on the surrounding sentence. | β |
| Positional Encoding / Positional Embedding | Architecture Component | Transformers; LLMs | Represent token position or order | Supplies information about sequence positions so the model can distinguish ordering and relative positions. | Help a Transformer distinguish different word orders in sentences. | β |
| Masked Language Modeling (MLM) | Pretraining Objective | NLP; Foundation Models | Predict masked tokens using context | Trains a model to reconstruct hidden tokens using surrounding context. | Pretrain a bidirectional language representation model. | - |
| Causal Language Modeling | Pretraining Objective | Generative AI; LLMs | Next-token prediction | Trains a model to predict the next token based on preceding tokens. | Pretrain an autoregressive model that generates text sequentially. | - |
| Prompt Engineering | Technique | Generative AI | Steer model behavior through instructions | Designs instructions, context, constraints, and examples to improve model responses without necessarily changing model weights. | Require a model to return a structured response with explicit constraints. | β |
| Few-Shot Prompting | Prompting Technique | Generative AI | Demonstration-based task guidance | Includes several examples in the prompt to demonstrate the desired task or output format. | Provide labeled sentiment examples before asking the model to classify new reviews. | β |
| Chain-of-Thought Prompting | Prompting Technique | Generative AI | Multi-step reasoning support | Uses reasoning-oriented instructions or examples to encourage intermediate problem-solving steps. Exposed reasoning should not be treated as a guaranteed faithful explanation. | Improve performance on a multistep math or logic problem. | - |
| Structured Output / Constrained Decoding | Generation Technique | Generative AI | Schema-constrained generation | Constrains generated output to a defined format, such as a supported JSON schema. | Generate machine-readable records for downstream application processing. | β |
| Retrieval-Augmented Generation (RAG) | Architecture Pattern | Generative AI; Search | Knowledge retrieval; grounded generation | Retrieves relevant external content and supplies it to a generative model as context for answering. | Answer questions using a company's internal policies and documentation. | β |
| Vector Embeddings | Representation Technique | Semantic Search; RAG | Semantic representation; similarity search | Maps data into numeric vectors that encode useful semantic or other learned relationships. | Retrieve documents whose meaning is similar to a user's question. | β |
| Vector Search | Retrieval Technique | Semantic Search; RAG | Nearest-neighbor retrieval | Retrieves vectors close to a query vector using a selected similarity or distance measure. | Find semantically related passages for a RAG system. | β |
| Hybrid Search | Retrieval Technique | Information Retrieval; RAG | Combine lexical and semantic retrieval | Combines keyword-based search with semantic or vector-based retrieval. | Find a document using both an exact policy identifier and semantically related language. | β |
| Reranking | Retrieval Technique | Information Retrieval; RAG | Improve retrieved-result ordering | Scores an initial candidate set with a more targeted relevance model and reorders the results. | Reorder retrieved passages so the most relevant evidence reaches the LLM. | β |
| Chunking | Data Preparation Technique | RAG; Document Processing | Segment documents for retrieval | Splits documents into manageable passages, potentially with overlap or structure-aware boundaries. | Prepare lengthy manuals for embedding and retrieval. | β |
| Grounding | Generation Technique | Generative AI; RAG | Connect generated responses to evidence | Provides relevant, trusted context or sources to support generated answers. | Answer product questions using retrieved specifications instead of relying only on model memory. | β |
| Hallucination Mitigation | Reliability Technique | Generative AI | Reduce unsupported or fabricated claims | Uses grounding, constrained output, verification, abstention policies, and evaluation to reduce factual errors. | Require citations and an explicit uncertainty response when evidence is insufficient. | β |
| Retrieval Evaluation | Evaluation Technique | RAG; Information Retrieval | Measure retrieval quality | Measures whether retrieval returns relevant and sufficiently complete evidence, using metrics such as recall@k, precision@k, or ranking metrics. | Identify whether a RAG system fails because relevant passages are not retrieved. | β |
| LLM Evaluation | Evaluation Technique | Generative AI | Measure response quality and task performance | Evaluates outputs using reference answers, task-specific metrics, human ratings, model-based judges, or combinations of methods. | Compare two model versions on correctness, relevance, safety, and instruction following. | β |
| RLHF | Alignment Technique | Generative AI | Align model behavior with human preferences | Reinforcement Learning from Human Feedback uses preference feedback as part of an optimization process to steer model behavior. | Adapt a conversational model toward preferred helpful and appropriate responses. | - |
| DPO (Direct Preference Optimization) | Alignment Technique | Generative AI | Preference-based model alignment | Optimizes a model using preference pairs without requiring the traditional separate reward-model-and-RL training pipeline. | Fine-tune a model using pairs of preferred and dispreferred answers. | - |
| LoRA (Low-Rank Adaptation) | Parameter-Efficient Fine-Tuning Technique | Generative AI; LLMs | Efficient model adaptation | Trains low-rank adapter parameters while keeping most pretrained model weights frozen. | Adapt a large language model to a specialized task with fewer trainable parameters. | β |
| QLoRA | Parameter-Efficient Fine-Tuning Technique | Generative AI; LLMs | Memory-efficient fine-tuning | Combines quantized base-model weights with trainable low-rank adapters to reduce fine-tuning memory requirements. | Fine-tune a large model when GPU memory is limited. | - |
| Quantization | Model Optimization Technique | Model Deployment; Edge AI | Reduce model size and inference cost | Represents weights or activations at lower numerical precision, trading off resource usage against potential quality loss. | Deploy a model with lower memory consumption or improved inference efficiency. | β |
| Knowledge Distillation | Model Compression Technique | Model Deployment; Deep Learning | Transfer model behavior to a smaller model | Trains a student model to approximate outputs or behavior from a larger teacher model. | Create a smaller model for latency-sensitive inference. | - |
| Speculative Decoding | Inference Optimization Technique | LLM Serving | Accelerate autoregressive generation | Uses a draft model to propose tokens that a larger target model verifies, potentially reducing generation latency. | Improve token-generation speed when model and serving conditions support it. | - |
| Context Window | Model Capability | LLMs | Process input and conversation context | Defines how many tokens a model can consider in a request, including relevant input and generated context according to the model's limits. | Determine whether a large document can fit in one request or needs chunking and retrieval. | β |
| Temperature | Generation Parameter | Generative AI | Control sampling randomness | Adjusts the sharpness of token-selection probabilities during sampling; lower values generally make outputs more predictable. | Use lower temperature for consistent structured answers and higher temperature for more varied creative output. | β |
| Top-k Sampling | Generation Technique | Generative AI | Restrict next-token candidates | Samples from the k most likely candidate tokens. | Limit token choices during text generation. | β |
| Top-p / Nucleus Sampling | Generation Technique | Generative AI | Probability-based token sampling | Samples from the smallest candidate set whose cumulative probability reaches a selected threshold. | Control generation diversity by restricting sampling to likely candidates. | β |
| Prompt Injection | Security Threat | LLM Security | Exploit instruction-following behavior | Attempts to manipulate model behavior through malicious instructions in prompts or retrieved content. | Test whether an agent follows malicious instructions embedded in an external document. | β |
| Guardrails / Safety Filters | Safety Technique | Responsible Generative AI | Reduce unsafe or disallowed outputs | Applies policies, classifiers, filters, or validation steps to screen inputs and outputs. | Block disallowed content and require confirmation before sensitive actions. | β |
| Tool Calling / Function Calling | Agent Technique | Agentic AI | Invoke external functions and APIs | Lets a model select a defined tool and provide arguments that an application validates and executes. | Allow an assistant to query inventory or retrieve an order status. | - |
| Agent Planning | Agent Technique | Agentic AI | Decompose tasks into steps | Organizes a goal into actions or subgoals, potentially adapting the plan based on tool results. | Coordinate a multistep research workflow across search, retrieval, and summarization. | - |
| Retrieval-Augmented Agent | Architecture Pattern | Agentic AI; RAG | Ground agent decisions in retrieved knowledge | Combines agent orchestration and tool use with retrieval of external or enterprise information. | An internal assistant retrieves the applicable policy before initiating a workflow. | - |
Cloud and Infrastructure
MCP Authorization and Security
GCP recommends "positioning Apigee between MCP clients and enterprise backends":
- Enables fine-grained authorization (FGA)
- Complete audit trails
- Policy evaluation via emerging standards like OpenID AuthZEN
https://cloud.google.com/blog/products/ai-machine-learning/mcp-support-for-apigee
Resources and Links
Code samples: