Prepare and test your skills
Prepare and test your skills
Common limitations of foundation models are predictable weaknesses that come from training on historical data and generating answers from patterns. These limits include data dependency, a fixed knowledge cutoff, hallucinations, edge case failures, and bias that affects fairness. Understanding each limit shows why a model can sound confident while being outdated, incomplete, or unfair.
Data dependency and the knowledge cutoff explain why large language models (LLMs) (opens in a new tab) only know what was in their training data up to a fixed point. Data dependency means output quality depends on both historical training data and the prompt data supplied for that request. The knowledge cutoff is the point where training stops, so the model holds a static snapshot with no built-in awareness of later events, facts, or changes.
Historical training data flows into the model and shapes its patterns, vocabulary, and assumptions, while prompt data flows into the specific response for that request. When training data contains errors, gaps, or biases, the model repeats those flaws in outputs. When prompt data is inaccurate or incorrect, the response built from that prompt can also show poor performance or false results. Because training does not continue during everyday use, events after the cutoff never flow into the model on their own, so the model may respond with overconfidence or outdated facts when asked about new developments.
Hallucinations and edge case failures happen because foundation models learn language patterns rather than storing verified facts. A hallucination is a fluent, confident response that is not factually grounded, while an edge case failure is a wrong outcome on a rare, unusual, or complex input. In common situations the learned patterns are strong, so responses tend to be reliable, but in rare situations the model has fewer examples and fills the gap with a plausible but incorrect guess.
Training gaps appear in outputs in related ways. Edge cases lead to overconfidence, misinterpretation of context, or inappropriate outputs because they were not well represented in training. Hallucinations without grounding produce inaccurate or nonsensical answers when questions need real-world information or specific user data that was not supplied. Bias amplification carries existing prejudices from training data into outputs, and limited expertise causes superficial or lower-quality answers for highly specialized topics and for non-English languages or dialects with less representation. The core distinction is that a factually grounded response is supported by real data, while a plausible but incorrect assertion is generated from pattern alone.
Grounding connects the static model to current facts by supplying outside information at request time. Retrieval-augmented generation (RAG) (opens in a new tab) retrieves semantically relevant documents from a knowledge base and gives them to the model before generation. Embeddings (opens in a new tab), which are numerical representations of text, images, or video that capture relationships between inputs, are used to match the query with relevant knowledge in this order:
Function calling connects the model to live tools in a different way. You give the model a set of allowed functions, send a request, and the model generates structured data that specifies which function to call and the parameter values. The function runs and returns results to the model, and the model incorporates those results into its response. This lets the model reach databases, customer relationship management systems, and document repositories for real-time information and actions.
| Approach | What it supplies | Choose when |
|---|---|---|
| RAG with embeddings | Semantically relevant documents from a knowledge base | The answer should be based on stored content |
| Function calling | Real-time data and services from external tools | The answer needs live information or an action in another system |
| Grounding with Google Search | Up-to-date information from the internet | The model must decide whether its own knowledge is sufficient |
Exam tip: Training data determines what the model already knows, while grounding context supplied with the prompt determines what current or specific facts it can use accurately.
Bias and unfairness describe how prejudice in training data flows through the model to the user and affects real people. Bias is the tendency to reproduce or amplify prejudices already present in training data, while fairness is the goal of giving comparable service quality to all users and groups. The chain runs from data to model to user: data that underrepresents or stereotypes a group teaches a distorted pattern, the model applies that pattern, and the user receives an output that can carry the distortion into a real decision.
| Limitation | What causes it | How it shows up in output |
|---|---|---|
| Bias amplification | Existing biases in training data | Outputs that reinforce societal prejudices and unequal treatment |
| Language quality | Underrepresentation of some dialects and non-English languages | Inconsistent service quality and weaker generation for less-represented languages |
| Fairness benchmarks | Analyses cover only gender, race, ethnicity, and religion, and only English data | Risks outside those axes and languages are not exhaustively accounted for |
| Edge cases | Rare situations not well represented in training | Overconfidence, misinterpreted context, or inappropriate outputs |
Fairness gaps are larger because most benchmarks, including all fairness evaluations, are in English. Text generation may be less effective for some dialects or language varieties, so different users can receive different quality even when they ask the same kind of question. Social effects grow in specialized or high-stakes settings, where superficial answers or confident guesses can reinforce stereotypes, support unequal treatment, and reduce trust. For specialized use cases, models should be tuned on domain-specific data, and there must be meaningful human supervision in contexts with the potential to materially impact individual rights. Vertex AI Studio (opens in a new tab) provides built-in content filtering, and safety attribute scoring lets teams test filters and set confidence thresholds for their use case.
Google Cloud-recommended practices to address foundation model limitations combine input design, model adaptation, grounding in real data, and human oversight. Prompt engineering improves outputs without changing the model, fine-tuning specializes the model with more training, grounding anchors answers to verifiable sources, and human-in-the-loop review catches what automated controls miss. Together these practices improve factual accuracy, contextual relevance, and operational safety.
Prompt engineering is the practice of designing and improving inputs to guide a foundation model toward more accurate and relevant responses without changing model weights. Clear instructions, context, and examples flow from the prompt to the model, and the refined response flows back to the user. Because weights do not change, teams can test and revise quickly with minimal compute, data, and cost. A prompt can define a role, specify output format, add domain context, and show examples, and each revision is evaluated against actual outputs.
Model fine-tuning is the process of further training a pre-trained foundation model on a focused dataset to specialize it for a task, tone, or vocabulary. Training data flows from the curated dataset to the base model, and the result is an adapted model that responds more consistently without needing long instructions every time. Fine-tuning requires more upfront investment in quality data, compute, and evaluation. It is justified when volume is steady, language is specialized, and prompt changes cannot deliver stable quality.
| Method | Resource needs | Choose when |
|---|---|---|
| Prompt engineering | Low compute and data needs, fast iteration | The task needs immediate refinement, requirements change often, or resources are limited |
| Model fine-tuning | Higher compute, curated data, and evaluation effort | The task is specialized, repeated at scale, and needs consistent accuracy or tone |
The two methods form one lifecycle: first prompts are refined to define desired behavior with minimal spend, then only after demand proves steady and quality gaps remain does the team invest in fine-tuning to lock in performance.
Exam tip: Start with prompt engineering for fast refinement, and move to fine-tuning only when repeated testing shows prompts cannot deliver the required consistency for a specialized task.
Grounding is the process of connecting model output to specific, verifiable sources such as internal documentation, project data, or communication records. Retrieval-augmented generation (RAG) is a common grounding technique that retrieves relevant external information and gives it to the model before generation. The grounding source sends verified facts to the model, and the model generates a response based on those facts, which reduces hallucinations and makes statements traceable to source data.
A left-to-right process flow showing user query to query embedding, similarity search against a knowledge base, retrieval, generation, and grounding check returning a grounded response.
RAG depends on embeddings and vector search. Embeddings map data into a continuous vector space where closer proximity reflects similar meanings, and they are created by converting text, images, and video into arrays of floating point numbers called vectors. When a query arrives, the query is converted into an embedding, that embedding is compared to document embeddings through similarity search, and a search engine using an index embedded with semantic meanings retrieves the most relevant information. The ordered flow runs from user to knowledge base to model and back to the user:
RAG Engine (opens in a new tab) on Gemini Enterprise Agent Platform is the service for grounding responses using RAG. Configuration flows from the Agent Studio console to model settings to the selected corpus:
Components that support the RAG lifecycle work together in operation:
Grounding agents can also use Knowledge Catalog, where governed data flows from source systems to the catalog to the agent. AI applications query the catalog through semantic search and the Context API for low-latency grounding payloads, so agents ground answers in packaged, licensed data rather than ungoverned copies.
Human-in-the-loop (HITL) places a person inside the AI process to review, validate, or correct output before it is used. HITL is an added layer of oversight for cases where automated controls alone cannot guarantee correct or responsible results. Secure AI Framework (SAIF) (opens in a new tab) describes this pattern directly: AI enhances security work such as identifying threats and automating detection, while humans stay in the loop for critical decisions.
Several known weaknesses call for human review because prompt tuning alone cannot fully remove them:
Human review sits last in the recommended safety sequence, and observations from review feed back into earlier safeguards:
Practices that implement oversight assign responsibility to identifiable people and support fairness, interpretability, privacy, and security. User feedback and content monitoring detect problems in operation, abuse reporting and abuse monitoring address violations of terms, and accountability, fairness indicators, Vertex Explainable AI, data lineage, and differential privacy help reviewers understand and govern behavior. Automated safeguards still matter: Vertex AI Studio provides built-in filtering and safety attribute scoring, and rendered output such as Markdown or HTML should be sanitized with a strict sanitizer, protected with Content Security Policy headers, and controlled for external images and links. Human supervision is specifically required in contexts with the potential to materially impact individual rights.
Continuous monitoring and evaluation of generative AI models keeps a deployed model reliable, secure, and aligned with business goals after release. Performance metrics track live behavior against a baseline, lifecycle management tracks model states through tuning and evaluation, and maintenance practices keep delivery, security, and operations connected. When metrics cross thresholds, alerts trigger actions such as retraining or rollback.
Performance metrics and drift monitoring is the continuous practice of measuring a deployed model and comparing live behavior to an expected baseline. Model Monitoring on Agent Platform (opens in a new tab) tracks input data and predictions for shifts, while the Gen AI evaluation service tracks generative output for quality and safety. Insights flow from monitoring into evaluation and retraining, so reliability, accuracy, and fairness are maintained after deployment.
Key performance indicators (KPIs) are business outcomes an AI system affects, such as revenue from recommendations, customer satisfaction, or task completion rate. Each KPI depends on technical reliability metrics measured from the serving system, and teams define service-level objectives (SLOs) that state an acceptable level from the user's perspective. For AI applications, the four golden signals provide a shared foundation:
Concrete SLO targets make these signals actionable, such as 99.9% of API calls must return success, 95th percentile inference latency must be below 300 ms, TTFT must be below 500 ms for 99% of requests, and harmful output must be below 0.1%. The observability dashboard visualizes serving metrics such as model queries per second, token throughput, and first-token latency.
Drift monitoring detects when live data or predictions no longer match training conditions. The process starts by building a golden dataset that represents the ideal distribution and using TensorFlow Data Validation to establish a baseline schema. Live inputs are then compared to that baseline for automatic skew detection, and when the difference exceeds a custom threshold the system alerts and can trigger retraining or rollback to a stable version in Model Registry.
| Objective | What is compared | What a shift signals |
|---|---|---|
| Input feature drift | Live input features compared to baseline training or past production distribution | Data integrity change that may reduce accuracy |
| Output drift | Live prediction distribution compared to past prediction distribution | Behavior change, including spikes in low-confidence predictions |
| Feature attribution drift | Features driving production predictions compared to baseline attributions | Model is relying on different signals than expected |
Metrics differ for traditional machine learning and generative AI. Traditional monitoring focuses on computation-based metrics such as accuracy, precision, recall, F1-score, AUC-ROC, and log loss. Generative AI monitoring focuses on response quality, safety, instruction adherence, grounding, writing style, verbosity, toxicity scores, hallucination rates, token counts, and user-feedback ratings. Because fluency cannot be computed by formula alone, teams add LLM-as-a-judge evaluation and human-in-the-loop review. Tracking connects these signals to response: monitoring watches for unsafe, biased, or off-topic outputs, dashboards and log-based metrics capture error patterns, and alerts through email, Slack, SMS, or Pub/Sub drive retraining or rollback.
Exam tip: Training-serving skew compares live serving inputs to the training baseline, while prediction drift tracks unexpected shifts in the model's own output distribution over time.
Lifecycle management and versioning on Vertex AI (opens in a new tab) tracks a model from tuning and evaluation through inference and deployment. In Vertex AI, a model is the set of parameters and structure needed to make inferences, and a managed dataset is a dataset object created in and hosted by Vertex AI. Hyperparameter tuning adjusts chosen hyperparameters within specified limits to maximize predictive accuracy, supervised tuning jobs can be retrieved or canceled, and evaluations measure performance through a defined specification and retrievable metrics.
Vertex AI resources connect because tuning jobs adjust models, evaluations measure performance, and Identity and Access Management controls who can manage them. A model processes input data and returns output, a managed dataset supplies the hosted data resource, a supervised tuning job performs the adjustment work, and a model evaluation slice is a portion of results retrieved to inspect performance. Tracking performance follows an ordered workflow:
For text summarization, ROUGE metrics compare a response against reference ground truth, and these outputs help compare model states during iterative deployments. Tuning actions such as fine-tuning an embedding model or fine-tuning Imagen style or subject models produce candidate states that can be evaluated before promotion. Inference then puts the chosen model into production in two modes:
| Inference type | What it processes | How results are returned |
|---|---|---|
| Batch inference | A group of inference requests | Results are output in one file |
| Online inference | Individual data points | Real-time inferences |
Model versioning tracks distinct model states as they move through tuning, evaluation, and deployment. During automatic upgrades and iterative deployments, evaluation outputs help decide when a new state is ready, while IAM roles control who can manage models, datasets, tuning jobs, and evaluations so transitions stay governed.
Security and maintenance protocols are ongoing operational practices that keep a deployed model protected, current, and compliant after development. On Google Cloud these practices are built on machine learning operations (MLOps), which is the foundation for initiatives from simple classification to generative and agentic AI. Maintenance is therefore a continuous cycle of delivering, operating, and securing models rather than a one-time task.
Continuous delivery applies continuous integration (CI), continuous delivery (CD), and continuous training (CT) to machine learning systems. CI validates model and pipeline code as changes are made, CD packages and releases a validated model into its serving environment, and CT retrains the model as new data arrives. A model moves from changed to validated to deployed to retrained in a repeating loop rather than being frozen at release. Operating generative AI applications uses the same MLOps and DevOps automation to ship, monitor, and update models as inputs and usage change.
Securing the workload means protecting both the data and the environment. The security boundary runs between the data and the model that consumes it, so controls on storage and networks protect the model by controlling what can enter or leave. Secure data environments defend sensitive datasets against exposure and exfiltration, landing zone decisions set the broader cloud security design, and an event-driven pipeline can automatically evaluate files uploaded to Cloud Storage (opens in a new tab) for malicious code before they reach downstream systems. Enterprise blueprints and best practices collect these delivery, security, and quality steps into a repeatable governed process across projects.
Prompt engineering is the practice of designing and improving inputs to guide a foundation model toward more accurate and relevant responses without changing model weights, while model fine-tuning further trains a pre-trained foundation model on a focused dataset to specialize it for a task, tone, or vocabulary. Prompt engineering allows fast iteration with low compute and data needs and is chosen when refinement must be immediate or requirements change often, while fine-tuning requires higher compute, curated data, and evaluation effort and is justified when the task is specialized, repeated at scale, and needs consistent accuracy or tone.
Retrieval-augmented generation grounds responses by retrieving relevant external information and giving it to the model before generation so the model generates its answer from verified facts, which reduces hallucinations and makes statements traceable to source data. The flow converts the user query into an embedding, compares that query embedding to document embeddings through similarity search, retrieves the most semantically relevant information, and generates the grounded response from the retrieved information.
Human-in-the-loop places a person inside the AI process to review, validate, or correct output before it is used as an added layer of oversight where automated controls alone cannot guarantee correct or responsible results. Human supervision is specifically required in contexts with the potential to materially impact individual rights and appears last in the safety sequence as soliciting user feedback and monitoring content.
Input feature drift compares live input features to the baseline training or past production distribution and signals a data integrity change that may reduce accuracy, output drift compares the live prediction distribution to the past prediction distribution and signals a behavior change including spikes in low-confidence predictions, and feature attribution drift compares the features driving production predictions to baseline attributions and signals that the model is relying on different signals than expected.
Last updated