
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Enable the Vertex AI API
/ 20
Extract the content of the image
/ 20
Extract the content of the video
/ 20
Create prompts with text
/ 40
Disclaimer: The information in this course is for educational purposes only, and does not serve as Google's approval for use of its generative AI service for any diagnostic or therapeutic purpose, or for direct patient care.
Vertex AI is a powerful machine learning platform designed to enhance healthcare applications with both predictive and generative AI capabilities. Vertex AI Studio serves as an intuitive interface, allowing healthcare practitioners and researchers to easily experiment with and customize generative AI models without extensive machine learning expertise. This user-friendly platform provides a variety of tools and resources, including UI-based interactions and code examples, making it simple to harness the power of generative AI for healthcare applications.
In this hands-on lab, you'll delve into Vertex AI Studio, where you'll explore the capabilities of cutting-edge generative AI models like Gemini multimodal. With Gemini, you'll experiment with prompt design techniques to summarize text, answer questions, and classify sentiments. All of this can be done directly within the Google Cloud console, without the need for complex APIs or Python SDKs, making it accessible to healthcare professionals with varying levels of technical expertise.
In this lab, you will learn how to:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
In this section, you will analyze an image with Gemini. You will design prompts to extract information from the image and observe the model's response.
In the Google Cloud Console, enter Vertex AI API in the top search bar.
Click on the result for Vertex AI API under Marketplace & APIs.
Click Enable.
Click Check my progress to verify the objectives.
The UI contains three main sections:
On the top left, click Untitled Prompt and rename your prompt as Medical Image Analysis
.
In the Configuration section on the right, ensure the model name gemini-2.0-flash-001
is selected. You can click switch model to change the model if needed, or browse other available models.
Download the sample image. Right-click the chest x-ray image and then save it to your desktop.
Or be more specific:
Does the title meet your expectations? Try to modify the prompt to see if you get different results.
Further on, if you want to format the output to a list, replace the previous prompt with the following:
Your turn - try out some different prompts! How do these results differ from before?
Does the result meet your expectations? You are highly encouraged to try different prompts for various tasks. You are also encouraged to experiment with different temperature settings to observe the changes in the result.
Once you finish the prompt design, save the prompt by clicking Save on the top right of the Configuration section. For the region, select
To find your saved prompts, on the left-hand navigation menu, navigate to Prompt Management.
Click Check my progress to verify the objectives.
In addition to images and text, Gemini multimodal is capable of accepting videos as inputs and generating text as an output. To obtain the video, you will click on a link to a lung animation video, save the video to your desktop and upload the video into Vertex AI Studio.
Navigate back to the Vertex AI Studio > Create prompt.
In the Configuration section on the right, ensure the model name gemini-2.0-flash-001
is selected.
Click Insert Media > Upload. Select the lung animation video you downloaded and click Open.
Generate any information about the video by inserting your own prompt. For example, to describe the video in detail, copy the following into the Prompt section and click the Submit button.
On the top left, click Untitled Prompt and rename your prompt as Medical Video Analysis
.
Once you finish the prompt design, save the prompt by clicking Save on the top right of the Configuration section. For the region, select
Note: If your prompt is already saved with the Autosave functionality, ensure the name of the prompt is correct and you can see it in the Prompt Management page.
Multimodal powered by Gemini offers many capabilities such as writing simple explanations of complex images, analyzing videos, and generating educational multimedia visual aids. Check out more information about design multimodal prompts.
Click Check my progress to verify the objectives.
In this section, you will explore designing text prompts in Vertex AI Studio. You will explore zero-shot, one-shot, and few-shot prompting, as well as generate text summarization, answer questions, and classify text.
You can feed your desired input text, e.g. a question, to the model. The model will then provide a response based on how you structured your prompt. The process of figuring out and designing the best input text (prompt) to get the desired response back from the model is called Prompt Design.
There are three main methods to design prompts:
Temperature and Token limit are two important parameters that you can adjust to influence the model's response.
gemini-2.0-flash-001
model has a temperature range of 0 - 2 and a default of 1.Navigate back to the Vertex AI Studio > Create prompt.
In the Configuration section on the right, ensure the model name gemini-2.0-flash-001
is selected.
The model will respond with a list of common medical conditions.
Here are some exploratory exercises to explore. In the Configuration section on the right, click the Advanced section to explore the below options
Output Token limit
parameter to 1024
and click the SUBMIT button.Temperature
parameter to 0.5
and click the SUBMIT button.Temperature
parameter to 2.0
and click the SUBMIT button.Inspect how the responses change with different parameters.
The model will respond with a detailed explanation of the underlying mechanism of Type 1 diabetes.
The model will respond with a list of common treatments for a sprained ankle.
In one-shot prompting, you provide a single example to the model to generate a response.
Click the Clear icon on the toolbar to clear the prompt.
On the bottom right of the Prompt section, click the Add Examples button.
Click on the Add examples button.
Once you've added your example, you should see two sections that need to be filled: {Input}
and Prompt
. To submit your prompt, you will need to provide another example input, as well as the prompt.
In the {INPUT}
field, write the following:
Prompt
field, write the following:The model will respond with an explanation of diabetes simplified to a 6th grade reading level.
This time around, add a few examples for the model to base its output from.
INPUT | OUTPUT |
---|---|
Asthma | When your airways get tight, making it hard to breathe |
Eczema | When your skin gets dry, itchy, and red |
{INPUT}
field, write the following:Once you are finished, click on the Add examples button.
Click on the Submit button.
You have successfully influenced the way the model produces response. Your model now generates an explanation of cancer simplified to a 6th grade reading level, displayed in a table.
For the next practice, you will use the model to summarize a paragraph into a single sentence.
The model will respond with the answer to the question (your response may vary):
The model will respond with the answer to the question (your response may vary):
The model will respond with the answer to the question (your response may vary):
On the top left, click Untitled Prompt and rename your prompt as Text Classification
.
Save the prompt by clicking Save on the top right of the Configuration section. For the region, select
Note: If your prompt is already saved with the Autosave functionality, ensure the name of the prompt is correct and you can see it in the Prompt Management page.
The saved prompt will appear in the Prompt Management section.
Click Check my progress to verify the objectives.
Congratulations! In this lab, you explored the capabilities of Vertex AI Studio for Healthcare. You analyzed an image and video with Gemini multimodal and designed text prompts. You also explored zero-shot, one-shot, and few-shot prompting, as well as learned how to generate text summarization, question answering, and text classification. You are now ready to leverage the power of generative AI models.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated April 10, 2025
Lab Last Tested April 10, 2025
Copyright 2025 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one