Introduction to Developer Efficiency with Gemini on Google Cloud Flashcards

(465 cards)

1
Q

You start a Vertex AI Gemini Pro lab in Google Cloud. You open Cloud Shell and run gcloud auth list. The output shows only one account:

ACTIVE: *
ACCOUNT: student-01-xxxxxxxxxxxx@qwiklabs.net

What does this mean?

A. The project is not authenticated, and you must run gcloud auth login.

B. You are already authenticated with the student lab account.

C. You must manually set the PROJECT_ID using an environment variable.

D. The authentication is incomplete until you enable billing.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You are generating code using Vertex AI Studio. To ensure consistent results with Node.js code generation, which configuration should you verify before submitting your prompt?

A. That the model is set to gemini-1.5-pro
B. That Cloud Shell is set to the latest Node.js runtime
C. That prompt-sync is pre-installed in package.json
D. That gcloud CLI is authenticated with a service account

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You want to prompt the user for loan details from the command line in Node.js. Gemini suggests using the prompt-sync library. What must you do to add it to your project?

A. Write the code const prompt = require(‘prompt-sync’)(); only
B. Add “prompt-sync”: “^4.2.0” manually to package.json
C. Run npm install prompt-sync in your project directory
D. Copy the dependency from another Node.js project

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Gemini generates the following Node.js function:

function calculatePayments(amount, downPayment, interestRate, term) {
const monthlyInterestRate = interestRate / 100 / 12;
const principal = amount - downPayment;
const numberOfPayments = term * 12;
const monthlyPayment =
(principal * monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) /
(Math.pow(1 + monthlyInterestRate, numberOfPayments) - 1);
return monthlyPayment;
}

If you input:

Loan amount = 250,000

Down payment = 25,000

Annual interest rate = 7.6%

Term = 30 years

What is the expected monthly payment?

A. $1,250.00
B. $1,388.55
C. $1,588.67
D. $1,750.23

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You are developing a Node.js application in Google Cloud Shell using Gemini Pro to assist with code generation.

You generated a loan calculator function.

You installed prompt-sync using npm.

You created a package.json file with all dependencies.

Now, you want to deploy this app to run in a production environment on Google Cloud, but you want to minimize management overhead. Which option is the best fit?

A. Run the script directly in Cloud Shell when needed.
B. Package the app in a Docker container and deploy it to Cloud Run.
C. Deploy it to Compute Engine with a custom startup script.
D. Use Vertex AI Pipelines to run the Node.js script.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You are tasked with building a regression model for loan payment prediction using Google Cloud tools. Which Vertex AI feature enables you to train, deploy, and monitor an AutoML model directly from the console without writing code?

A) BigQuery ML

B) Vertex AI AutoML

C) AI Platform Notebooks

D) Cloud Shell

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When using Gemini Pro via Vertex AI Studio to auto-generate code for a machine learning workflow, what is the correct way to prompt the model to generate code specifically in Node.js rather than Python?

A) Select ‘Node.js’ as the code language in the prompt options.

B) Explicitly specify “Generate all code in Node.js” in the prompt.

C) Use a YAML configuration in Vertex AI Studio.

D) Change model version to Gemini-1.5-flash.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is Cloud Shell recommended when working with Google Cloud resources in Vertex AI Studio for machine learning tasks?

A) Cloud Shell is required for model deployment.

B) Cloud Shell provides command-line access with pre-installed development tools and persistent storage, ensuring secure and separated sessions.

C) Cloud Shell automatically manages billing for AI services.

D) Cloud Shell can only be used for GPU-accelerated workloads.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

While setting up a Node.js application for an ML prototype in Google Cloud, what command should be used to initialize the project and create the package.json file?

A) npm start

B) npm install

C) npm init

D) node create

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Before training and deploying ML models in Vertex AI, which step must be performed to access all core features?

A) Enable all recommended APIs through the Vertex AI Dashboard.

B) Set up a custom VPC network.

C) Grant IAM access to all users.

D) Register a dataset in BigQuery.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a recommended practice for collecting user inputs for ML applications running as command-line tools in Node.js?

A) Use the prompt-sync Node.js module to prompt for user inputs.

B) Build a web interface with Flask.

C) Use Cloud Functions to collect input.

D) Store input data in Cloud SQL.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the main purpose of the package.json file in a Node.js ML application prototype?

A) Document the application’s security controls.

B) Enumerate dependencies, application metadata, and main entry point for package management.

C) Manage cloud billing and quotas.

D) Enable user authentication for ML endpoints.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is Cloud Shell recommended for running Google Cloud labs and development tasks?

A. It provides a browser-based VM with pre-installed tools and persistent storage.

B. It is a simulation environment that mimics Google Cloud locally.

C. It requires manual authentication for every session.

D. It only supports Python development.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You are building a Node.js application in Cloud Shell that requires user input from the command line. Which step ensures the dependency is properly managed?

A. Add the dependency manually in index.js.

B. Install the dependency with npm install so it is added to package.json.

C. Use gcloud add dependency to register the library.

D. Store the dependency in a .env file.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You want to integrate user input into your Node.js application that calls a Vertex AI model. Which approach is most appropriate?

A. Use prompt-sync to capture input, pass it to your function, and then call the Vertex AI API.

B. Hardcode the values in index.js for testing.

C. Use gcloud auth list to capture user input.

D. Store inputs in package.json.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When prompting a large language model in Vertex AI Studio for code generation, what is the best practice?

A. Always provide vague prompts to let the model decide.

B. Be explicit about the programming language and function requirements.

C. Use only one-word prompts to reduce confusion.

D. Avoid specifying the model version.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

After building your Node.js loan calculator, which command correctly runs the application in Cloud Shell?

A. gcloud run loan-calculator
B. npm start
C. node index.js
D. gcloud ai models predict

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

In Vertex AI Studio’s Chat interface, you need to generate a Node.js function that calculates monthly payments for an amortized loan. What is the recommended setting to toggle on above the Submit button to improve the formatting of the generated code?

A. Code Mode
B. Syntax Highlighting
C. Markdown
D. Verbose Output

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

When prompting Gemini in Vertex AI Studio to create a function for amortized loan payments, the initial response generates code in an incorrect language. How should you refine the prompt to ensure the code is produced in Node.js?

A. Add “Use JavaScript syntax” at the end of the prompt.
B. Prefix the prompt with “Generate all code in Node.js.”
C. Specify “Output in ECMAScript format.”
D. Include “Avoid Python or other languages.”

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

You are developing a Node.js application in Cloud Shell and need to create a directory for your project. Which command should you use after navigating to the home directory?

A. cd loan-calculator
B. mkdir loan-calculator
C. touch loan-calculator
D. npm init loan-calculator

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

In Vertex AI Studio, after enabling the necessary APIs, you navigate to the Chat feature to generate code. What is the default location in the left-hand navigation menu for accessing Chat under the Vertex AI Studio group?

A. Generative AI Tools > Chat
B. Vertex AI Studio > Chat
C. Dashboard > Prompt Management
D. Freeform > Code Generation

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

You have generated a Node.js function using Gemini that calculates amortized payments with parameters like amount, downPayment, interestRate, and term. What formula element is used to compute the monthly payment in the amortization calculation?

A. principal * interestRate / numberOfPayments

B. (principal * monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) - 1)

C. amount - downPayment / (term * 12)

D. interestRate / 100 * principal

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

To incorporate user input from the command line in a Node.js application generated with Gemini, which module does the model recommend for prompting the user, and how is it installed?

A. readline, installed via npm install readline
B. inquirer, installed via npm install inquirer
C. prompt-sync, installed via npm install prompt-sync
D. console-prompt, installed via npm install console-prompt

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

You are in Cloud Shell Editor and need to create a new file for your Node.js code within a specific subfolder. After opening the folder, what icon should you click to create the file?

A. Open Terminal
B. Create New File
C. Upload File
D. New Folder

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
In Vertex AI Studio's Chat, you ask for help with Node.js and receive information on using prompt-sync. To preserve the conversation for later use, what action should you take in the upper-right corner? A. Export Prompt B. Save C. Generate API Key D. Share Session
B
26
When creating a package.json file for a Node.js project in Cloud Shell, which command initializes it and prompts for details like package name and version? A. npm start B. npm install C. npm init D. node package.json
C
27
After pasting an existing function into the Freeform prompt in Vertex AI Studio and adding a comment to call the function and print the value, the generated code uses prompt-sync. What code snippet is used to get the loan amount from the user? A. const amount = input("Enter loan amount: "); B. const amount = parseFloat(prompt("Enter loan amount: ")); C. const amount = readline.question("Enter loan amount: "); D. const amount = console.read("Enter loan amount: ");
B
28
To run a Node.js application like index.js in Cloud Shell after installing dependencies, which sequence of commands should you use? A. cd ~/project/; npm init; node index.js B. cd ~/project/; npm i; node index.js C. cd ~/project/; npm start; node run D. cd ~/project/; npm install; node start.js
B
29
In the setup for using Vertex AI Studio, you need to enable APIs before generating code. Where do you navigate to enable all recommended APIs? A. Vertex AI > Studio > Settings B. Vertex AI > Dashboard C. APIs & Services > Library D. IAM & Admin > APIs
B
30
When refining prompts in Vertex AI Studio's Chat for code generation, why is it beneficial to engage in multiple rounds of clarification? A. To increase API costs for better accuracy B. To allow the LLM to better interpret needs through iterative feedback C. To switch between different models automatically D. To generate code in multiple languages simultaneously
B
31
You are developing a Node.js application in Google Cloud Shell. You need to create a `package.json` file to manage your project's metadata and dependencies. What is the standard command to initialize a new Node.js project and generate this file? A.gcloud init B.node create-project C.npm start D.npm init
D
32
You are using the Vertex AI Studio Chat interface to generate a function. Your first prompt, 'Create a function to calculate loan payments', returns code in Python, but your project requires Node.js. What is the most effective way to refine your prompt to get the correct code? A.Start a new chat and ask the same question again. B.Specify the programming language explicitly in the prompt. C.Change the model from Gemini Pro to a different one. D.Copy the Python code and ask the chat to translate it.
B
33
An ML Engineer needs to add the `prompt-sync` library to their Node.js project to handle command-line input. Which command will install the module and automatically add it as a dependency in the `package.json` file? A.gcloud components install prompt-sync B.npm install prompt-sync C.node add prompt-sync D.npm get prompt-sync
B
34
You are using the Freeform prompt interface in Vertex AI Studio with a Gemini Pro model. You have an existing JavaScript function and you want the model to generate the code that calls this function and prints the result. What is the best practice for structuring your prompt? A.Only provide the comment describing what you want. B.Paste the existing function code followed by a comment instructing the model on what code to generate next. C.Paste the function code but do not add any comments; the model will infer what is needed. D.Describe the function in natural language and then add the comment.
B
35
Before you can use services like Vertex AI Studio within a new Google Cloud project, what is a common prerequisite step that must be completed? A.Configure a VPC network. B.Enable the necessary APIs, such as the Vertex AI API. C.Activate Cloud Shell. D.Create a Cloud Storage bucket.
B
36
You are a developer working with a team that frequently struggles with debugging and analyzing logs in Google Cloud. Which Google Cloud AI-powered tool would best help your team by automatically explaining log entries and errors? A. Vertex AI AutoML B. Gemini Cloud Assist C. BigQuery ML D. Cloud Vision API
B
37
Which of the following is NOT a developer efficiency challenge commonly addressed by generative AI in Google Cloud? A. Automating unit test creation B. Reducing context switching between tools C. Automatic resource scaling of Kubernetes clusters D. Assisting with documentation writing
C
38
You want to build a machine learning model on Google Cloud but you have minimal coding experience. Which option provides the most efficient solution? A. Vertex AI AutoML B. Gemini Code Assist C. BigQuery ML D. Cloud Natural Language API
A
39
Which of the following Gemini features helps developers write SQL for analytics and transactional workloads, and also provides explanations and summaries? A. Gemini Code Assist B. Gemini in BigQuery and Databases C. Gemini Cloud Assist D. Vertex AI Pre-trained APIs
B
40
You are designing a CI/CD pipeline that integrates generative AI to improve developer efficiency. You need AI support for deployment configuration (YAML), Terraform code generation, and best practices for release. Which combination of Gemini tools would best fit this use case? A. Gemini Code Assist only B. Gemini Cloud Assist only C. Gemini Cloud Assist + Gemini Code Assist D. Vertex AI AutoML + Gemini in BigQuery
C
41
Which of the following is a common technical challenge in cloud-based developer workflows? A) Context switching between different tools and APIs B) Inability to store large datasets C) Lack of access to the internet D) Fixed toolchains that cannot be updated
A
42
What is a recommended way to reduce manual processes in Google Cloud development workflows? A) Disable code reviews B) Automate repetitive tasks such as testing and deployment C) Decrease code documentation D) Avoid using cloud APIs
B
43
How can generative AI most effectively increase developer efficiency in Google Cloud? A) Generating code and documentation automatically B) Limiting access to source code C) Reducing server resources D) Delaying deployment cycles
A
44
Which task can generative AI assist with to improve workflow efficiency? A) Creating unit tests from descriptions B) Compressing audio files C) Blocking network traffic D) Resetting passwords
A
45
Which tool provides integrated coding assistance, in-line code completion, and function generation in Google Cloud? A) Gemini Code Assist B) Cloud Scheduler C) Pub/Sub D) Cloud Composer
A
46
Which Google Cloud platform offers a unified interface to train, deploy, and manage ML models? A) Vertex AI B) Dataflow C) Cloud Storage D) Cloud Functions
A
47
In Google Cloud, which pre-trained API is best for detecting objects in images? A) Vision API B) Cloud SQL C) Pub/Sub D) Cloud Run
A
48
What is the correct gcloud command flag to make a Cloud Run service publicly accessible without authentication? A) --allow-unauthenticated B) --public C) --authless D) --no-auth
A
49
Which Google Cloud service provides SQL generation and explanation for analytics workloads? A) BigQuery Gemini B) Gemini Code Assist C) Cloud Storage D) App Engine
A
50
Which feature uses AI to help detect anomalies in monitoring logs on Google Cloud? A) AI-powered anomaly detection in Cloud Monitoring B) AutoML Tables C) Cloud Pub/Sub subscriptions D) Cloud Scheduler
A
51
How does Gemini Cloud Assist help with collaboration in cloud projects? A) Provides architectural guidance and risk assessment B) Reduces billing costs C) Increases network bandwidth D) Prevents login failures
A
52
A development team is experiencing significant delays in their workflow. New team members are finding it difficult to understand the existing complex codebase, and the team struggles to maintain consistent code quality and documentation. Which combination of AI-powered tools on Google Cloud would be most effective in directly addressing these specific challenges? A) Use Cloud Vision API to analyze diagrams in the documentation and Gemini for BigQuery to analyze code complexity metrics. B) Use Code Assist to explain code and generate unit tests, and Workspace AI to assist with creating documentation. C) Use Cloud Assist to provide guidance on best practices and Cloud Translation API to translate code comments. D) Use AutoML to train a custom model for code quality checks and the Text-to-Speech API to read out documentation.
B
53
You are tasked with building a feature that analyzes user-uploaded images to detect and identify specific company logos. The solution must be implemented quickly with minimal custom model development. Which Google Cloud service should you use? A) Vertex AI AutoML B) The Cloud Vision API C) Gemini Code Assist D) The Video Intelligence API
B
54
A developer is working within the Google Cloud console and needs to deploy a Cloud Run service using a gcloud command. They are unsure of the exact command syntax to make the service publicly accessible. What is the most efficient way for the developer to get the correct command? A) Search the public documentation for gcloud run deploy. B) Use the integrated Gemini in the Google Cloud console to ask for the command to deploy a publicly available Cloud Run service. C) Use Code Assist within an IDE to generate the command. D) Use Gemini in BigQuery to query a database of common gcloud commands.
B
55
Your team is working to improve the monitoring and operations phase of your application's lifecycle. You are frequently analyzing complex application logs in Cloud Logging to diagnose performance issues and errors. How can Generative AI be best applied to improve efficiency in this specific task? A) By generating new Terraform code for the logging infrastructure. B) By using AI to explain the meaning of complex log entries and summarize errors. C) By generating unit tests for the logging functions in the code. D) By creating visualizations of saved reports in Looker.
B
56
A project requires building and deploying a custom machine learning model on Google Cloud. The development team wants an all-in-one platform where they can manage the entire ML lifecycle, from training and tuning to deployment and management of the AI models. Which Google Cloud platform is designed for this purpose? A) BigQuery B) Cloud Run C) Vertex AI D) Looker
C
57
A developer needs to write a Python script that directly interacts with the Gemini API to generate text. The script needs to be configured to limit the length of the generated output. Which parameter should be set in the generation_config when calling the API? A) temperature B) top_p C) max_output_tokens D) safety_settings
C
58
You are preparing a dataset for training a TensorFlow model on Vertex AI. The dataset contains categorical features with high cardinality. What is the most efficient preprocessing approach? A. One-hot encoding all categorical features before uploading to Vertex AI B. Use feature hashing or embeddings during model training C. Convert categorical features to integers without scaling D. Store categorical features as free-text strings in BigQuery
B
59
You need to train a custom PyTorch model on Vertex AI with GPUs. Which setup is most appropriate? A. Use Vertex AI AutoML Tables B. Use Vertex AI custom training with a Docker container specifying GPU support C. Train locally and upload the model to Vertex AI Model Registry D. Use BigQuery ML with GPU acceleration
B
60
You have trained a model and want to serve it with low latency for online predictions. Which option should you choose? A. Batch prediction with Vertex AI B. Deploy the model to a Vertex AI endpoint with autoscaling enabled C. Export the model to BigQuery ML for SQL-based predictions D. Store predictions in Cloud Storage and query them with Dataflow
B
61
Your team wants to automate retraining when new data arrives in Cloud Storage. Which GCP service combination is best? A. Cloud Functions + Vertex AI Pipelines B. Cloud Run + BigQuery ML C. Dataflow + Pub/Sub without orchestration D. Cloud Scheduler + manual retraining jobs
A
62
After deploying a model, you notice prediction accuracy is dropping due to data drift. Which Vertex AI feature should you use? A. Vertex AI Model Monitoring B. Cloud Logging C. Cloud Trace D. Cloud Profiler
A
63
You want to ensure that only data scientists can deploy models, but analysts can only run batch predictions. How should you configure IAM? A. Assign all users the Vertex AI Admin role B. Create custom roles with least privilege for deployment and prediction C. Use Owner role for data scientists and Viewer role for analysts D. Disable IAM and manage access manually
B
64
You want to quickly experiment with different model architectures without managing infrastructure. Which option is best? A. Vertex AI Workbench with managed Jupyter notebooks B. Training models directly in Cloud Storage C. Using Cloud Functions for model training D. Writing models in spreadsheets with Apps Script
A
65
Which of the following is a common technical challenge in developer workflows that can lead to reduced efficiency? A) Skills gaps in evolving technologies B) Context switching between tools and APIs C) Communicating design ideas to stakeholders D) Lack of knowledge sharing across teams
B
66
In developer workflows, what type of challenge involves unfamiliarity with cloud architecture considerations? A) Technical challenge B) Knowledge challenge C) Collaboration challenge D) Operational challenge
B
67
Which challenge category includes difficulties in creating documentation and sharing knowledge across teams? A) Technical challenges B) Knowledge challenges C) Collaboration challenges D) Deployment challenges
C
68
A machine learning engineer is facing repetitive manual tasks like testing and deployment. This is an example of which efficiency challenge? A) Debugging complex bugs B) Outdated tools and technologies C) Lack of automation in processes D) Analyzing metrics and logs
C
69
How can generative AI specifically improve developer efficiency in handling code-related tasks? (Select two) A) Generating code and explaining code B) Automating hardware provisioning C) Writing comments and creating unit tests D) Managing team schedules
A y C
70
You are a developer troubleshooting application issues. Which generative AI capability would be most useful for analyzing complex logs? A) Generating code B) Writing emails C) Analyzing logs D) Assisting with documentation
C
71
What is the primary purpose of Vertex AI in Google Cloud? A) To provide storage solutions for big data B) To train, deploy, and manage AI models in one place C) To handle networking and security configurations D) To optimize cloud billing and costs
B
72
Which Vertex AI tool provides code completions, generates functions from comments, and helps with debugging? A) Gemini Cloud Assist B) Gemini Code Assist C) Gemini for BigQuery D) AutoML
B
73
A developer needs to generate and explain SQL for analytics workloads. Which tool should they use? A) Gemini in Looker B) Gemini in BigQuery C) Gemini Cloud Assist for Logging D) Vertex AI AutoML
B
74
Which of the following is a pre-trained API in Google Cloud that analyzes images for object detection and content classification? A) Cloud Translation API B) Speech-to-Text API C) Cloud Vision API D) Text-to-Speech API
C
75
In Vertex AI, what feature allows training custom machine learning models with minimal coding? A) Pre-trained APIs B) Codey API C) AutoML D) Gemini Code Chat
C
76
You need to call the Gemini API directly in Python to generate responses. Which of the following code snippets correctly initializes and starts a chat session? (Assume necessary imports are present) A) model = GenerativeModel("gemini-1.5-flash-001"); chat = model.start_chat(); chat.send_message([""]) B) model = GenerativeModel("codey-1.0"); chat = model.start_chat(); chat.send_message([""]) C) model = GenerativeModel("vertex-ai-basic"); chat = model.start_chat(); chat.send_message([""]) D) model = GenerativeModel("auto-ml-model"); chat = model.start_chat(); chat.send_message([""])
A
77
Which Google Cloud tool explains log entries and errors to facilitate debugging? A) Gemini Code Assist B) Gemini for Logs C) Vertex AI Pre-trained APIs D) AutoML for Text
B
78
In a developer workflow, during the "Plan" stage, which AI tool can provide guidance on architecture and best practices? A) Gemini Code Assist B) Gemini in Google Cloud console C) Gemini for BigQuery D) Cloud Vision API
B
79
A machine learning engineer is in the deployment stage and needs assistance with writing YAML for configuration. Which tool is best suited? A) Gemini Cloud Assist B) Gemini Code Assist C) Vertex AI AutoML D) Gemini in Databases
B
80
Which of the following pre-built APIs converts audio to text for data processing? A) Cloud Natural Language API B) Speech-to-Text API C) Video Intelligence API D) Cloud Translation API
B
81
In the monitoring stage of a developer workflow, which capability uses AI for anomaly detection? A) Cloud Monitoring and Logging with AI anomaly detection B) Gemini Code Assist for unit tests C) AutoML for image analysis D) Gemini in Workspace for emails
A
82
You are integrating generative AI into the development and testing phase. Which tools can generate unit tests and SQL explanations? (Select two) A) Gemini Code Assist B) Gemini in BigQuery C) Cloud Vision API D) Text-to-Speech API
A y B
83
Which Vertex AI component includes Code Generation, Code Chat, and Code Completion? A) Integrated Assistance B) Machine Learning C) Gemini APIs D) Pre-trained APIs
C
84
A developer wants to use REST APIs for machine learning tasks like landmark detection in images. This is handled by which service? A) Cloud Natural Language API B) Vision API C) Speech-to-Text API D) Video Intelligence API
B
85
A development team is struggling with the time it takes to understand and resolve bugs in their cloud-native application. They spend a significant amount of time switching between their IDE, logging platforms, and documentation. Which Google Cloud tool, powered by generative AI, is specifically designed to streamline this debugging process by explaining complex logs and errors directly within the cloud environment? A.Vertex AI AutoML B.Gemini for Logging (part of Cloud Assist) C.Gemini in BigQuery D.Gemini Code Assist
B
86
Your team needs to quickly build a feature that categorizes user-uploaded images and detects any text within them. You have a tight deadline and limited machine learning expertise on the team. What is the most efficient approach to implement this functionality using Google Cloud's AI tools? A.Use Vertex AI AutoML to train a custom image classification model. B.Build a custom model from scratch using TensorFlow and train it on Vertex AI. C.Use the Gemini API with a prompt describing the images. D.Call the pre-trained Cloud Vision API via a REST request.
D
87
A developer is working within their IDE and needs to generate a complex function based on a comment they've written. They also want to automatically generate unit tests for this new function to ensure code quality. Which AI-powered tool is designed for these specific tasks directly within the IDE? A.Gemini in Google Cloud Console B.Gemini for BigQuery C.Cloud Shell Editor D.Gemini Code Assist
D
88
A product manager wants to create a summary of user feedback from a large dataset stored in BigQuery. They have limited SQL knowledge. How can they leverage Google's AI tools to generate the necessary SQL query and understand its logic? A.Ask Gemini Code Assist to write the SQL query in their IDE. B.Use Gemini in BigQuery to generate and explain the SQL from a natural language prompt. C.Use Looker with a pre-built dashboard. D.Use the Cloud Natural Language API to process the feedback.
B
89
During the 'Plan' phase of the software development lifecycle, your team needs to collaborate on a new microservice architecture. A junior developer proposes a design, and the lead architect wants to quickly identify potential security and design risks. What is an effective way to use Gemini to assist in this process? A.Use Gemini in Workspace to automatically create the project documentation. B.Use Gemini to analyze logs from a similar existing service. C.Provide an image of the architecture diagram to Gemini and ask for a risk assessment. D.Use the Gemini API to generate the entire microservice code from scratch.
C
90
You are exploring the Vertex AI Model Garden to find a pre-trained foundation model suitable for your text summarization task. What is the primary advantage of using Model Garden for this use case? A. It allows you to deploy only custom-trained TensorFlow models B. It provides a directory of pre-trained and fine-tunable ML models with documentation and sample code C. It only lists models built internally by your organization D. It is designed solely for data labeling workflows
B
91
While accessing Vertex AI from the console, you see a button labeled “Enable all recommended APIs.” What does enabling these APIs allow you to do? A. Only view documentation for Model Garden models. B. Run and deploy ML models using Vertex AI’s managed infrastructure. C. Use AI Studio without authentication. D. Access BigQuery datasets directly.
B
92
You run the sample curl command for Gemini 2.5 Flash in Cloud Shell. What is the purpose of setting MODEL_ID and PROJECT_ID before execution? A. They authenticate the user with OAuth 2.0 tokens. B. They specify which model and project the API call should use. C. They configure the runtime environment variables for Cloud Run. D. They determine the billing account for the request.
B
93
Why is creating a Python virtual environment recommended when running Vertex AI SDK code in Cloud Shell? A. It isolates dependencies and avoids conflicts with global Python packages. B. It improves API response times. C. It increases GPU utilization for model inference. D. It is required to authenticate with Vertex AI.
A
94
What is the main purpose of opening a Colab Notebook (e.g., OWL-ViT) directly from Model Garden? A. To run local code on your machine. B. To explore interactive examples demonstrating model deployment and inference. C. To enable version control integration. D. To convert the notebook into a REST API.
B
95
You want to automate the deployment of a fine-tuned model from Model Garden into production using CI/CD. Which combination of tools best fits this goal? A. Cloud Build + Vertex AI Pipelines B. BigQuery ML + Dataflow C. Cloud Scheduler + Cloud Functions D. Dataproc + Composer
A
96
You need to quickly find a pre-trained model for an image classification use case using Google Cloud Platform. Which feature of Vertex AI should you use first? A) Enable the Vertex AI API B) Use Model Garden filters to search for vision models C) Deploy a custom AutoML pipeline D) Use Cloud Shell to write your own model from scratch
B
97
What is the main advantage of using Model Garden in Vertex AI for machine learning workflows? A) It provides only code templates for model training B) It allows you to filter, view documentation, and deploy models without writing code C) It only supports models for text analytics D) It requires using external Jupyter environments
B
98
If you find a foundation model such as BERT in Model Garden, what can you typically do directly from its model card? A) Only read a model summary B) Open a Jupyter Notebook for fine-tuning or prediction C) Launch a local ML server D) Schedule model retraining on-premises
B
99
Which approach is considered recommended best practice when running Python sample code from Model Garden in Google Cloud Shell? A) Run all code as root in the default environment B) Use a virtual environment to isolate your dependencies C) Disable all Google Cloud SDK updates before starting D) Launch the sample code from external terminals only
B
100
When using the Vertex AI Gemini API with Cloud Shell, which variables need to be set in the provided sample code for the requests to work? A) MODELTYPE and REGIONCODE B) MODELID and PROJECTID C) APIVERSION and ACCOUNTID D) TOKENLIMIT and TASKNAME
B
101
What is the purpose of the ‘Fine-Tune’ option found on certain models like BERT in Model Garden? A) To change the underlying model architecture B) To adjust the learning rate parameters only C) To launch a Vertex AI pipeline for custom training with your data D) To generate API documentation
C
102
Within Model Garden, how are models most usefully organized for effective discovery and selection? A) Alphabetically by name only B) By provider, API version, and token count C) By tasks, model collections, providers, and features D) Only by release date
C
103
For which type of machine learning tasks would you most likely use a foundation model such as Gemini 2.5 Flash or Owl-ViT in Vertex AI Model Garden? A) Only for regression on tabular data B) For generative AI, text, vision, and detection tasks C) Only for structured data analytics D) For network configuration and security modeling
B
104
If you want to experiment with a model and see example code (such as Python or curl), where should you look in Model Garden? A) The sample code or documentation section of the model card B) The Google Cloud billing portal C) The Resource Manager service D) The Stackdriver logs
A
105
Which of the following is NOT a required step before you can use Model Garden features in a new Google Cloud project? A) Selecting Vertex AI Dashboard from the Navigation menu B) Enabling all recommended APIs for Vertex AI C) Opening a support ticket with Google D) Accessing Model Garden tools through the Vertex AI interface
C
106
You are exploring Google Cloud’s Vertex AI Model Garden. What is the primary purpose of Model Garden? A. To provide a marketplace for third-party datasets B. To serve as a directory of pre-trained and fine-tunable ML models with documentation and sample code C. To automatically deploy models without user input D. To replace BigQuery ML for SQL-based model training
B
107
Before using Vertex AI and Model Garden, what must you ensure in your Google Cloud project? A. That Cloud Functions API is enabled B. That Vertex AI API is enabled C. That Cloud Storage API is disabled D. That BigQuery API is enabled
B
108
When testing the Gemini 2.5 Flash model with a prompt in Cloud Shell, which variables must be set before running the sample code? A. MODEL_ID and PROJECT_ID B. REGION and DATASET_ID C. BUCKET_NAME and SERVICE_ACCOUNT D. INSTANCE_TYPE and ZONE
A
109
When running Python code with Vertex AI SDK in Cloud Shell, what is the recommended best practice? A. Run code directly in the terminal without dependencies B. Use a virtual environment to isolate dependencies C. Always use Docker containers D. Install libraries globally on the system
B
110
You want to explore a vision model in Model Garden that supports object detection and open-vocabulary tasks. Which model would you select? A. BERT B. Gemini 2.5 Flash C. OWL-ViT D. T5
C
111
What is the purpose of the “Open Notebook” option available on certain Model Garden model cards? A. To deploy the model directly to production B. To open a Jupyter/Colab notebook with sample code for experimentation C. To create a BigQuery dataset automatically D. To generate billing reports for model usage
B
112
You search for the BERT model in Model Garden and click Fine-Tune. What happens next? A. A pre-configured Vertex AI pipeline for fine-tuning and deployment is opened B. The model is automatically deployed to an endpoint C. The model is exported to TensorFlow Hub D. A BigQuery ML job is created
A
113
In a production environment, after reviewing a fine-tuning pipeline in Model Garden, what is the next step to deploy it? A. Click “Create Pipeline,” fill in required information, and click “Submit” B. Export the model to Cloud Storage and deploy manually C. Write custom Kubernetes manifests D. Use Cloud Functions to trigger deployment
A
114
Why should you avoid using your personal Google Cloud account when working with temporary lab environments? A. Because personal accounts cannot access Vertex AI B. To prevent accidental charges to your personal billing account C. Because personal accounts do not support Cloud Shell D. To avoid conflicts with IAM roles
B
115
You are navigating the Vertex AI dashboard in the Google Cloud console. To access Model Garden, which option should you select from the Tools menu on the left? A. Try now for AI Studio B. Try now for Model Garden C. Explore Generative AI D. Access Vertex AI API
B
116
In Model Garden, models can be filtered by several criteria. Which of the following is NOT a filter option available on the left side? A. Tasks B. Model Collections C. Providers D. Pricing
D
117
You want to view detailed information about a specific model in Model Garden, such as summaries and sample code. What action should you take after locating the model card in the main window? A. Click the model card to open the model page B. Right-click and select "Export" C. Use the search bar to query the model name D. Navigate to the API & Services page
A
118
You are testing a curl command from Model Garden documentation in Cloud Shell. The command includes a prompt asking for something specific. Based on typical examples, what might the prompt be requesting? A. Interview questions B. Hardware specifications C. Database queries D. Network configurations
A
119
After running a sample curl command from Model Garden, you want to modify the prompt. What step should you take next? A. Paste the modified code into a text editor, change the prompt, and run it again B. Restart the Vertex AI service C. Delete the MODEL_ID variable D. Switch to a different model card
A
120
You need to run a Python sample code from Model Garden for a model like Gemini 1.5 Flash. What is the recommended first step in Cloud Shell? A. Create a virtual environment using python3 -m venv .venv B. Directly run pip install without activation C. Use the default Python interpreter without venv D. Install external packages via wget
A
121
In the Python sample code for interacting with a generative model in Vertex AI, which package must you install or upgrade? A. google-cloud-storage B. google-cloud-aiplatform C. tensorflow D. scikit-learn
B
122
The Python code example in Model Garden for a model like Gemini 1.5 Flash includes handling an image. How is the image incorporated into the content generation request? A. Using types.Part.from_uri with the GCS URI and MIME type B. Directly embedding the image data in the code C. Uploading the image via Cloud Shell D. Referencing a local file path
A
123
After running Python samples from Model Garden, where can you find additional code examples for generative AI on Google Cloud? A. https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/generative_ai B. The Vertex AI Dashboard C. Cloud Shell's built-in help D. The Model Garden search bar
A
124
To find models related to vision and detection in Model Garden, what should you do? A. Filter by model group types in the left pane and click "Show All" in the Foundation Models section B. Search for "vision" in the API & Services page C. Enable additional APIs first D. Use Cloud Shell to query models
A
125
For a model like Owl-ViT in Model Garden, what feature allows you to access a pre-configured environment for experimentation? A. Click "Open Notebook" to launch a JupyterLab Notebook in Colab B. Download the model directly C. Run a curl command D. Deploy via API call
A
126
You are in Model Garden and want to fine-tune a model like BERT. What action opens a Vertex AI pipeline template for this purpose? A. Search for "bert" and click "Fine-Tune" on the model card B. Navigate to the Dashboard and enable tuning C. Use Cloud Shell to create a new pipeline D. Open a Jupyter Notebook first
A
127
When reviewing a fine-tuning pipeline in Vertex AI from Model Garden, what can you do in a production environment to deploy it? A. Click "Create Pipeline," fill in required information, and submit B. Write custom code in Python C. Run it directly in Cloud Shell D. Export it to a local file
A
128
Before starting activities in Vertex AI Model Garden, what should you check if the "Enable all recommended APIs" button is visible on the dashboard? A. Click it to enable necessary APIs, or verify in API & Services if already enabled B. Ignore it and proceed to Model Garden C. Restart the console D. Switch to a different browser
A
129
Model Garden provides several resources for a selected model. Which of the following is included to help with implementation? A. Summaries, documentation, sample code, Jupyter Notebooks, and deployment instructions B. Only API endpoints C. Hardware recommendations D. Pricing details
A
130
When using Cloud Shell for running code from Model Garden, what should you do if prompted during command execution? A. Click "Authorize" if needed B. Skip the prompt C. Close and reopen Cloud Shell D. Change the PROJECT_ID
A
131
Model Garden simplifies ML and AI tasks by providing which of the following? A. Filters to find models, documentation to implement them, and tools to deploy directly B. Only model downloads C. Simulation environments D. Cost estimation tools
A
132
You are a machine learning engineer tasked with quickly finding a suitable pre-trained model for a sentiment analysis task. Which of the following Google Cloud services would be the most efficient starting point for discovering and exploring available models? A.Cloud Storage B.Vertex AI Pipelines C.BigQuery ML D.Vertex AI Model Garden
D
133
You are working with a foundation model from Vertex AI Model Garden and you need to interact with it programmatically using Python. Which of the following is the recommended best practice for managing dependencies and ensuring a reproducible environment? A.Install the necessary libraries directly into the global Python environment. B.Use a virtual environment to install the required libraries. C.Write your code in a single script and include all dependencies at the top. D.Use the `curl` command to interact with the model's API.
B
134
You have found a suitable model in the Vertex AI Model Garden and you want to fine-tune it with your own data. Which of the following options would you likely use to orchestrate the fine-tuning process in a structured and reproducible way? A.Vertex AI Model Registry B.Cloud Shell C.Jupyter Notebooks D.Vertex AI Pipelines
D
135
You want to explore and experiment with a model from the Vertex AI Model Garden in an interactive environment. Many models in the Model Garden provide a direct link to which of the following? A.A compiled binary file B.A pre-configured virtual machine C.A Jupyter Notebook (e.g., in Colab or Vertex AI Workbench) D.A downloadable container image
C
136
When using a curl command to send a request to the Vertex AI Gemini API, which of the following variables would you need to set to specify your Google Cloud project? A.PROJECT_ID B.MODEL_ID C.INSTANCE_ID D.API_KEY
A
137
A developer is reviewing complex error logs in the Google Cloud Console and uses the AI tool to simplify and summarize a specific log entry. Which critical piece of information will the AI explicitly not include or use when generating the explanation for that entry? A. The summary of the log text itself. B. The categorization of the log (e.g., Kubernetes event or JavaScript error). C. Contextual information drawn from other log entries preceding the error. D. The log simplification capabilities provided by the tool.
C
138
A team is implementing a solution that requires listing all files, including archived files, within a specific Google Cloud Storage bucket using the command line. Which command correctly executes this task? A. gcloud storage ls --list-all B. gcloud storage view -a C. gcloud storage ls -a D. gcloud storage list --include-archived
C
139
A Data Engineer is utilizing BigQuery and wants to quickly write a complex analytical query. The engineer decides to use the AI collaborator integrated with BigQuery. Which core capability can the engineer leverage using natural language input within the "Help me code" panel? A. Generating a full SQL query from a natural language prompt. B. Automatically optimizing the data schema based on the resulting query. C. Deploying the resulting SQL query as a Cloud Function. D. Performing security analysis on the data accessed by the query.
A
140
Which of the following describes the key function of the Cloud Code extension in the development workflow? A. It is a proprietary service used solely for deploying to Cloud Run. B. It acts as an IDE extension for environments like Visual Studio Code and JetBrains IDEs, including tools for development, deployment, and management of applications targeting various Google Cloud services. C. It is a standalone security monitoring platform that integrates with Chronicle. D. It is a command-line tool used exclusively for generating Compute Engine instances.
B
141
When integrating the AI collaborator for security operations, which security analytics platform is utilized for a comprehensive view of security data? A. BigQuery. B. Security Command Center (SCC). C. Secret Manager. D. Chronicle.
D
142
A team needs to launch a new virtual machine that will only communicate with internal Google Cloud services and must not be assigned a public IP address. When creating this Compute Engine instance using the gcloud compute instances create command, which specific flag must be used to enforce this private network configuration? A. --boot-disk-size B. --zone C. --no-address D. --machine-type
C
143
As an AI-powered collaborator in the software development lifecycle, which domain is the tool designed to assist with? A. Data analytics. B. Security management. C. Development and operations. D. All of the above.
D
144
You are explaining Gemini’s role to a new developer on your team. Which of the following best describes Gemini’s capabilities in Google Cloud? A. Gemini is a command-line tool used to deploy Kubernetes clusters. B. Gemini is an AI-powered collaborator that assists across various Google Cloud services. C. Gemini is a standalone IDE for building machine learning pipelines. D. Gemini is a monitoring tool for visualizing Cloud Run logs.
B
145
In which of the following use cases would Gemini for Workspace be most helpful? A. Deploying a new VM instance from Cloud Shell. B. Writing a SQL query for BigQuery. C. Drafting and refining a presentation deck. D. Running Terraform scripts for infrastructure provisioning.
C
146
You are using Visual Studio Code with Cloud Code extension. What should you do before enabling Gemini Code Assist? A. Enable Gemini in your Google Cloud project and in IDE settings. B. Create a Cloud Function for authorization. C. Install a separate Gemini binary. D. Configure a private endpoint in Cloud Shell.
A
147
ou want to generate a code snippet using natural language in your IDE. What is the correct sequence? 1.Write a natural language prompt as a comment 2.Click the light bulb 3.Select the entire prompt 4.Choose “Generate code” A. 1 → 3 → 4 → 2 B. 4 → 1 → 2 → 3 C. 2 → 3 → 1 → 4 D. 3 → 1 → 4 → 2
A
148
Gemini supports code generation for over 20 languages. Which of the following languages is NOT currently supported? A. Java B. Python C. Rust D. SQL
C
149
You want Gemini to help you analyze data in BigQuery. What can Gemini do for you? A. Create BigQuery datasets automatically. B. Generate and complete SQL queries from natural language. C. Deploy models to BigQuery ML. D. Manage IAM permissions for BigQuery datasets.
B
150
Which feature of Gemini for Data Analytics provides insights or guidance during query development? A. Contextual recommendations B. Schema inference C. Data encryption D. Auto-scaling
A
151
How does Gemini help security teams working with Chronicle? A. It replaces Chronicle’s SIEM capabilities. B. It provides natural language search and contextual recommendations across security data. C. It manages IAM roles automatically. D. It runs penetration testing simulations.
B
152
What are Quick Start Templates used for in Gemini Security Operations? A. Generating Terraform infrastructure. B. Starting with common security analytics tasks such as search, correlation, and reporting. C. Creating synthetic datasets for ML. D. Building new APIs for monitoring.
B
153
When using Gemini to explain log entries, what information does Gemini use to generate summaries? A. The entire project log history. B. Only the log text of the selected entry. C. Related logs from other services. D. Logs combined with metrics data.
B
154
What is the primary benefit of using Gemini to summarize log entries? A. Automatically remediates errors. B. Provides easier interpretation of complex logs. C. Increases query performance in Logs Explorer. D. Correlates logs across all Google Cloud projects.
B
155
A development team is using Cloud Shell Editor with Gemini Code Assist. They want to generate code suggestions and explanations. However, Gemini is not responding. What is the most likely cause? A. Gemini is not enabled in the Google Cloud project. B. The project is missing a default service account. C. Cloud Shell lacks IAM roles for Cloud Functions. D. Gemini requires a paid subscription for Cloud Code.
A
156
You are building a data analytics pipeline on Google Cloud and wish to generate SQL queries from natural language prompts. Which tool should you use? A) Cloud Dataflow B) Dataform C) Gemini in BigQuery D) Cloud Functions
C
157
You want an AI-powered collaborator that can assist with code generation, code completion, and explaining log entries in a Google Cloud IDE. What feature should you enable? A) Cloud Shell B) Gemini Code Assist C) Data Studio D) Vertex AI Notebooks
B
158
Which Google Cloud tool allows you to list all items in a storage bucket using command line? A) gsutil B) gcloud storage C) Cloud Storage API D) Data Catalog
B
159
You want to create a new Compute Engine instance in Google Cloud without assigning a public IP via command line. Which flag is correct? A) --public-ip=off B) --no-public-ip C) --no-address D) --disable-ip
C
160
You need to draft meeting notes and automatically generate summaries for Google Docs with AI assistance. Which Google Cloud solution can help? A) Gemini for Workspace B) Cloud Functions C) BigQuery ML D) Dataproc
A
161
An error occurred in your Node.js application and was logged in Stackdriver. Which feature lets you use AI to summarize and explain that log entry? A) Cloud Monitoring Alerts B) Gemini log explanation C) Pub/Sub D) Audit Logs
B
162
If you wish to receive code recommendations and automated best-practice suggestions directly in Visual Studio Code while building for Google Cloud, which extension should you use? A) Cloud SQL Auth Proxy B) Cloud Code IDE extension C) Dataprep D) BigQuery Data Transfer Service
B
163
For role-based access controls (RBAC) in a web application using Google Identity Platform, which document feature should you utilize? A) User groups B) OAuth scopes C) Role-based access control (RBAC) D) API logging
C
164
You must integrate natural language analytics for your security event data from Chronicle SIEM on Google Cloud. Which capability does Gemini provide? A) Contextual recommendations B) Only log storage C) Encryption management D) Hardware usage metrics
A
165
A developer wants to explain and summarize the activity of a log entry using AI from the Google Cloud console. What button is used for this? A) "Debug" B) "Summarize log" C) "Explain this log entry" D) "Log details"
C
166
You are a developer working on a new application in Visual Studio Code. You need to write a complex function but are unsure of the optimal implementation using Google Cloud best practices. You want to receive AI-powered assistance directly within your IDE to help you generate, complete, and explain the code you are writing. Which tool should you use to accomplish this? A) Google Cloud Shell Editor B) Gemini in the Google Cloud console C) Gemini Code Assist D) BigQuery's "Help me code" panel
C
167
You are tasked with analyzing user activity data stored in a BigQuery table. You need to write a SQL query to find the number of articles in the wikipedia_benchmark.Wiki1M table that contain the word "Google" in their title. You are not a SQL expert and want to generate the query using a natural language prompt. Where would you do this most efficiently? A) In the Gemini in Google Cloud console chat interface. B) By writing a comment in a SQL file using Gemini Code Assist in your IDE. C) In the "Help me code" panel directly within the BigQuery UI. D) In the Logs Explorer, by asking Gemini to explain a relevant query.
C
168
Your team is troubleshooting a production issue where a service is behaving unexpectedly. You are reviewing the logs for the service in Google Cloud's Logs Explorer and find a complex and lengthy error log entry. You need to quickly understand the key points of this specific log entry without analyzing other logs for context. What is the most direct way to achieve this using Gemini? A) Copy the log text and paste it into the Gemini chat in the Google Cloud console. B) Use the "Explain this log entry" feature available for the specific log in Logs Explorer. C) Enable Gemini in your IDE settings and ask it to analyze the log file. D) Generate a new query in BigQuery to parse the log and summarize its contents.
B
169
A junior developer on your team needs to implement a new API endpoint in a JavaScript application. The requirements are to filter products added within the last seven days that are also in stock. The developer wants to use natural language to generate the boilerplate code for this function. What is the correct procedure for using Gemini Code Assist to generate code from a prompt? A) Type the request into the Gemini chat panel and copy the resulting code. B) Write a detailed natural language prompt as a comment in the code, select the comment, and choose the "Generate code" option. C) Start writing the function signature, and press CTRL+ENTER to trigger an enhanced suggestion. D) Use the "Refine" option in the IDE to ask Gemini to add a new function based on a prompt.
B
170
You are an administrator responsible for a wide range of tasks across Google Cloud. You need an AI-powered collaborator that can assist with not only development and operations but also security management, data analytics, and database queries. Which overarching Google Cloud AI service is designed to provide this broad range of assistance? A) Cloud Code B) Gemini C) Chronicle D) BigQuery
B
171
While writing code in Cloud Shell Editor, you start defining a function. As you move to the next line to write the function's body, Gemini Code Assist automatically provides a suggestion for the entire code block. What is the quickest way to accept this single-line or multi-line suggestion? A) Press the TAB key. B) Press CTRL+ENTER. C) Click the light bulb icon next to the code. D) Right-click and select "Gemini: Accept suggestion."
A
172
You are preparing a dataset for training a TensorFlow model on Google Cloud. The dataset is stored in BigQuery. What is the most efficient way to feed this data into your training job on Vertex AI? A. Export the data to CSV files in Cloud Storage and read them with pandas B. Use the BigQuery Storage API with TensorFlow I/O to stream data directly C. Download the data locally and upload it to the training container D. Copy the data into a Cloud SQL database and connect from the training job
B
173
You need to preprocess categorical features with high cardinality before training a model. Which Google Cloud service provides a managed way to build and reuse feature transformations across teams? A. Dataflow B. Dataprep C. Vertex AI Feature Store D. Cloud Functions
C
174
You want to train a deep learning model on GPUs using Vertex AI. Which configuration is most cost-effective while ensuring scalability? A. Use custom containers with preemptible GPU VMs in a distributed training setup B. Train locally on your laptop and upload the model to Vertex AI C. Use Cloud Functions to parallelize training across multiple CPUs D. Use BigQuery ML with GPUs enabled
A
175
You have trained a model and want to deploy it for real-time predictions with low latency. Which option should you choose? A. Deploy the model to Vertex AI Prediction with autoscaling enabled B. Export the model to BigQuery ML and run queries for predictions C. Use Cloud Functions to load the model and serve predictions D. Store predictions in Cloud Storage and let clients download them
A
176
After deployment, you notice that your model’s performance is degrading due to data drift. Which Vertex AI feature helps you detect and respond to this issue? A. Vertex AI Experiments B. Vertex AI Model Monitoring C. Cloud Logging D. AI Hub
B
177
Your company requires that models comply with fairness and explainability standards. Which Google Cloud tool helps you evaluate bias and interpretability? A. What-If Tool (WIT) in Vertex AI B. Cloud Logging C. Cloud Scheduler D. Cloud Pub/Sub
A
178
You want to automate the ML lifecycle from data ingestion to deployment. Which service provides a managed orchestration environment for ML pipelines? A. Cloud Composer B. Vertex AI Pipelines C. Dataflow D. Cloud Run
B
179
You need to deploy a new version of a model but want to keep the old version available for rollback. How should you handle this in Vertex AI? A. Replace the old model with the new one B. Deploy the new model as a separate endpoint C. Upload the new model as a new version under the same endpoint D. Delete the old model to avoid confusion
C
180
You are a machine learning engineer developing a model deployment pipeline in Google Cloud. You need an AI tool that can assist with drafting technical documentation, such as model architecture outlines and reports in Google Docs. Which Gemini feature is best suited for this task? A. Gemini for Security Operations B. Gemini for Data Analytics C. Gemini for Workspace D. Gemini Code Assist
C
181
As a machine learning engineer, you are analyzing security events related to access patterns in your ML dataset stored in Google Cloud. You want to use natural language to search security event data and get contextual recommendations for incident response. Which integration does Gemini provide for this purpose? A. Integration with BigQuery B. Integration with Chronicle C. Integration with Cloud Code D. Integration with Compute Engine
B
182
You are querying a large dataset in BigQuery to preprocess data for a machine learning model. You need to generate a SQL query from a natural language description, such as "Find the average feature values grouped by category." Which capability of Gemini in BigQuery supports this? A. Real-time code recommendations B. Generate a SQL query from a natural language prompt C. Summarize log entries D. Code completion in IDE
B
183
In your ML workflow, you are using the Google Cloud console to create a Compute Engine instance for training without a public IP. You ask Gemini: "How do I create a compute engine instance without a public IP address using the command line?" What flag should be included in the gcloud command as suggested by Gemini? A. --public-ip=false B. --no-address C. --private-ip-only D. --internal-access
B
184
You are integrating AI assistance into your IDE for developing ML code targeting Google Cloud services like Kubernetes and Cloud Run. Which IDEs support Gemini Code Assist through the Cloud Code extension? A. Only Visual Studio Code B. Visual Studio Code, JetBrains IDEs, and Cloud Shell Editor C. Only JetBrains IDEs D. Eclipse and IntelliJ only
B
185
As an ML engineer, you need to enable Gemini in Cloud Shell Editor for code generation in your project. What steps must you follow after logging in to Google Cloud? A. Install the extension manually and restart the editor B. Enable Gemini in the Google Cloud Project and then in IDE settings C. Run a gcloud command to activate AI features D. Add a Gemini API key to the project
B
186
You are chatting with Gemini in your IDE to get guidance on best practices for deploying an ML model to Cloud Functions. Which feature of Gemini Code Assist provides answers to coding questions and automates tasks like test generation? A. Code completion B. Natural language chat C. Log summarization D. SQL query explanation
B
187
While writing Python code for an ML model, you want Gemini to generate a full function based on a natural language prompt in a comment. What is the process to invoke code generation in the IDE? A. Type the prompt and press TAB B. Select the prompt comment, click the light bulb icon, and choose "Generate code" C. Use CTRL+ENTER on the blank line D. Open the chat interface and paste the prompt
B
188
You have multiple code suggestions from Gemini for a data preprocessing function in your ML script. How can you review and select the most appropriate one? A. Navigate through versions using arrows and accept word by word or entirely B. Only accept the first suggestion automatically C. Rerun the generation command until satisfied D. Edit the code manually without navigation
A
189
As an ML engineer, you are writing code and want inline suggestions to complete a partially written line, such as a TensorFlow import. What key do you press to accept a basic suggestion from Gemini Code Assist? A. CTRL+ENTER B. ENTER C. TAB D. SHIFT+TAB
C
190
You need enhanced code suggestions for a complex ML algorithm implementation. What shortcut triggers this in Gemini Code Assist? A. TAB B. CTRL+ENTER C. ALT+SPACE D. SHIFT+ENTER
B
191
When using Gemini to generate code for ML tasks, what should you always check in the inserted code? A. If it includes external dependencies B. If the code does what you want and is subject to any license C. Only the syntax errors D. The computational complexity only
B
192
You are troubleshooting an ML training job and encounter a complex log entry in Logs Explorer, such as a Kubernetes event. How do you use Gemini to simplify it? A. Copy the log to the chat interface in the IDE B. Click "Explain this log entry" button, which opens in Gemini chat C. Run a gcloud command to summarize D. Paste into BigQuery for analysis
193
What data is sent to Gemini when summarizing a log entry for an ML job error? A. The entire project context and other logs B. Only the specific log text, without additional context C. Security event data from Chronicle D. SQL queries from BigQuery
B
194
Gemini Code Assist supports code generation for over 20 languages. Which of the following is NOT listed as a supported language for ML-related development? A. Python B. JavaScript C. SQL D. Fortran
D
195
In a lab scenario for ML engineers, you are using Gemini throughout the software development lifecycle. What is the primary focus of such a lab? A. Building hardware for ML training B. Generating code, completing code, and understanding logs with Gemini C. Managing cloud billing D. Configuring network security
B
196
You are an ML Engineer working on a new project that requires analyzing a large dataset stored in BigQuery. You are not an expert in SQL, but you need to quickly formulate a query to count the number of articles in the wikipedia_benchmark.Wiki1M table that contain the word "Google" in their title. What is the most efficient method to accomplish this using AI-assisted features within the BigQuery console? A. Manually write the SQL query SELECT COUNT(*) FROM bigquery-samples.wikipedia_benchmark.Wiki1M WHERE title CONTAINS 'Google';. B. Use the "Help me code" panel to type a natural language question like "how many articles do we have with Google in the title?" and let the system generate the SQL for you. C. Export the table to Cloud Storage and use a Python script with the Pandas library to perform the count. D. Use the table preview feature and manually scroll through the data to estimate the count.
B
197
You are developing a data processing script in the Cloud Shell Editor. You need to create a new function but are unsure of the precise syntax. You have written a comment in your code describing the function's purpose: // Create a function that filters a list of products to return only those added in the last 7 days. What is the next step to have the AI assistant generate the full code for this function? A. Press the Tab key to trigger auto-completion. B. Select the comment text, click the light bulb icon (or use the command palette), and choose the "Generate code" option. C. Press Ctrl+Enter to get an enhanced suggestion. D. Right-click on the comment and select "Explain this".
B
198
A machine learning model deployed on Cloud Run has failed, and you are reviewing its logs in the Logs Explorer to diagnose the problem. You find a complex and lengthy error log entry containing a full stack trace that is difficult to interpret. What is the most direct and efficient feature within Logs Explorer to get a simplified, human-readable summary of what caused the error? A. Use the search bar to filter for logs with "ERROR" severity. B. Manually copy the textPayload and paste it into a separate AI chat window. C. Expand the log entry and select the "Explain this log entry" button. D. Click the "Correlate by" button to view logs from the same instance.
C
199
You are using VS Code with the appropriate extension to develop a Python script for a machine learning pipeline. As you are writing a line of code, the editor displays a grayed-out suggestion for the remainder of the line. What is the standard keyboard key to accept this type of single-line code completion suggestion? A. Enter B. Ctrl + Space C. Esc D. Tab
D
200
You are working as part of a development team and need to ensure all members can use AI-powered assistance for coding, debugging, and general guidance within their preferred IDEs (VS Code and JetBrains). Which Google Cloud component must be installed as an extension in these IDEs to enable features like natural language chat, code generation, and code completion? A. The gcloud command-line tool. B. The Google Cloud SDK. C. The Cloud Code extension. D. A remote desktop client connected to a Cloud Workstations instance.
C
201
What is the fundamental goal of effective prompt design when interacting with a Large Language Model (LLM)? A. To maximize the computation time to ensure complex problem-solving. B. To lay a foundation that increases the probability that the LLM will predict the appropriate sequence of tokens for the desired use case. C. To force the LLM to ignore its training data entirely and rely only on the prompt instructions. D. To simplify the input by only providing keywords and avoiding contextual details.
B
202
Which three factors are essential considerations when designing a prompt for a generative AI model? A. The desired length of the input, the specific programming language of the model’s core engine, and the model deployment region. B. The complexity of the grammar used, the length of the prompt history, and the date the model was last updated. C. The desired output, the target audience, and the limitations of the generative AI model. D. The number of tokens used, the negative prompt count, and the explicit mention of existing variables.
C
203
A developer is attempting to generate a complex Node.js function using a generative AI assistant. The first attempt resulted in a broad and generic function. According to prompt design best practices, what steps should the developer take to improve the output? A. Prompt for answers that are long and complex in a single request to provide maximum detail. B. Break the complex problem into multiple, progressive requests to allow the model to refine and focus its answers. C. Use simple keywords like "create function" without further context to keep the request concise. D. Avoid mentioning the specific programming language or technologies to maintain model flexibility.
B
204
When writing instructions to a generative AI model, which pair of principles best describes the preferred language style? A. Use ambiguous language and avoid adding context. B. Use simple language and avoid jargon. C. Use complex sentences and highly specialized technical jargon. D. Use negative language (e.g., "Don't use X") and avoid specific detail.
B
205
A Machine Learning Engineer wants to generate a secure Python code snippet for a Cloud Function but specifically wants to ensure that a certain security mechanism (e.g., a specific non-recommended library) is not included. How should the engineer phrase the prompt to enforce this exclusion effectively? A. Use only positive language, avoiding any mention of the unwanted library. B. Use a negative prompt (e.g., "Don't use [unwanted library name]"). C. Request the code, then manually edit the output to remove the unwanted mechanism. D. Ask the model to generate the code for a specific expert level, assuming experts exclude bad practices.
B
206
Why is providing details about the technologies, products, or programming languages in a prompt crucial for achieving accurate results from a generative AI assistant? A. It reduces the cost associated with running the model. B. It ensures the response is delivered in the correct language. C. The more context and detail the model is given, the more accurate and useful its answers are likely to be. D. It guarantees that the output will be completely accurate and correct, regardless of the model's training data.
C
207
Which prompting technique is recommended to teach the generative AI model to write responses in a user's specific style or format? A. Use positive language only. B. Add context about the user's expertise level. C. Provide specific examples written in the past to teach the desired style. D. Use tokens to represent words and concepts.
C
208
You are using Gemini Code Assist to generate Python code for a Cloud Function triggered by Pub/Sub. Your first attempt yields a vague result. What is the most effective way to improve the response? A. Add more keywords related to “Cloud Function” and “Pub/Sub” B. Provide context, desired output, and specify that the function must use all parameters C. Use shorter prompts with general descriptions D. Remove all technical terms to simplify the prompt
B
209
Which of the following is NOT a recommended best practice in prompt design? A. Be clear and concise B. Add relevant examples C. Use negative prompts when necessary D. Use vague, open-ended language to encourage creativity
D
210
You want Gemini to generate a function in Node.js that saves a book to Firestore. What should you include in the prompt for best results? A. Only mention “save book function” B. Include all parameters, expected return value, and avoid try-catch blocks C. Ask for “any function” that saves data D. Focus only on syntax
B
211
Why is prompt design important in generative AI? A. It ensures 100% accurate model responses B. It improves the probability of generating desired, safe, and creative outputs C. It allows direct control over model weights D. It reduces model latency
B
212
You want Gemini to write a blog post in your style. What should you include in your prompt? A. A single sentence request B. Examples of your past writing and desired tone C. Generic adjectives like “good” or “professional” D. Instructions to use creative language only
B
213
ou ask Gemini: "Create a secure website on Google Cloud." The result lacks detail. Which revised prompt best aligns with Gemini best practices? A. “Deploy website on Cloud Run.” B. “How can I deploy any website on Google Cloud?” C. “How to set up a simple, secure Google Cloud site for hosting a blog, using Cloud Run and Cloud SQL?” D. “Secure website Cloud Run deploy example.”
C
214
When writing prompts for Gemini Code Assist, you should avoid: A. Including the desired programming language B. Asking for all required arguments C. Requesting long, complex responses in a single prompt D. Explaining your expertise level
C
215
What is the goal of prompt design when using LLMs? A. To force the model to produce specific answers B. To guide the model toward predicting the most appropriate tokens C. To increase model speed D. To reduce API costs
B
216
What does it mean to “write prompts as if talking to a person”? A. Avoid technical terminology B. Include details, reasons, and expected outcomes C. Keep prompts under 10 words D. Use slang to be natural
B
217
Which factor is most critical when designing prompts for a generative AI model like Gemini? A. Model architecture B. Token limit C. Desired output and audience D. Hyperparameter tuning
C
218
Why is prompt design important when using large language models (LLMs) in Google Cloud? A) It increases the chances the model will produce outputs that match the desired intent. B) It always guarantees factual results. C) It reduces the cost of model training. D) It ensures the model response is always the same.
A
219
What is a best practice when crafting prompts for generative AI models? A) Use vague requests so the model can choose the output style. B) Add as much context and specificity as possible to guide the output. C) Always use negative phrasing to prevent errors. D) Include unrelated information for broader creativity.
B
220
Which of the following factors should you consider when designing a prompt for a generative AI model in Google Cloud? A) Desired output B) Target audience C) Model limitations D) All of the above
D
221
What is a potential risk of poorly designed prompts when working with LLMs? A) Increased probability that the model produces hallucinated or unreliable outputs B) Reduced model training time C) Higher token throughput D) Ensures only concise responses
A
222
When using Duet AI or Gemini Code Assist, which of the following improves the accuracy of code-generating prompts? A) Providing code context, variable names, and function requirements in the prompt B) Keeping prompts generic and open-ended C) Omitting technical requirements D) Avoiding any references to specific products
A
223
When requesting a model to generate a response in a specific style (e.g., professional email, Python function), what should you do? A) Specify the format, style, and any required fields directly in the prompt B) Let the model guess the format C) Use only technical jargon D) Ask the model to decide what’s most appropriate
A
224
Why is it recommended to break down complex prompt requests into multiple, smaller prompts when using generative AI? A) It makes outputs more focused and reliable B) It confuses the model and increases creativity C) It uses fewer resources D) The model cannot process instructions in steps
A
225
Which statement best describes the role of examples in prompt design? A) Examples teach the model to produce outputs in the desired style or format B) Examples make prompts more ambiguous C) Examples hinder model performance D) Examples are ignored by the model
A
226
How do model limitations affect prompt design in Google Cloud LLMs? A) Prompts must account for what the model cannot do, to avoid unrealistic expectations B) Model limitations can be ignored C) Models always know the latest facts D) Prompt design can override model knowledge gaps
A
227
What should you do to avoid unwanted output from a generative AI model? A) Use negative prompts specifying what should not be included B) Rely on the model's internal filters C) Include no instructions about exclusions D) Always use long, complex phrases
A
228
You are working with a large language model (LLM) to generate code for a new application. You provide the model with a simple prompt: "Create a function." The model returns a generic function that doesn't fit your application's requirements. To get a more useful and specific code snippet, which of the following prompts is the most effective? A) "Write some code for me." B) "Generate a Python function to calculate the factorial of a number using recursion. The function should be named 'recursive_factorial' and accept one integer argument." C) "I need a function. Make it better." D) "Don't write a generic function."
B
229
When interacting with a generative AI model like Gemini, your goal is to guide its predictions. What is the primary mechanism through which a well-designed prompt achieves this? A) It alters the model's underlying architecture to suit the user's request. B) It increases the probability that the model will predict the most appropriate sequence of tokens for the desired output. C) It forces the model to ignore its training data and generate completely new information. D) It directly accesses and modifies the model's parameters to ensure a correct answer.
B
230
You are building a complex workflow using a generative AI assistant to create a secure, scalable blogging platform on Google Cloud. Your initial prompt, "How do I build a website?", yields a very broad and generic response. According to prompt design best practices, what is the best approach to get a more useful and actionable response? A) Prompt for the entire solution in a single, very long, and detailed request. B) Break down the problem into smaller, sequential requests, starting with a foundational piece. C) Use only keywords like "GCP," "website," and "secure." D) Repeat the same broad question multiple times, hoping for a different outcome.
B
231
When designing a prompt for a generative AI model, which of the following is a key factor to consider for improving the accuracy and relevance of the output? A) The desired output, the target audience, and the limitations of the model. B) The model's version number and release date. C) The physical location of the server running the model. D) The number of tokens in your user account.
A
232
You need to create a Node.js function that handles an asynchronous operation. To ensure the generated code avoids a specific programming pattern, which of the following prompts is constructed more effectively? A) "Write an async function but don't use try-catch blocks." B) "Create an asynchronous function to update a Firestore document. Use a Promise to handle the asynchronous call instead of async/await." C) "Generate an async function and avoid any errors." D) "Give me a Node.js function."
B
233
You are preparing a dataset for training a TensorFlow model on Vertex AI. The dataset is stored in BigQuery. What is the most efficient way to feed this data into your training job? A. Export the dataset to CSV and upload it to Cloud Storage. B. Use the BigQuery API to stream rows directly into the training job. C. Use BigQuery ML to train the model directly. D. Use the BigQuery connector for TensorFlow (tf.data.experimental.make_bq_dataset).
D
234
You want to train a large deep learning model on Vertex AI using GPUs. Which setup is most cost-effective while ensuring scalability? A. Use a custom training job with preemptible GPUs. B. Use AutoML Tables with GPUs enabled. C. Use a managed notebook instance with GPUs. D. Use BigQuery ML with GPU acceleration.
A
235
You have trained a TensorFlow model and want to deploy it for online predictions with low latency. Which option should you choose? A. Deploy the model to Vertex AI Prediction with autoscaling enabled. B. Use Dataflow to batch predictions. C. Export the model to BigQuery ML for predictions. D. Run predictions locally on a Compute Engine VM.
A
236
You need to automate retraining whenever new labeled data arrives in Cloud Storage. Which GCP service combination is best? A. Cloud Functions + Vertex AI Pipelines. B. Cloud Scheduler + BigQuery ML. C. Pub/Sub + Dataflow. D. Cloud Run + AI Platform Notebooks.
A
237
You are deploying a model that predicts loan approvals. To ensure fairness and transparency, which Vertex AI feature should you use? A. Vertex Explainable AI. B. Vertex AI Matching Engine. C. Vertex AI TensorBoard. D. Vertex AI Vizier.
A
238
After deployment, your model’s prediction accuracy starts to drop due to changes in input data distribution. Which Vertex AI feature helps detect this? A. Vertex AI Model Monitoring. B. Vertex AI Feature Store. C. Cloud Logging. D. Cloud Trace.
A
239
You want to tune hyperparameters for your model efficiently. Which Vertex AI feature should you use? A. Vertex AI Vizier. B. Vertex AI Workbench. C. Vertex AI Matching Engine. D. Vertex AI TensorBoard.
A
240
You are developing an application using Vertex AI and Gemini to generate summaries of historical figures. You notice that generic prompts like "Tell me about Linus Torvalds" yield basic responses, while more specific prompts produce detailed timelines or creative outputs. What is the primary mechanism by which well-designed prompts improve the output of large language models (LLMs) like Gemini? A. They directly override the model's training data with new information. B. They increase the probability that the next predicted token in the sequence is the most appropriate one. C. They reduce the number of tokens processed to speed up inference. D. They enforce strict rules on the model's vocabulary to avoid hallucinations.
B
241
In a Google Cloud project, you are using Gemini to assist in code generation for a Node.js application. You want to ensure the model avoids certain patterns, such as using try-catch blocks in asynchronous functions. Which prompt design technique should you apply to guide the model away from unwanted outputs? A. Use positive language to describe desired behaviors only. B. Incorporate negative prompts to explicitly exclude unwanted elements. C. Add examples of complete code without any restrictions. D. Specify the target audience as expert developers.
B
242
As a machine learning engineer, you are fine-tuning prompts for Gemini in Vertex AI to improve response accuracy for a content generation task. Which of the following is NOT a key factor to consider when designing prompts for generative AI models? A. Desired output format and content. B. Target audience and their needs. C. Limitations of the generative AI model. D. The physical location of the model's deployment.
D
243
You are building a pipeline in Google Cloud that integrates Gemini for natural language tasks. To emulate a specific style or role in responses, such as a technical expert explaining concepts, what best practice should you follow in prompt design? A. Use only keywords to keep prompts concise. B. Add context about the role, job, or additional information the model should convey. C. Limit prompts to questions without any explanatory details. D. Avoid examples to prevent biasing the model.
B
244
In a scenario where you are using Gemini Code Assist in Google Cloud to generate Python code for Cloud Functions, you observe that broad prompts lead to incomplete or generic code. How can you enhance the prompt to ensure the generated function includes all required parameters and can be inserted directly into your codebase? A. Provide names of existing variables and instruct the model to include all parameters. B. Use complex sentences to describe multiple scenarios at once. C. Enter only the function name without additional details. D. Specify the model's training data version.
A
245
You are optimizing prompts for Gemini in a Vertex AI endpoint to handle user queries about Google Cloud services. A user with beginner-level expertise asks for deployment instructions. Why should you include the user's expertise level in the prompt? A. To limit the response length for faster processing. B. To generate more appropriate explanations tailored to beginners or experts. C. To bypass the model's safety filters. D. To increase the token limit for the response.
B
246
While designing prompts for a generative AI application in Google Cloud, you aim to improve the creativity and safety of outputs from Gemini. What is the main benefit of using well-designed prompts in this context? A. They allow the model to access external APIs during inference. B. They help improve the accuracy, creativity, and safety of the generative AI output. C. They reduce the computational cost of model training. D. They eliminate the need for post-processing filters.
B
247
You are tasked with creating prompts for Gemini to generate code snippets in a Google Cloud lab environment. For a complex task like building a Cloud Function that handles Pub/Sub triggers and sends emails, what approach should you take to avoid overwhelming the model and refine responses? A. Break the complex problem into multiple, progressive prompts. B. Use a single long prompt with all details included. C. Rely on keywords like "Pub/Sub email function" without context. D. Specify unrelated technologies to broaden the response.
A
248
In prompt engineering for LLMs like Gemini on Google Cloud, what does a "token" represent, and how do LLMs use them to generate responses? A. A token is a fixed word; LLMs compile them into sentences based on grammar rules. B. A token can be characters, words, or phrases; LLMs predict the next likely token in a sequence. C. A token is a data type; LLMs use them to store training data. D. A token is an API call; LLMs count them to limit response size.
B
249
You are using Gemini in Vertex AI to generate educational content. To teach the model your preferred writing style for explanations, what technique should you incorporate into your prompts? A. Use negative language to exclude other styles. B. Add examples of past writings or desired question-answer formats. C. Increase the prompt length with jargon. D. Specify the model's internal parameters.
B
250
As part of a Google Cloud ML workflow, you are prompting Gemini for information on workloads. Instead of entering "workload Cloud Run," you enter "What kind of workloads does Cloud Run support?" Why is the second prompt more effective? A. It treats the model as a conversational assistant, providing better context for specific answers. B. It reduces the token count for cost efficiency. C. It activates advanced search features in the model. D. It avoids referencing specific products.
A
251
You need Gemini to generate a secure website deployment guide in Google Cloud. To provide context and detail, you include the purpose: "How to set up a simple, secure Google Cloud site for hosting a blog." What benefit does explaining the "why" behind the task provide? A. It helps the model ignore model limitations. B. It provides additional context to generate more relevant and detailed responses. C. It shortens the response by focusing on essentials. D. It changes the model's prediction algorithm.
B
252
In designing prompts for code assistance with Gemini in Google Cloud, you want to ensure clarity. Instead of saying "Don’t use async and await," you say "Use a Promise for the asynchronous call." This follows which best practice? A. Using positive language to guide desired behaviors. B. Adding examples of code. C. Being specific about products. D. Including expertise level.
A
253
You are creating prompts for Gemini to handle queries about specific Google Cloud technologies. Why should you explicitly include details like the programming language or product name in the prompt? A. To increase the model's training data temporarily. B. To make responses more accurate and useful by providing targeted context. C. To reduce the probability of token prediction. D. To enable multi-modal inputs.
B
254
In a lab setting using Gemini Code Assist on Google Cloud, you are generating Node.js methods. A detailed prompt like "Create a node.js method that accepts request and response arguments, creates a book object with title, description and author properties and passes the object to repo.saveBook, that returns a new book object. Return the new book object from the method" yields functional code. This demonstrates which key principle? A. Using simple language without specifics. B. Being specific and clear in prompt design to guide precise outputs. C. Avoiding context to keep responses broad. D. Relying on negative prompts exclusively.
B
255
You are using a Large Language Model (LLM) to generate a Python function that needs to process data from a Pub/Sub topic and then write the results to a BigQuery table. To ensure the generated code is as useful and complete as possible, what is the most effective approach when writing your prompt? A) Prompt with keywords like "python pub/sub bigquery". B) Ask the model to "Write a function to connect Pub/Sub to BigQuery". C) Provide a detailed prompt that includes the names of your existing Pub/Sub topic, BigQuery dataset, and table, and ask the model to include all necessary arguments and error handling. D) Ask the model for two separate functions: one for reading from Pub/Sub and another for writing to BigQuery.
C
256
Your team is developing a new customer-facing chatbot using Gemini. You need the chatbot to respond to user queries about product returns with empathy and a helpful, professional tone. Which prompt design strategy should you use to achieve this specific output style? A) Use a negative prompt like "Do not sound robotic". B) Add context to your prompt by defining a persona, such as "You are a friendly and helpful customer service agent for an e-commerce company." C) Simply ask the model to answer questions about product returns. D) Provide a long and complex prompt that lists every possible customer question.
B
257
You need to create a complex CI/CD pipeline using Google Cloud services, and you want to use an AI assistant to help generate the configuration files. The full task involves setting up a Cloud Source Repository, creating a Cloud Build trigger, defining a multi-stage build process, and deploying to two different Cloud Run environments (staging and production). What is the recommended method for prompting the AI assistant? A) Write a single, comprehensive prompt detailing the entire CI/CD pipeline from start to finish. B) Break the complex problem into multiple, smaller requests. First, ask for the repository setup, then for the Cloud Build trigger, and so on, building on the results of each previous step. C) Use a very general prompt like "Create a CI/CD pipeline" and let the model figure out the details. D) Include your expertise level in the prompt, for instance, "I am an expert DevOps engineer, show me a CI/CD pipeline".
B
258
You are prompting a generative AI model to create a JavaScript function for an asynchronous API call. You want to ensure the code uses modern JavaScript syntax but avoids try-catch blocks in favor of promise-based error handling. Which of the following is the most effective prompt? A) "Write a JavaScript function for an API call. Do not use try-catch." B) "Write an asynchronous JavaScript function to fetch data. Avoid errors." C) "Write a JavaScript function to call the updateUser method asynchronously. Use a Promise for the asynchronous call and handle errors with .catch()." D) "Generate some JavaScript code for an API."
C
259
A junior developer on your team is struggling to get useful responses from an AI code assistant. Their prompts are often just a few keywords, such as "Cloud Run workload." Why is this approach unlikely to yield a high-quality result? A) The model requires prompts to be phrased as a question. B) Keyword-only prompts lack the necessary context for the model to provide a specific, useful answer, resulting in generic or broad responses. C) The model's training data does not include information about Cloud Run. D) The model performs better with prompts that are intentionally long and complex.
B
260
Which Google foundational model is specifically designed for text-to-image generation, accessible via the platform that simplifies prompting and deployment? A. Gemini B. PaLM 2 C. Chirp D. Imagen
D
261
A developer wants to use the low-code, customizable solution provided by Google Cloud to experiment with prompts, adjust parameters, and deploy foundational models before moving to API integration. Which tool should the developer utilize? A. Google Cloud CLI B. Vertex AI Workbench C. Vertex AI Studio D. Cloud Functions
C
262
When deploying an application that uses the Generative AI APIs on Google Cloud runtimes such as Cloud Run, App Engine, or Cloud Functions, what default service account is typically used, and what principle does relying solely on this default violate? A. The service account assigned the Vertex AI User role; violates separation of duties. B. The Compute Engine Default Service Account; violates the principle of least privilege. C. A user-managed service account; violates cost management guidelines. D. The Google-managed API Service Agent; violates data residency policy.
B
263
A data scientist is setting up a new service account to manage API calls to the Vertex AI Gemini API. What IAM role is required to ensure this service account has the necessary permissions while adhering to security best practices? A. Service Account Token Creator B. Vertex AI User C. Vertex AI Service Agent D. Compute Instance Admin
C
264
To improve the quality and relevance of code generation output when using the Gemini API, a developer can use a specific parameter to define the role, context, or persona for the model. What is the name of this parameter? A. generation_config B. safety_settings C. system_instruction D. max_output_tokens
C
265
Which of the following tasks is explicitly listed as a capability of the Gemini APIs for developers? A. Generating complex 3D models from text input. B. Performing Code Optimization on existing, slow functions. C. Automatically distributing ML training jobs across regions. D. Managing Infrastructure as Code (IaC) configuration.
B
266
When using the Vertex AI Python client library, which of the following code snippets correctly initializes the Python environment for interacting with the generative models? A. gcloud auth login B. pip install --upgrade google-cloud-storage C. vertexai.init(project="", location="us-central1") D. model.connect_to_cloud()
C
267
What is the primary technical process that Vertex AI uses when fine-tuning a foundational model like Gemini for a specific use case, allowing customization based on new data without starting from scratch? A. Reinforcement Learning B. Transfer Learning C. Federated Learning D. Zero-Shot Learning
B
268
A company needs to fine-tune a code generation model to successfully generate code that utilizes their proprietary custom libraries and specific internal language conventions. What format must the company provide their training data in for the code tuning dataset? A. CSV format B. XML format C. JSONL format D. YAML format
C
269
Which of the following scenarios is a valid reason for choosing to fine-tune a Gemini code model rather than relying solely on advanced prompting techniques? A. The need to reduce API latency below standard limits. B. The requirement to generate code specific to proprietary internal custom libraries. C. The model frequently fails to generate common boilerplate Python code. D. The necessity to change the maximum token limit for output generation.
B
270
You’re developing a Python application that uses the Gemini API to generate code suggestions. What is the most secure way to authenticate your application when running on Cloud Run? A. Use your personal user credentials with gcloud auth login B. Assign the Compute Engine Default Service Account directly with the Editor role C. Create a custom service account with Vertex AI Service Agent role and assign it to the runtime D. Store a downloaded service account key in your repository and load it manually
C
271
Which Python library should you install to interact with Vertex AI Gemini APIs? A. google-cloud-storage B. vertex-ai-sdk C. google-cloud-aiplatform D. google-vertex-gemini
C
272
You want to improve Gemini’s accuracy for code generation. Which of the following prompt design practices is recommended? A. Keep prompts short to avoid confusion B. Provide system instructions with explicit role and behavior context C. Use random examples to show flexibility D. Avoid using system instructions to maintain creativity
B
273
You want Gemini to generate code aligned with your company’s custom library conventions. What’s the correct approach? A. Train a new model from scratch with TensorFlow B. Fine-tune Gemini using JSONL labeled samples in Vertex AI Studio C. Use Gemini’s “Code Chat” without training D. Use pre-built Gemini templates
B
274
You want Gemini to produce Python code that follows best practices automatically. Which of the following is the best approach? A. Use system_instruction with context about PEP8 standards B. Use default model settings with no config C. Use Codey instead of Gemini D. Post-process code with black formatter
A
275
You need to call the Gemini API from a shell script using curl. What is the correct way to include the authentication header? A. -H "Authorization: Bearer $(gcloud auth print-access-token)" B. -H "Auth-Token: $(gcloud get-token)" C. -H "Token: $(gcloud access token)" D. -H "Authorization: $(gcloud print-access-token)"
A
276
What is a primary benefit of using Vertex AI Studio for prompt design? A. It requires no authentication B. It provides a UI to experiment with prompts and adjust parameters before deployment C. It automatically deploys prompts to production D. It replaces the need for the Gemini API
B
277
You’re building a CI/CD pipeline on Cloud Build that deploys an app using Gemini. To follow least privilege, which configuration is most appropriate? A. Use the default Compute Engine service account with Editor role B. Create a dedicated service account with only Vertex AI User and Storage Object Viewer roles C. Create a user-managed key and store it in Secret Manager D. Use Cloud Build’s default service account without any extra permissions
B
278
When fine-tuning Gemini, how can you verify the performance of your tuned model? A. Use a bucketed evaluation dataset to test the model on unseen examples B. Compare loss during training only C. Use the same dataset used for training D. Rely on user feedback post-deployment
A
279
What is the primary purpose of using the Vertex AI Gemini API in machine learning projects? A) To manage compute resources for training ML models B) To generate and complete code snippets for ML workflows C) To host and serve large datasets D) To perform hyperparameter tuning automatically
B
280
Which authentication method is recommended for securely accessing the Vertex AI Gemini API from an application running on Google Cloud? A) Embed a username and password in code B) Use a service account with the "Vertex AI Service Agent" role C) Use API keys passed via query parameters D) Anonymous access with public endpoint
B
281
In Vertex AI Studio, fine-tuning a foundation model is useful primarily for which scenario? A) Automatically generating training datasets B) Tailoring a model to perform better on specific, custom data or language variants C) Increasing the general-purpose capabilities of the base model D) Deploying models with autoscaling enabled
B
282
What format is typically used to prepare a dataset for supervised tuning of a foundation model in Vertex AI Studio? A) CSV file with labeled columns B) JSON Lines (JSONL) format with input-output pairs C) TFRecord format only D) Excel spreadsheets with multiple sheets
B
283
Which best practice helps improve the accuracy of code generation and completion when using the Gemini API? A) Use explicit system instructions and add relevant examples in prompts B) Keep prompts as short and vague as possible to allow creativity C) Avoid providing context to the model for unbiased output D) Use random temperature values for every generation request
A
284
When deploying ML models, what is a recommended approach to monitor model performance over time? A) Rely on initial validation metrics only B) Enable monitoring using Vertex AI Model Monitoring to detect data drift and prediction skew C) Restart the model monthly regardless of performance D) Monitor only the latency of inference requests
B
285
What is a key advantage of using Vertex AI Studio for managing ML workflows? A) It completely eliminates the need for data preprocessing B) It offers a low-code, user-friendly interface for prompt design, tuning, and deployment of foundational models C) It replaces all manual model evaluation steps with automated black box testing D) It locks models during deployment to prevent updates
B
286
How can service accounts improve security in code development workflows involving Vertex AI? A) They provide anonymous access to services without authentication B) They allow for least privilege access and automated authentication in cloud environments C) They automatically grant full admin access to all Google Cloud APIs D) They store user passwords securely
B
287
You are a developer building an application that needs to programmatically generate Python code snippets based on natural language descriptions provided by users. Your application runs on Google Cloud. Which Google Cloud service and API should you use to accomplish this with the latest generative AI capabilities? A) Cloud Natural Language API B) Vertex AI PaLM 2 for Text API C) Vertex AI Gemini API D) AutoML Tables
C
288
Your team is developing a new feature that translates legacy C# code into modern Python. To ensure the generated Python code adheres to your company's strict internal coding standards and utilizes custom-built libraries, you need to adapt one of Google's foundational models. What is the most effective approach to achieve this? A) Use prompt engineering with few-shot examples in Vertex AI Studio. B) Fine-tune the Gemini model with a dataset of labeled code examples that reflect your company's standards and libraries. C) Deploy the pre-trained Gemini model and add a post-processing step to reformat the code. D) Use the Imagen API to visually inspect and correct the code.
B
289
You are deploying a web application on Cloud Run that needs to call the Vertex AI Gemini API to generate creative text descriptions. To follow the principle of least privilege, you need to configure authentication for your application. What is the recommended method for authenticating a service running on Google Cloud? A) Generate a personal access token using the gcloud CLI and embed it in the application's source code. B) Create a service account, assign it the Vertex AI Service Agent role, and attach it to the Cloud Run service. C) Store a service account key in JSON format within the application's container image. D) Use an API key and restrict its usage to the application's IP address.
B
290
You are using Vertex AI Studio to experiment with prompts for generating SQL queries. You have constructed a complex prompt and now want to integrate it into a Python application using the Vertex AI SDK. What feature in Vertex AI Studio helps you bridge the gap between prompt design and code integration? A) The "Save" button, which saves the prompt for later use. B) The "Get Code" feature, which generates the equivalent Python, cURL, or other language code for the current prompt and its settings. C) The "API Reference" link, which provides general documentation for the API. D) The "Submit" button, which sends the prompt to the model for a response.
B
291
A developer on your team has written a Python function that is performing calculations incorrectly. They are unsure why the logic is failing. They decide to use Gemini to help them. Which of the following use cases best describes how Gemini can assist the developer? A) Code Generation B) Code Conversion C) Debugging D) Text to SQL
C
292
You are preparing a dataset to fine-tune a Gemini model for a code generation task. The model will be trained to convert natural language queries into specific JSON structures. What is the required format for the training data file you need to provide to Vertex AI? A) A CSV file with two columns: "input" and "output". B) A single large text file containing all the examples. C) A JSONL file where each line is a JSON object containing an "input_text" and an "output_text" field. D) A ZIP archive containing individual text files for each training example.
C
293
You are preparing a dataset for training a TensorFlow model on Google Cloud. The dataset is stored in BigQuery. You want to ensure efficient training on Vertex AI. What should you do? A. Export the dataset to CSV files in Cloud Storage and load them directly into TensorFlow. B. Use the BigQuery TensorFlow connector (tfio.bigquery) to stream data during training. C. Export the dataset to TFRecord format in Cloud Storage and use it for training. D. Query BigQuery directly from your training script using the BigQuery API.
C
294
You are building a custom model on Vertex AI. You want to ensure reproducibility of your training runs. What should you do? A. Use Vertex AI Workbench notebooks and manually rerun cells. B. Package your training code in a Docker container and submit it as a custom training job. C. Train locally and upload the model artifact to Vertex AI. D. Use pre-built containers without specifying dependencies.
B
295
Your team wants to automate ML pipelines for continuous training and deployment. Which Google Cloud service should you use? A. Cloud Functions B. Vertex AI Pipelines with Kubeflow Pipelines C. Cloud Run D. Dataflow
B
296
You trained a model on Vertex AI and want to deploy it for real-time predictions with low latency. What should you do? A. Deploy the model to Vertex AI Prediction as an endpoint. B. Export the model to Cloud Storage and serve it with Cloud Functions. C. Use BigQuery ML for real-time predictions. D. Deploy the model on Dataproc.
A
297
You deployed a model to production. Your stakeholders want to understand why the model makes certain predictions. Which Vertex AI feature should you use? A. Vertex AI Model Monitoring B. Vertex Explainable AI C. Cloud Logging D. AI Platform Jobs
B
298
You are training a model and want to ensure fairness and detect bias in your dataset. Which tool should you use? A. Vertex AI Feature Store B. TensorFlow Data Validation (TFDV) C. What-If Tool (WIT) D. Cloud Monitoring
C
299
You need to train a large deep learning model that requires multiple GPUs. Which setup is recommended? A. Use Vertex AI custom training with a GPU-enabled machine type and distributed training strategy. B. Train on a local workstation with GPUs. C. Use BigQuery ML with GPUs. D. Use Cloud Functions with GPU support.
A
300
Your team wants to centralize and reuse features across multiple ML models. Which service should you use? A. BigQuery ML B. Vertex AI Feature Store C. Cloud Spanner D. Dataflow
B
301
You want your model to automatically retrain when new labeled data arrives in Cloud Storage. What should you do? A. Use Cloud Scheduler to trigger a training job daily. B. Configure Vertex AI Pipelines with a trigger on Cloud Storage events. C. Manually retrain the model when needed. D. Use BigQuery scheduled queries.
B
302
You are running hyperparameter tuning jobs on Vertex AI. How can you minimize costs? A. Use smaller machine types without GPUs. B. Enable early stopping in hyperparameter tuning. C. Run all trials sequentially instead of in parallel. D. Use preemptible VMs for training.
B
303
You are developing an application that uses the Vertex AI Gemini API to generate code. Which of the following is a primary capability of the Gemini API for developers? A. Generating hardware blueprints for custom AI accelerators B. Generating and completing code in multiple programming languages C. Automatically deploying applications to Kubernetes clusters D. Optimizing database queries without user input
B
304
In Vertex AI Studio, what is the purpose of providing system instructions when designing prompts for code generation? A. To limit the API to only use open-source libraries B. To provide context and improve the accuracy of the model's responses C. To encrypt the data sent to the model D. To automatically version control the generated code
B
305
A developer is integrating the Gemini API into a Python application running on Google Cloud Run. To adhere to the principle of least privilege, what should they do for authentication? A. Use the Compute Engine Default Service Account, as it has the Editor role B. Create a service account, assign the Vertex AI Service Agent role, and assign it to the runtime C. Download API keys and hardcode them into the application code D. Use personal user credentials for all API calls
B
306
Which Python package must be installed to use the Vertex AI Gemini API in a Python script? A. google-cloud-bigquery B. google-cloud-aiplatform C. tensorflow D. scikit-learn
B
307
When using the Gemini API for code-related tasks, which of the following is NOT a supported use case? A. Writing test code B. Generating documentation and comments C. Debugging code D. Automatically compiling and executing code in a production environment
D
308
In a Python script using the Gemini API, what does the 'system_instruction' parameter in the GenerativeModel initialization allow you to do? A. Specify the hardware accelerator for model inference B. Provide overarching guidelines or context for the model's behavior, such as always documenting code C. Set the encryption key for data transmission D. Define the output format as JSON only
B
309
You need to fine-tune a Gemini model for a custom library in your codebase. What format should the training data be supplied in? A. CSV with labeled examples B. JSONL with input-output pairs C. SQL scripts D. Binary serialized objects
B
310
To authenticate API calls using cURL to the Vertex AI endpoint, what header must include the bearer token generated from gcloud? A. Content-Type B. Authorization C. X-Goog-Api-Key D. User-Agent
B
311
What is a key benefit of using Vertex AI Studio for experimenting with foundational models like Gemini? A. It provides automatic scaling for training custom ML models from scratch B. It offers an intuitive interface to prompt, tune, and deploy models with easy parameter experimentation C. It integrates directly with Google Workspace for collaborative editing D. It handles data ingestion from BigQuery without any configuration
B
312
A team wants to improve Gemini's code generation accuracy for Python best practices. What approach should they take in their prompts? A. Use implicit keywords without examples B. Give explicit instructions, add examples, and use system_instruction for context like following PEP 8 C. Increase the temperature parameter to maximum D. Switch to a different model like PaLM 2 exclusively
B
313
Which of the following is a reason to fine-tune Gemini for specific use cases? A. To enable the model to generate code using conventions from a language variant or custom library B. To reduce the cost of API calls by compressing data C. To integrate with external databases like Cloud SQL D. To automatically monitor model drift in production
A
314
In Vertex AI Studio, when starting a new session, what options are available based on your goal for using generative AI? A. Create text content, generate code, create a chat, chat about code B. Train classifiers, perform regression, cluster data C. Deploy VMs, manage storage, configure networking D. Analyze logs, monitor metrics, set alerts
A
315
You are debugging a temperature conversion function in Python using Gemini. The original code has an error in the formula: celsius = fahrenheit - 32 * 5 / 9. What is the correct fixed formula Gemini might suggest? A. celsius = fahrenheit * 5 / 9 - 32 B. celsius = (fahrenheit - 32) * 5 / 9 C. celsius = fahrenheit + 32 / 5 * 9 D. celsius = (fahrenheit + 32) / 5 * 9
B
316
When converting code from Python to JavaScript using Gemini, what is an example of a task it can handle? A. Reversing bits in an integer by manipulating binary strings B. Automatically migrating an entire monolithic application to microservices C. Optimizing hardware drivers for GPU acceleration D. Generating SSL certificates for secure connections
A
317
What role should be assigned to a service account for using the Vertex AI Gemini API while following best practices? A. Editor B. Viewer C. Vertex AI Service Agent D. Owner
C
318
In the context of code optimization with Gemini, if a slow function approximates pi using a loop, what might Gemini suggest as an optimized version? A. Use a more complex loop with additional iterations B. Import and return math.pi directly C. Switch to a recursive function D. Use external API calls for pi calculation
B
319
You are using Vertex AI Studio to generate a test fixture for a Python class. Which library does the generated code typically import for unit testing? A. pytest B. unittest C. nose D. doctest
B
320
Which parameter in the generation_config dictionary controls the maximum number of output tokens in a Gemini API response? A. temperature B. top_p C. max_output_tokens D. stream
C
321
For fine-tuning Gemini, where are the tuned model and training data stored? A. In a shared Google project accessible to all users B. Separately in your own Google Cloud project C. On local storage only D. In Vertex AI's global repository
B
322
You are developing a Python application that will run in a Cloud Run service. To follow security best practices and the principle of least privilege, you need to configure a service account for the application to authenticate to the Vertex AI Gemini API. Which IAM role should you assign to this service account? a) Owner b) Editor c) Vertex AI User d) Vertex AI Service Agent
D
323
Your team is using Vertex AI Studio to prototype a new feature that generates Python code. You have perfected a prompt that includes specific system instructions, examples, and optimal parameter settings (like temperature and token limit). What is the most efficient method to transfer this exact configuration from Vertex AI Studio into your production application code? a) Manually copy and paste each parameter value from the Studio UI into your Python script. b) Save the prompt in the Vertex AI Studio and use its unique name in the API call. c) Use the GET CODE feature within Vertex AI Studio to automatically generate a code snippet for Python or cURL that includes all the settings. d) Take a screenshot of the settings to ensure the developers can replicate them accurately.
C
324
You want to use Gemini to generate code that interacts with your company's large, proprietary codebase. The base Gemini model has no knowledge of your internal libraries and APIs, so its initial attempts at code generation are inaccurate. What is the recommended approach to make the model aware of your specific codebase? a) Use few-shot prompting by providing many examples of your code within every API request. b) Increase the temperature parameter to a higher value to allow the model to be more creative. c) Create a dataset with examples from your codebase and use it to fine-tune the base Gemini model. d) Submit a request to Google to have your library included in the next training run of the base model.
C
325
When making a call to the Gemini API from a Python script, you need to provide high-level instructions to guide the model's behavior for all subsequent prompts in that session. For example, you want it to always act as an expert Go developer who follows specific style guides. Which parameter should you use to set this context? a) generation_config b) prompt c) system_instruction d) safety_settings
C
326
You are preparing a dataset to fine-tune a Gemini model for code generation. The dataset consists of pairs of prompts and the ideal code output you expect. According to the documentation, what format is required for this training data file? a) A CSV file with 'input' and 'output' columns. b) A series of Python files organized in training and validation folders. c) A single text file with prompts and responses separated by a special token. d) A JSONL file, where each line is a JSON object containing an input_text and output_text pair.
D
327
Which of the following capabilities is a primary, documented use case of the Gemini API for developer workflows? a) Refactoring a monolithic application into microservices automatically. b) Generating unit tests for an existing class or function. c) Provisioning and configuring Google Cloud infrastructure. d) Performing automated security scans on a codebase.
B
328
Which categories of machine learning models are available for choice and flexibility within Vertex AI Model Garden? A. Google Foundation Models only. B. Google, enterprise-ready open source, and third-party foundation models. C. Custom-trained models and AutoML models only. D. TensorFlow models exclusively.
B
329
A machine learning developer is seeking models to generate structured code, such as functions and tests, based on natural language descriptions, and also requires capabilities for multi-turn reasoning and debugging. Which Google Foundation Model family is specifically suited for these functionalities? A. PaLM 2 B. Codey C. Gemini D. Imagen
C
330
A security team needs to deploy a pre-trained solution on Vertex AI for analyzing live video streams to ensure worker safety regulations are being followed. Which specialized detection task is relevant for this requirement, as outlined in the task-specific solutions for Vision? A. Entity analysis B. PPE detection C. Text Moderation D. Sentiment analysis
B
331
Which of the following are examples of models categorized under the "Partner and Open Ecosystem" section within Vertex AI Model Garden? A. EfficientNetV2 and ResNet B. PaLM 2 and Gemini 1.0 Ultra C. Llama 2, Code Llama, and Falcon D. TabNet and AutoML E2E
C
332
What is the primary function of the Vertex AI Model Registry for an organization managing its machine learning assets? A. It is a tool used exclusively for orchestrating MLOps pipelines. B. It acts as a central repository for managing the lifecycle of models, including creation, import, and versioning. C. It serves as the primary deployment environment for serving real-time predictions. D. It is used solely for automatically training new models using managed datasets.
B
333
When importing an already trained model into the Vertex AI Model Registry, which combination of machine learning frameworks is explicitly supported for model import? A. Keras and Caffe B. TensorFlow, scikit-learn, PyTorch, and XGBoost C. MATLAB and Spark MLlib D. Only models trained using Vertex AI custom training jobs
B
334
When preparing a dataset for supervised fine-tuning (SFT) of a Generative Model on Vertex AI, what are the key requirements for the data fields? A. The input_text must only contain raw data, and output_text must contain the model version number. B. The input_text should contain instructions matching production user inputs, and the output_text should contain the expected content in the desired format. C. Both fields should contain identical, unformatted raw text to ensure consistency. D. The dataset must be stored locally on the VM running the tuning job.
B
335
You are designing a machine learning solution and want to quickly find pre-trained, open-source, and Google foundation models that can be fine-tuned for your specific use case. Which Vertex AI feature should you use? A. Vertex AI Workbench B. Vertex AI Model Garden C. Model Registry D. AutoML Training Interface
B
336
To leverage a fine-tuned generative model (resulting from an sft.SupervisedTuningJob) for generating new content, how should the model object be initialized for inference using the Vertex AI preview libraries? A. tuned_model = GenerativeModel(sft_tuning_job.tuned_model_endpoint_name) B. tuned_model = ModelRegistry(sft_tuning_job.model_id) C. tuned_model = PredictionService.load(sft_tuning_job.tuned_model_name) D. tuned_model = tuning.load_model(sft_tuning_job.id)
A
337
You need a model that can classify objects in images and another one that can generate descriptive captions for those images. Which pair of models in Vertex AI Model Garden would you use? A. YOLO for object detection and CLIP for image captioning B. ResNet for image captioning and BERT for object detection C. T5-FLAN for image detection and MobileNet for text generation D. Codey for code generation and Imagen for captioning
A
338
Your data science team has trained a custom model in PyTorch. They want to manage its versions and deploy it from a central repository. What should they use? A. Vertex AI Pipelines B. Vertex AI Model Registry C. Vertex AI Workbench D. Vertex AI Training Jobs
B
339
You are building a custom chatbot that must respond in a specific JSON format. You tried prompt engineering with PaLM 2 but the model still produces inconsistent structure. What is the most effective approach to improve output consistency? A. Add more examples in the same prompt using few-shot learning B. Fine-tune the model with JSON-formatted input/output pairs C. Chain multiple API calls until the format is correct D. Use a smaller model to increase determinism
B
339
Your client needs a speech-to-text solution supporting multiple languages. Which model would you recommend from Vertex AI Model Garden? A. Chirp B. Codey C. Imagen D. Llama 2
A
340
After fine-tuning your model, you want to make predictions via an endpoint. What’s the correct next step? A. Export the model and deploy manually in Compute Engine B. Save the tuned model to Model Registry and deploy to an endpoint C. Upload model weights to Cloud Storage and call directly D. Use Vertex AI TensorBoard for predictions
B
341
Your team wants to reduce time-to-value when integrating domain-specific models (e.g., healthcare OCR, product recognition). They also want enterprise-grade security and compliance. Which approach best meets these needs? A. Build models from scratch using TensorFlow in Vertex AI Workbench B. Use task-specific pre-trained models from Vertex AI Model Garden C. Train custom models with AutoML Tabular D. Download open-source models from Hugging Face and deploy manually
B
342
What is the primary purpose of Vertex AI Model Garden? A) To provide a platform for deploying custom TensorFlow models only B) To browse, customize, fine-tune, and deploy pre-trained and foundation models from Google and third parties C) To serve only open-source models from Hugging Face D) To only manage datasets for training machine learning models
B
343
What is the advantage of using the Vertex AI Model Registry? A) It is only for storing datasets B) It is a centralized repository to manage the lifecycle of machine learning models including creation, import, deployment, and versioning C) It only allows importing models but does not support training new ones D) It is an alternative to BigQuery for data storage
B
344
Which statement accurately describes fine-tuning in Vertex AI? A) Fine-tuning is only possible for TensorFlow models B) Fine-tuning involves adjusting a pre-trained foundation model using task-specific data to improve performance on a particular use case C) Fine-tuning deletes the original model and replaces it with a new one D) Fine-tuning requires training a model from scratch
B
345
How does the Gemini model family support different user needs? A) Only one model size is available for all use cases B) Multiple model sizes and capabilities exist to balance cost, performance, and task requirements, including domain-specific models for specialized industries C) All Gemini models are open-source and free to use without restrictions D) Gemini models only support single-task learning
B
346
What formats are supported for importing pre-trained models into Vertex AI Model Registry? A) Only TensorFlow SavedModel format B) TensorFlow, scikit-learn, PyTorch, and XGBoost C) Only ONNX format D) Only models trained in Vertex AI AutoML
B
347
What is the purpose of creating a supervised tuning job in Vertex AI? A) To deploy a model to production without training B) To perform fine-tuning of a foundation model using a labeled dataset to improve model performance on specific tasks C) To create datasets for training D) To convert models to TensorFlow format
B
348
Which option describes the Model Garden's compatibility with third-party models? A) It only includes Google proprietary models B) It allows deployment from Hugging Face and includes third-party open-source models C) It does not support any models outside Google Cloud D) All models must be trained within Vertex AI
B
349
You are a machine learning engineer tasked with developing a new feature for your company's e-commerce site that generates creative product descriptions. You need to explore a variety of state-of-the-art generative models, including those from Google and popular open-source options, to find the best fit for your use case. Which Vertex AI service is specifically designed to discover, test, and deploy these kinds of pre-trained models in a centralized location? A) Vertex AI Model Registry B) Vertex AI Model Garden C) Vertex AI Feature Store D) Vertex AI Pipelines
B
350
Your team is building a vision-based solution to automatically detect if employees in a warehouse are wearing the correct Personal Protective Equipment (PPE). This is a highly specialized task. According to the classification of models available on Vertex AI, which category does this solution fall into? A) Foundation Model B) Task-specific Solution C) Fine-tunable Model D) Open Source Model
B
351
You have trained several versions of a custom image classification model using custom training. You need a centralized repository within Google Cloud to manage these model versions, compare their performance metrics, and control their deployment to production endpoints. Which service should you use? A) Cloud Storage B) Vertex AI Experiments C) Vertex AI Model Registry D) Google Container Registry
C
352
You are developing an application that requires generating recipes based on very specific user inputs, such as dietary restrictions and required JSON output format. Initial attempts using prompt engineering with a foundation model are not consistently producing the correct structure or adhering to all constraints. What is the most effective next step to ensure the model reliably generates correct and well-formatted responses? A) Switch to a larger and more general foundation model. B) Increase the temperature setting in the model's generation parameters. C) Create a dataset of high-quality examples and use it to fine-tune the foundation model. D) Use a different model, such as one specialized for natural language understanding instead of generation.
C
353
You are preparing a dataset to fine-tune a Gemini foundation model for a text generation task. The dataset consists of pairs of instructional prompts and ideal responses. What is the required file format for this dataset? A) A CSV file where each row contains an "input" and "output" column. B) A single JSON file containing a list of all prompt-response pairs. C) A JSONL file, where each line is a separate JSON object with "input_text" and "output_text" keys. D) A TFRecord file containing serialized training examples.
C
354
You are tasked with building a feature that can describe the content of an image using natural language and also answer questions about it. This requires a model that can process both image and text data as inputs simultaneously. What is the term for this type of model modality? A) Unimodal B) Text-to-Image C) Multimodal D) Natural Language
C
355
You need to quickly prototype a text classification model without writing custom training code. Which Google Cloud service should you use? A. BigQuery ML B. Vertex AI AutoML C. TensorFlow on AI Platform Training D. Cloud Functions
B
356
What is the main advantage of using Model Garden in Vertex AI? A. It automatically tunes hyperparameters for any dataset B. It provides access to pre-trained and foundation models for easy deployment C. It replaces the need for custom training pipelines D. It is only used for image classification tasks
B
357
You are deploying a large language model for customer support. Which practice aligns with Responsible AI principles? A. Deploying the model without monitoring to reduce latency B. Using explainability tools to understand model predictions C. Disabling human review to increase automation D. Training only on synthetic data
B
358
You trained a custom model in Vertex AI. You now want to serve predictions with low latency for real-time applications. Which deployment option should you choose? A. Batch prediction B. Online prediction endpoint C. BigQuery ML D. Cloud Storage
B
359
Which Vertex AI feature helps automate retraining and redeployment when new data arrives? A. Vertex AI Pipelines B. Vertex AI Workbench C. Cloud Functions D. BigQuery ML
A
360
You deployed a model for fraud detection. Over time, the input data distribution starts to drift. Which Vertex AI feature helps detect this? A. Vertex AI Experiments B. Vertex AI Model Monitoring C. Vertex AI Feature Store D. Cloud Logging
B
361
Which API would you use to integrate image analysis (e.g., object detection, OCR) into your application without training a model? A. Cloud Vision API B. Vertex AI AutoML C. Cloud Translation API D. Cloud Natural Language API
A
362
Before training a model in Vertex AI, you need to ensure your dataset is properly versioned and reusable. Which service is best suited for managing features across models? A. Cloud Storage B. Vertex AI Feature Store C. BigQuery D. Dataflow
B
363
You want to train a deep learning model that requires GPUs. Which Vertex AI option allows you to specify custom compute resources? A. Vertex AI AutoML B. Vertex AI Custom Training with custom containers C. Cloud Functions D. BigQuery ML
B
364
When deploying a model in Vertex AI, which practice improves security and compliance? A. Using public endpoints for all predictions B. Enabling IAM roles and VPC Service Controls C. Disabling encryption to reduce costs D. Allowing anonymous access for faster testing
B
365
You are a machine learning engineer building an application that requires a multimodal foundation model capable of handling text, images, and videos for tasks like summarization and classification. Which Vertex AI feature provides access to a collection of such enterprise-ready models from Google, open source, and third-party providers? A. Vertex AI Pipelines B. Vertex AI Model Garden C. Vertex AI Feature Store D. Vertex AI AutoML
B
366
In Vertex AI, what is the primary purpose of the Model Registry? A. To store and manage datasets for training B. To serve as a central repository for managing the lifecycle of models, including creation, import, and deployment C. To automatically tune hyperparameters for models D. To monitor model performance in production
B
367
Which of the following are categories of models available in Vertex AI Model Garden? (Select all that apply) A. Foundation models like Gemini and PaLM 2 B. Pre-trained task-specific APIs for vision and language C. Open source enterprise-ready models D. Third-party models from providers like Hugging Face E. Custom hardware accelerators
A, B, C y D
368
For a use case involving generating code functions, tests, and explanations from natural language descriptions, which capability of the Gemini model family in Vertex AI is best suited? A. Text B. Chat C. Embeddings D. Code Generation
D
369
You are fine-tuning a generative model to create vegan recipes in a specific JSON format while avoiding certain ingredients. What format should the fine-tuning dataset use, and where should it be stored for use in Vertex AI? A. CSV format stored in BigQuery B. JSONL format with "input_text" and "output_text" fields, stored in Google Cloud Storage C. Parquet format stored in Vertex AI Feature Store D. TFRecord format stored in Cloud SQL
B
370
In Vertex AI, which frameworks are supported for importing already trained models into the Model Registry? A. Only TensorFlow and PyTorch B. TensorFlow, scikit-learn, PyTorch, and XGBoost C. Only scikit-learn and XGBoost D. TensorFlow and Keras only
B
371
Which of the following are task-specific solutions available for vision tasks in Vertex AI? (Select all that apply) A. Occupancy detection B. Entity sentiment analysis C. Person/Vehicle detection D. Text translation E. Document AI OCR
A, C y E
372
You have fine-tuned a model using supervised fine-tuning in Vertex AI and need to use it in your application. Which Python SDK code snippet correctly loads and generates content from the tuned model? A. from vertexai import GenerativeModel; model = GenerativeModel("tuned_model_name"); model.generate_content(content) B. from vertexai.preview.generative_models import GenerativeModel; from vertexai.preview.tuning import sft; tuning_job = sft.SupervisedTuningJob("tuning_job_path"); tuned_model = GenerativeModel(tuning_job.tuned_model_endpoint_name); tuned_model.generate_content(content) C. from tensorflow import keras; model = keras.models.load_model("tuned_model_path"); model.predict(input) D. from sklearn import load_model; model = load_model("tuned_model_path"); model.predict(input)
B
373
Which of the following are benefits of using Vertex AI Model Garden for foundation models? (Select all that apply) A. Choice and flexibility with Google, open source, and third-party models B. Multiple modalities to match use cases C. Enterprise-ready with safety, security, and responsibility D. Automatic data labeling for all datasets E. Decrease time to value with a fully integrated platform
A, B, C y E
374
In a scenario where prompt engineering alone does not yield the desired output for a recipe generation task, what is the recommended next step using Vertex AI? A. Switch to a different cloud provider B. Fine-tune the model using a dataset of input-output examples in JSONL format C. Use AutoML to retrain from scratch D. Deploy the model without changes
B
375
For tabular data tasks like classification or regression, which task-specific solutions are available in Vertex AI? A. Speech-to-Text and Text-to-Speech B. AutoML E2E and TabNet C. Stable Diffusion and ControlNet D. Entity analysis and Sentiment analysis
B
376
You need to save a model from Vertex AI Model Garden to the Model Registry and deploy it to an endpoint. What is the direct workflow supported? A. Models can only be deployed after retraining B. Models can be saved to Model Registry and deployed to endpoints directly from Model Garden C. Deployment requires exporting to a local machine first D. Only open source models support direct deployment
B
377
When creating a fine-tuning dataset for a generative model in Vertex AI, what should the "input_text" field contain? A. Only the output examples B. Instructions matching production user inputs C. Model hyperparameters D. Deployment endpoint names
B
378
Which of the following are examples of language task-specific solutions in Vertex AI? (Select all that apply) A. Entity analysis B. Sentiment analysis C. Text Translation D. Object detection E. Syntax analysis
A. B, C y E
379
Your team has developed a custom TensorFlow model for product classification. To manage its lifecycle, track different versions, and easily deploy it for online predictions, you need to use a centralized repository within Google Cloud. Which Vertex AI feature is designed for this purpose? A) Vertex AI Studio B) Vertex AI Model Garden C) Vertex AI Model Registry D) Vertex AI Endpoints
C
380
You need to fine-tune a foundation model to create a specialized chatbot for your company's internal knowledge base. The chatbot must respond in a specific format and tone. You have prepared a dataset of example prompts and the ideal responses. What is the required format for this tuning dataset? A) A CSV file with 'prompt' and 'response' columns. B) A JSONL file where each line is a JSON object with "input_text" and "output_text" keys. C) A text file with prompts and responses separated by a special token. D) A BigQuery table with separate columns for inputs and outputs.
B
381
A data scientist on your team wants to explore and experiment with a variety of pre-trained models from Google, open-source communities, and third-party providers without having to manage the underlying infrastructure. Which Vertex AI service provides a centralized discovery and access point for these models? A) Vertex AI Pipelines B) Vertex AI Feature Store C) Vertex AI Model Garden D) Vertex AI Experiments
C
382
You are deploying a model from the Model Garden to a Vertex AI Endpoint for real-time predictions. When configuring the deployment, you need to specify the hardware on which the model will run to serve traffic. What two components are you required to configure for the endpoint's resources? A) Storage Bucket and Region B) Machine Type and Accelerator C) Docker Image and Service Account D) Network and Subnetwork
B
383
You are setting up Gemini in a temporary lab environment. After enabling the cloudaicompanion.googleapis.com API, you must grant the necessary IAM roles to your lab user. Which two roles are required for Gemini Code Assist to function correctly? A. roles/editor and roles/iam.serviceAccountUser B. roles/cloudaicompanion.user and roles/serviceusage.serviceUsageViewer C. roles/aiplatform.user and roles/viewer D. roles/cloudbuild.builds.editor and roles/storage.admin
B
384
Your /newproducts endpoint fails with the error: “The query contains range and inequality filters on multiple fields.” What is the best way to fix this? A. Add a composite index on timestamp and quantity. B. Remove one of the inequality filters to comply with Firestore limitations. C. Convert Firestore to Datastore mode. D. Wrap the query in a Firestore transaction.
B
385
You need to deploy the backend service to Cloud Run. Which command correctly deploys it with public access and a custom environment variable? a) gcloud run deploy inventory \ --image inventory_image_url \ --allow-unauthenticated \ --set-env-vars=PROJECT_ID=$PROJECT_ID b) gcloud run deploy inventory \ --source . \ --set-env-vars=PROJECT_ID=$PROJECT_ID c) gcloud run services replace inventory.yaml d) gcloud builds submit --tag inventory_image_url
A
386
You want Gemini to generate code for a new Express endpoint in your backend. What’s the correct way to invoke Gemini’s suggestion? A. Open Gemini Cloud Assist Chat and type the function manually. B. Select the placeholder comment, click the 💡 bulb, and choose “Gemini: Generate code.” C. Use the Gemini command in Cloud Shell CLI. D. Open a new Gemini browser tab and paste the file.
B
387
You want to test your new /newproducts endpoint using Jest and supertest. Which test best validates the API? a) it("GET /newproducts returns 404", async () => { ... }) b) it("GET /newproducts returns 200 and 8 products", async () => { const res = await request(app).get("/newproducts"); expect(res.statusCode).toBe(200); expect(res.body.length).toBe(8); }); c) expect(GET("/newproducts")).toBe("OK"); d) test("/newproducts endpoint works", () => { pass; });
B
388
You have a CSV file in Cloud Storage and want to load it into BigQuery automatically. Which command is correct? a) bq import csv gs://bucket/data.csv mydataset.mytable b) bq load --source_format=CSV --autodetect mydataset.mytable gs://bucket/data.csv c) bq cp gs://bucket/data.csv mydataset.mytable d) gcloud bq load mydataset.mytable --csv gs://bucket/data.csv
B
389
You want Gemini to generate and explain a query for weekly sales totals. Which steps are required? A. Type a natural-language comment (e.g. # Get weekly sales totals) and click Gemini ✨. B. Ask Gemini Cloud Assist in a separate chat window. C. Use the BigQuery Query Editor’s “Explain” button. D. Upload a prompt file with the SQL request.
A
390
In Spanner Studio, how can you use Gemini to generate a query? A. Use “Explain Query” with Gemini in BigQuery UI. B. In Spanner Studio, click “Generate SQL with Gemini,” type SELECT, and click Generate. C. Ask Gemini in Cloud Shell. D. Export the schema first, then run Gemini Code Assist.
B
391
You need to inspect backend logs in Cloud Run using Gemini. What prompt should you use? A. “List Cloud Logging entries for my project” B. “How can I view the logs for the Cloud Run service called ‘inventory’?” C. “Show error logs from yesterday” D. “Where are Cloud Run metrics?”
B
392
Gemini occasionally provides plausible but incorrect outputs. What’s the best practice? A. Trust all Gemini outputs because they’re generated by Google Cloud. B. Validate all outputs before use in production. C. Ignore Gemini’s suggestions if an error occurs. D. Disable Gemini until GA release.
B
393
What is the primary role of Gemini in the Google Cloud development lifecycle? A) Automatically deploys applications to Cloud Run B) Provides interactive chat, code assistance, and integrations to improve developer productivity C) Manages permissions and IAM roles for Google Cloud projects D) Monitors production applications for runtime errors
B
394
Which Google Cloud service is typically used to deploy and run containerized backend applications built with Gemini assistance? A) Cloud Functions B) App Engine C) Cloud Run D) Kubernetes Engine
C
395
When querying Firestore with Gemini-generated code, what is a known limitation that might cause an error such as "The query contains range and inequality filters on multiple fields"? A) Firestore does not allow any inequality filters B) Firestore requires separate queries for filtering on different fields using inequalities C) Firestore allows only a single inequality filter in a single query due to indexing restrictions D) Firestore allows unlimited inequality filters but requires them to be ordered
C
396
How should you modify your Firestore query if you need to filter products added within the last seven days and also filter by quantity greater than zero, considering Firestore's query limitations? A) Apply both filters directly in the Firestore query B) Apply the timestamp inequality filter in the query and filter quantity > 0 in application logic after fetching results C) Use two separate Firestore queries, one for each filter and merge results D) Increase Firestore's indexing limits
B
397
Which Google Cloud product allows you to run SQL queries interactively on large datasets and can be assisted by Gemini for SQL query generation and explanations? A) Cloud Spanner B) BigQuery C) Cloud SQL D) Dataproc
B
398
When testing an Express.js backend API developed with Gemini assistance, which testing framework and tool were demonstrated for writing and running tests in TypeScript? A) Mocha with Chai B) Jasmine with Protractor C) Jest with supertest D) Selenium with Puppeteer
C
399
To upload CSV data from Cloud Storage to a BigQuery table as shown with Gemini assistance, what bq command option should be included for schema detection? A) --replace B) --autodetect C) --append_table D) --noautodetect
B
400
When deploying a backend service built with Gemini assistance to Cloud Run, what flag allows unauthenticated HTTP access to the service? A) --no-allow-unauthenticated B) --enable-unauthenticated C) --allow-unauthenticated D) --public-access
C
401
What is a recommended approach to handle viewing logs for Cloud Run services when working with Gemini Cloud Assist? A) Use gcloud CLI exclusively B) View logs via Google Cloud Console using the Logs Explorer integrated with Gemini suggestions C) Logs cannot be viewed for Cloud Run services D) Logs are automatically emailed to the developer
B
402
Which Google Cloud role must be granted to use Gemini Cloud Assist tools effectively in a project? A) roles/compute.viewer B) roles/storage.objectAdmin C) roles/cloudaicompanion.user D) roles/bigquery.admin
C
403
Which Google Cloud service is best suited for building and deploying generative AI models using foundation models? A) AI Platform B) BigQuery ML C) Cloud AutoML D) Vertex AI
B
404
What is the primary benefit of using foundation models in machine learning workflows? A) They reduce the need for large labeled datasets B) They guarantee 100% model accuracy C) They require no fine-tuning D) They eliminate the need for data preprocessing
A
405
Which Vertex AI feature allows you to customize a foundation model with your own data? A) Vertex AI Studio B) Vertex AI Model Registry C) Vertex AI Custom Training D) Vertex AI Pipelines
A
406
What is the recommended approach to evaluate the performance of a generative AI model? A) Only rely on loss values during training B) Apply traditional regression metrics C) Use accuracy and precision metrics D) Use human evaluation and task-specific metrics
D
407
Which Google Cloud tool allows you to orchestrate ML workflows including training, evaluation, and deployment? A) Vertex AI Pipelines B) Cloud Functions C) Vertex AI Workbench D) Cloud Composer
A
408
What is the purpose of prompt engineering in generative AI applications? A) To reduce model size B) To optimize model hyperparameters C) To improve model training speed D) To guide the model to produce desired outputs
D
409
Which component of Vertex AI helps manage and version ML models? A) Vertex AI Studio B) Vertex AI Experiments C) Vertex AI Feature Store D) Vertex AI Model Registry
D
410
What is a key advantage of using Gemini models in software development workflows? A) They are only available for mobile applications B) They eliminate the need for testing C) They can generate code and documentation automatically D) They require no cloud infrastructure
C
411
Which Google Cloud service provides a collaborative environment for developing ML models with notebooks? A) BigQuery ML B) Cloud Functions C) Vertex AI Workbench D) Cloud Shell
C
412
What is the role of the Vertex AI Feature Store? A) To visualize model performance B) To manage and serve ML features for training and inference C) To store model predictions D) To deploy models to endpoints
B
413
Which method is commonly used to fine-tune a foundation model for a specific task? A) Batch normalization B) Transfer learning C) Data augmentation D) Model pruning
B
414
What is the benefit of using Vertex AI Experiments? A) To monitor infrastructure usage B) To deploy models to production C) To track and compare ML experiment results D) To generate synthetic data
C
415
Which Google Cloud service allows SQL-based ML model creation directly within a data warehouse? A) AI Platform B) Cloud AutoML C) Vertex AI D) BigQuery ML
D
416
What is the main advantage of using pre-trained foundation models in enterprise applications? A) They require no infrastructure monitoring B) They are cheaper to deploy than custom models C) They eliminate the need for data security D) They accelerate development by reducing training time
D
417
Which tool allows developers to interactively test prompts and evaluate generative model outputs? A) Vertex AI Studio B) Cloud Monitoring C) Cloud Functions D) BigQuery ML
A
418
You are developing a web application backend in TypeScript using Cloud Firestore as the database. You need to implement an API endpoint that retrieves products added within the last seven days and are in stock (quantity > 0). However, Firestore queries have limitations on combining multiple range or inequality filters. What is the recommended approach to handle this while ensuring the query executes efficiently? A. Use multiple where clauses for timestamp and quantity, and create a composite index. B. Apply the timestamp filter in the query and filter quantity in application code after retrieval. C. Use inequality filters on both fields and rely on automatic indexing. D. Sort the results client-side instead of filtering in the query.
B
419
In a Google Cloud project, you are setting up AI-assisted development tools for code generation and chat-based assistance. Which API must you enable to use features like interactive code suggestions and error explanations in Cloud Shell and the Google Cloud console? A. Vertex AI API B. Cloud AI Companion API C. BigQuery API D. Cloud Natural Language API
B
420
You are granting permissions to a user account in a Google Cloud project to allow access to AI-assisted features for code and cloud operations. Which IAM roles should you assign to enable the user to interact with these features, including viewing services? A. roles/cloudaicompanion.user and roles/serviceusage.serviceUsageViewer B. roles/aiplatform.user and roles/bigquery.dataViewer C. roles/editor and roles/logging.viewer D. roles/owner and roles/iam.securityAdmin
A
421
You have built a containerized backend service for a web application and pushed it to Artifact Registry. Now, you need to deploy it to a serverless platform that supports HTTP requests on a specific port, allows unauthenticated access, and sets environment variables like PROJECT_ID. Which command achieves this deployment in the us-central1 region? A. gcloud app deploy --image=inventory-image-url --port=8000 --region=us-central1 --set-env-vars=PROJECT_ID=your-project-id --allow-unauthenticated B. gcloud run deploy inventory --image=inventory-image-url --port=8000 --region=us-central1 --set-env-vars=PROJECT_ID=your-project-id --allow-unauthenticated C. gcloud functions deploy inventory --runtime=nodejs --trigger-http --source=. --allow-unauthenticated D. gcloud compute instances create --container=inventory-image-url --port=8000
B
422
While testing a local backend API endpoint that queries Firestore, you encounter an error: "The query contains range and inequality filters on multiple fields." You use an AI chat tool to debug this. Based on best practices, what fix does the tool likely suggest? A. Remove all filters and handle them client-side. B. Use only one inequality filter in the query and apply the other filter in application logic. C. Enable multi-field indexing via the Firebase console. D. Switch to a SQL database like Cloud SQL.
B
423
You are developing integration tests for an Express.js backend API using Jest in TypeScript. You need to test a GET endpoint that returns a list of new products, verifying a 200 status code and an array length of 8. Which testing library is commonly used with Jest for making HTTP requests in such tests? A. Axios B. Supertest C. Chai-http D. Fetch
B
424
You need to load CSV data from Cloud Storage into a BigQuery table with an autodetected schema. Which command accomplishes this for a dataset named "cymbal_sales" and table "cymbalsalestable", assuming the data is in gs://your-bucket/sales.csv? A. bq mk --table cymbal_sales.cymbalsalestable gs://your-bucket/sales.csv B. bq load --source_format=CSV --autodetect cymbal_sales.cymbalsalestable gs://your-bucket/sales.csv C. gsutil cp gs://your-bucket/sales.csv bq://cymbal_sales.cymbalsalestable D. bq query --load gs://your-bucket/sales.csv INTO cymbal_sales.cymbalsalestable
B
425
In BigQuery Studio, you want to generate a SQL query for aggregating sales data for a specific week using AI assistance. After entering a natural language prompt like "Get sales for total_aug_12", what step do you take to insert and explain the generated query? A. Click "Generate" in the AI prompt dialog, then "Insert", and select the query to explain via right-click. B. Run the query directly without generation. C. Use the bq query command in Cloud Shell. D. Export the table to CSV and analyze externally.
A
426
You are querying transaction data in a Spanner database using Spanner Studio. To generate a basic SELECT query suggestion via AI, what action do you perform in the query editor? A. Type "SELECT" and click the AI generation icon to generate and insert suggestions. B. Run a blank query and view auto-suggestions. C. Use the gcloud spanner databases execute-sql command. D. Export the schema and query in BigQuery instead.
A
427
To troubleshoot issues in a deployed Cloud Run service named "inventory", you use AI assistance to learn how to view its logs. What is the typical navigation path in the Google Cloud console to access these logs? A. Navigation Menu > Logging > Logs Explorer, then filter by resource.type="cloud_run_revision" and resource.labels.service_name="inventory". B. Navigation Menu > Compute Engine > VM Instances > Logs. C. Navigation Menu > Cloud Run > Services > inventory > Metrics. D. Navigation Menu > BigQuery > Logs dataset.
A
428
You are configuring a frontend web app to connect to a backend API deployed on Cloud Run. After building the frontend with npm, where should you upload the static build files to serve them publicly? A. Artifact Registry B. Cloud Storage bucket with public access C. Firestore collection D. Compute Engine VM
B
429
When running a local backend server that accesses Firestore, you encounter authentication issues. What command do you run to authenticate the application default credentials? A. gcloud auth login B. gcloud auth application-default login C. gcloud config set account D. gcloud services enable firestore.googleapis.com
B
430
In Cloud Shell Editor, you want to set an environment variable like PORT=8000 for a Node.js application. How do you configure this persistently for the integrated terminal? A. Edit the User Settings JSON via Command Palette and add to "terminal.integrated.env.linux". B. Run export PORT=8000 in the terminal. C. Add it to the package.json scripts. D. Set it in the Cloud Shell profile script.
A
431
You are developing a new feature for a web application using the Cloud Shell Editor. You need to implement a new API endpoint in an existing index.ts file. Your goal is to generate the required code as efficiently as possible by leveraging integrated AI tools. Which of the following is the most direct and effective method to accomplish this? A) Open the Gemini Cloud Assist chat in the main Google Cloud Console, describe the required endpoint, and copy the generated code back into the Cloud Shell Editor. B) Write a descriptive comment in the index.ts file detailing the endpoint's requirements (e.g., // Create a /newproducts endpoint that filters by date and stock), select the comment, and use the integrated "Gemini: Generate code" feature. C) Manually write the function signature for the new endpoint and then use the code completion suggestions to fill in the logic line by line. D) In a separate browser tab, search for example code snippets for building similar endpoints and adapt them to your application.
B
432
Your backend application, deployed on Cloud Run, is failing. After inspecting the logs, you find the following error: The query contains range and inequality filters on multiple fields. You are not immediately sure what this Firestore error means or how to resolve it. What is the recommended first step to diagnose and find a solution using Gemini? A) Ask Gemini to rewrite the entire backend service to avoid using Firestore. B) In the Cloud Shell Editor, open the Gemini Code Assist chat panel, paste the exact error message, and ask for an explanation and a suggested fix. C) Use the gcloud run deploy command with a special debug flag to get more detailed logs from the running service. D) In the BigQuery console, ask Gemini to analyze the Cloud Run logs and identify the root cause of the error.
B
433
You are working as a data analyst in the BigQuery UI. You need to write a query to calculate the total weekly sales from a table named cymbalsalestable, but you are unsure of the correct SQL syntax to group by a specific week. How can you use Gemini to generate this query directly within the BigQuery interface? A) Open the main Gemini chat for Google Cloud and ask for a generic "SQL weekly sales" query. B) Export the table's schema and paste it into the Gemini chat, asking it to write the query. C) In the BigQuery query editor, write a natural language comment like # Get the sum of sales for the week of Aug 12 on a new line and use the inline "Generate SQL with Gemini" feature. D) Use the bq query command in Cloud Shell with a --generate-sql flag to get a suggested query.
C
434
After implementing a new /newproducts endpoint, you are tasked with writing an integration test for it using the Jest framework. To ensure code quality and speed up the development process, you decide to use Gemini to help create the test file. Which prompt would be most effective for Gemini to generate a useful and complete test? A) "Write a test." B) "Test the /newproducts endpoint." C) "Help me write an Express.js test using Jest, in TypeScript, for the GET /newproducts handler. The test should check if the response code is 200 and if the returned array of products has a specific length, for example, 8." D) "Explain how to use the Jest testing framework."
C
435
You are managing several microservices, and you need to review the logs for a specific Cloud Run service named inventory. You are in the Google Cloud Console but are unsure where to navigate to find the correct logs. What is the most effective way to get instructions on how to perform this task? A) Use the search bar at the top of the Google Cloud Console and type "inventory logs." B) Open the Gemini Cloud Assist chat from the top menu bar and ask a direct, natural language question, such as: "How can I view the logs for the Cloud Run service called 'inventory'?" C) Navigate to the Cloud Run service list, find the inventory service, click on it, and look for a "Logs" tab. D) Use Cloud Shell to run the gcloud logging read command with a filter for the inventory service.
B
436
You need to store high-resolution wildlife photographs that must be publicly accessible via a browser. Which Google Cloud service is the most appropriate for this use case? A. BigQuery B. Cloud SQL C. Cloud Storage D. Firestore
C
437
You want to automatically trigger a function whenever a new image is uploaded to a Cloud Storage bucket. Which service should you use? A. Cloud Scheduler B. Cloud Functions C. Pub/Sub Lite D. Dataflow
B
438
You are deploying a Cloud Function that calls the Vision API. Which IAM practice follows the principle of least privilege? A. Assign the Owner role to the Cloud Function’s service account. B. Assign the Storage Admin and Vision API Admin roles to the Cloud Function’s service account. C. Assign only the roles required: roles/storage.objectViewer and roles/vision.user. D. Use your personal Google account credentials for the function.
C
439
Which command correctly creates a new Cloud Storage bucket in the us-central1 region? a) gcloud storage buckets create gs://my-bucket --location=us-central1 b) gcloud compute instances create my-bucket --zone=us-central1 c) gcloud sql instances create my-bucket --region=us-central1 d) gcloud pubsub topics create my-bucket --region=us-central1
A
440
You need to deploy a Python 3.9 Cloud Function named hello_gcs that triggers on new objects in a bucket. Which command is correct? a) gcloud functions deploy hello_gcs \ --gen2 \ --runtime=python39 \ --trigger-http b) gcloud functions deploy hello_gcs \ --gen2 \ --runtime=python39 \ --trigger-event-filters="type=google.cloud.storage.object.v1.finalized" \ --trigger-event-filters="bucket=my-bucket" c) gcloud functions deploy hello_gcs \ --runtime=nodejs16 \ --trigger-topic=my-topic d) gcloud run deploy hello_gcs --image=gcr.io/my-image
B
441
You want to label uploaded images automatically. Which API should you call? A. Cloud Translation API B. Cloud Vision API C. Cloud Natural Language API D. Cloud Speech-to-Text API
B
442
You must detect whether an uploaded image contains adult content. Which Vision API feature should you use? A. label_detection B. object_localization C. safe_search_detection D. text_detection
C
443
When using AI/ML services like Vision API in production, which practice is recommended? A. Hardcode API keys in your source code. B. Use a service account with only required roles and store credentials securely. C. Use your personal Gmail account for authentication. D. Disable logging to reduce costs.
B
444
ou are developing an application where photographers upload images to Google Cloud Storage, and you need to recommend a service for storing publicly accessible photographs that triggers an automated process for categorization upon upload. Which Google Cloud service is best suited for this scenario? A) BigQuery B) Cloud Storage C) Compute Engine D) Cloud SQL
B
445
When enabling Gemini Code Assist in the Cloud Shell Editor, which API must be enabled using the gcloud command to allow integration with Google Cloud services? A) gcloud services enable compute.googleapis.com B) gcloud services enable cloudaicompanion.googleapis.com C) gcloud services enable aiplatform.googleapis.com D) gcloud services enable storage.googleapis.com
B
446
In a Google Cloud project, you need to create a public Cloud Storage bucket using the gcloud CLI. The bucket should be named "wildlife-photos" in the "us-central1" region for project "my-project-123". What is the correct command to create this bucket? A) gcloud storage buckets create gs://wildlife-photos --location=us-central1 B) gsutil mb gs://wildlife-photos/ --project=my-project-123 C) gcloud alpha storage buckets create gs://wildlife-photos --location=us-central1 D) gsutil mb -l us-central1 gs://wildlife-photos/
A
447
To make a Cloud Storage bucket publicly accessible so that objects can be viewed by anyone via a browser, which IAM policy binding command should you use? A) gcloud storage buckets add-iam-policy-binding gs://bucket-name --member=allUsers --role=roles/storage.objectViewer B) gcloud iam roles add-binding gs://bucket-name --member=public --role=roles/storage.admin C) gsutil iam ch allUsers:objectViewer gs://bucket-name D) gcloud storage buckets update gs://bucket-name --public-access
A
448
You are writing a Python Cloud Function triggered by a Cloud Storage event. Which decorator from the functions_framework library is used to handle cloud events in the function? A) @functions_framework.http B) @functions_framework.cloud_event C) @functions_framework.event D) @functions_framework.trigger
B
449
In a requirements.txt file for a Python Cloud Function that uses the functions_framework, what is the typical version specification for this dependency? A) functions-framework==2.0.0 B) functions-framework==3.3.0 C) functions-framework>=4.0.0 D) functions-framework==1.5.0
B
450
You need to deploy a Gen2 Cloud Function named "image-categorizer" in the "us-central1" region, triggered by object finalization in a bucket "wildlife-bucket" for project "my-project-123", using Python 3.9 runtime and a specific service account "ml-function-sa@my-project-123.iam.gserviceaccount.com". What is the correct gcloud command? A) gcloud functions deploy image-categorizer --gen2 --runtime=python39 --region=us-central1 --service-account=ml-function-sa@my-project-123.iam.gserviceaccount.com --source=. --entry-point=process_image --trigger-event-filters="type=google.cloud.storage.object.v1.finalized" --trigger-event-filters=bucket=wildlife-bucket B) gcloud functions deploy image-categorizer --runtime=python39 --region=us-central1 --trigger-bucket=wildlife-bucket C) gcloud beta functions deploy image-categorizer --gen2 --runtime=python39 --region=us-central1 --trigger-event=google.storage.object.finalize --bucket=wildlife-bucket D) gcloud functions deploy image-categorizer --gen1 --runtime=python37 --region=us-central1 --service-account=ml-function-sa@my-project-123.iam.gserviceaccount.com --trigger-resource=wildlife-bucket
A
451
To integrate image labeling in a Python Cloud Function using the Vision API, which client and method should be used to detect labels on an image stored in Cloud Storage? A) client = vision.ImageAnnotatorClient(); response = client.label_detection(image=image) B) client = vision.Client(); response = client.detect_labels(image=image) C) client = vision.ImageClient(); response = client.annotate_labels(image=image) D) client = vision.AnnotatorClient(); response = client.image_labels(image=image)
A
452
When using the Vision API in Python to analyze an image from a Cloud Storage URI, how do you set the image source? A) image = vision.Image(); image.source.image_uri = "gs://bucket/file.jpg" B) image = vision.Image(source="gs://bucket/file.jpg") C) image = vision.ImageAnnotator(source_uri="gs://bucket/file.jpg") D) image = vision.Image(); image.uri = "gs://bucket/file.jpg"
A
453
To add safe search detection for adult content using the Vision API in a Python script, which method on the ImageAnnotatorClient should be called? A) client.safe_search_detection(image=image) B) client.adult_detection(image=image) C) client.content_moderation(image=image) D) client.detect_safe_search(image=image)
A
454
In the Cloud Shell Editor with Gemini Code Assist enabled, how can you generate code suggestions directly from an inline comment in your Python file? A) Select the comment, click the lightbulb icon, and choose "Generate code" from More Actions B) Right-click the comment and select "AI Suggest" C) Type "@gemini generate" before the comment D) Highlight the comment and press Ctrl+Shift+G
A
455
When prompting an AI code assistant like Gemini for specific code generation, such as a Cloud Function, why is it important to provide detailed context like role, environment, and variables? A) It helps the AI generate more accurate and immediately usable code tailored to the scenario B) It reduces the number of API calls needed C) It automatically handles dependencies D) It enables multi-language support
A
456
You are troubleshooting a Cloud Function that processes images uploaded to Cloud Storage. The function logs bucket and file names but fails to label images using Vision API. What dependency must be added to requirements.txt to resolve this? A) google-cloud-storage B) google-cloud-vision C) google-cloud-functions D) google-cloud-logging
B
457
After deploying a Cloud Function triggered by Cloud Storage uploads, where in the Google Cloud Console can you view the logs to verify that the function processed the bucket and file names correctly? A) Navigation menu > Cloud Run > Select the function > Logs tab B) Navigation menu > Logging > Query for the function name C) Navigation menu > Cloud Functions > Metrics tab D) Navigation menu > Storage > Bucket details > Logs
A
458
In a lab environment using temporary credentials, why is it recommended to use an Incognito or private browser window when accessing the Google Cloud Console? A) To prevent conflicts between personal accounts and the lab's temporary account B) To enable faster resource provisioning C) To automatically enable all APIs D) To hide the project ID from view
A
459
Your team needs to process wildlife images as soon as they are uploaded to a Cloud Storage bucket. The process involves automatically analyzing the image content. You have decided to use a serverless solution. Which combination of Google Cloud services is the most appropriate for this task? A.Use a Compute Engine instance that periodically scans the bucket for new files. B.Use a Cloud Function with a Cloud Storage trigger. C.Use Cloud Run triggered by Pub/Sub messages sent from the storage bucket. D.Use App Engine to host an application that receives upload notifications.
B
460
You are writing a Python Cloud Function that uses the Google Cloud Vision API. You have written the function logic in `main.py`. What is the purpose of the `requirements.txt` file when deploying this function? A.It specifies the Python libraries and their versions that the function depends on. B.It defines the trigger event and entry point for the function. C.It contains the environment variables needed by the function. D.It includes the source code for the Vision API client.
A
461
You need to create a new Cloud Storage bucket where photographers can upload their photos. The photos must be publicly readable via a URL. Which `gcloud` command correctly makes the objects in the bucket publicly accessible after the bucket has been created? A.gcloud iam service-accounts add-iam-policy-binding for the bucket. B.gcloud storage objects update gs://BUCKET_NAME/* --make-public C.gcloud storage buckets add-iam-policy-binding gs://BUCKET_NAME --member=allUsers --role=roles/storage.objectViewer D.gcloud storage buckets update gs://BUCKET_NAME --public-access
C
462
Your Cloud Function needs to analyze images stored in a bucket using the Vision API. The function receives the bucket and file name in the event payload. What is the most efficient way to pass the image to the Vision API for label detection? A.Provide the Cloud Storage URI (e.g., `gs://bucket_name/file_name`) of the image directly in the API request. B.Read the entire file into a base64-encoded string within the function and send it in the API request. C.Pass the publicly accessible HTTPS URL of the image to the API. D.Download the image file to the Cloud Function's temporary filesystem and then read it into memory to send to the API.
A
463
You are using Gemini Code Assist to help you write a command to deploy a Cloud Function. Your first prompt, "How do I deploy a Cloud Function?", gives a very general answer. To get a precise `gcloud` command that you can run immediately, which prompt would be the most effective? A.I'm a Google Cloud developer. Show me the gcloud CLI command to deploy the function 'hello_gcs' in the 'us-central1' region, triggered by the bucket 'my-photo-bucket', using the service account 'my-sa@project.iam.gserviceaccount.com'. B.Why is my function deployment failing? C.What is the command line instruction to deploy a Python Cloud Function for a storage trigger? D.Give me the gcloud command to deploy a function.
A
464
As part of an automated content moderation pipeline, you need to use the Vision API to determine if an uploaded image is inappropriate. Which feature of the Vision API should you use? A.Safe Search Detection B.Object Localization C.Face Detection D.Label Detection
A