
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
Build a Gemini image analysis tool
/ 25
Build a Gemini tagline generator
/ 25
Experiment with image analysis code
/ 25
Experiment with tagline generation code
/ 25
In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students who have enrolled in the Prompt Design in Vertex AI course. Are you ready for the challenge?
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:
You're a member of an educational content startup specializing in engaging learners with the natural world. You've formed a partnership with Cymbal Direct, an online retailer launching a new line of outdoor gear and apparel designed to encourage young people to explore and connect with nature.
Cymbal Direct wants to create a marketing campaign for its new product line that leverages the power of generative AI. Your task is to help them develop a set of tools within Google Cloud's Vertex AI platform that will streamline the generation of the following:
In this section, you will create a template for analyzing images of Cymbal Direct products using the
The image for this task is located at:
Experiment with different prompts to generate the following:
Evaluate and Iterate: adjust your prompt and parameters as needed to refine the results.
Name your prompt Cymbal Product Analysis
.
Save Prompt: Once you're happy with the results, click Save, and select the
In this task, you will create a freeform prompt for generating diverse tagline possibilities using the
Create a new Freeform prompt with the
In the System instructions box, enter the following:
Input | Output |
---|---|
Write a tagline for a durable backpack designed for hikers that makes them feel prepared. Consider styles like minimalist. | Built for the Journey: Your Adventure Essentials. |
Design a Freeform Prompt with parameters to customize taglines based on:
In the Test box, add one input and click the submit button to have Gemini generate a tagline option based on your prompt.
Evaluate and Iterate:
Name your prompt Cymbal Tagline Generator Template
.
Save Prompt: Once you're happy with the results, click Save, and select the
In this task, you will explore the Python code for the image analysis prompt you created. You will then modify the prompt to be more specific and test the new prompt in a notebook.
In the Google Cloud console, on the Navigation menu (), click Vertex AI > Workbench.
Find the
The JupyterLab interface for your Workbench instance opens in a new browser tab.
image-analysis.ipynb
. Set the kernel to Python 3.From the Vertex AI Studio page, navigate to the Prompt Management page. Select the Cymbal Product Analysis prompt you created.
On the right side of the prompt, click Get Code. Use Python as the language.
"""
). This is your current image analysis prompt. For example, it might be:Now you will modify the prompt to be more specific. Change the wording of the prompt in the code cell to make the output less than 10 words.
Next, modify the prompt code to encourage the model to produce the most creative, unusual, and unexpected descriptions of the image it can think of.
Save the changes to your code. Then, rerun the code cell in your notebook to test Gemini with the new prompt.
Verify that the new descriptions are shorter and more creative than the previous ones.
In this task, you will explore the Python code for the tagline prompt you created. You will then modify the prompt to include a specific keyword and test the new prompt in a notebook.
Inside of your Workbench instance, create a new notebook file named tagline-generator.ipynb
. Set the kernel to Python 3.
From the Vertex AI Studio page, navigate to the Prompt Management page. Select the Cymbal Tagline Generator Template prompt you created.
On the right side of the prompt, click Get Code. Use Python as the language.
Within the code, there will be multiple lines of text between triple quotes ("""
). This is your current tagline generation prompt.
Now you will modify the prompt to include a specific keyword. Modify the last input to specifically request that the tagline includes the keyword nature
.
Save the changes to your code. Then, rerun the code cell in your notebook to test the language model with the new prompt.
Verify that the new tagline includes the keyword nature
.
Congratulations, you've successfully completed the lab! You've helped Cymbal Direct create a set of tools within Google Cloud's Vertex AI platform that will streamline the generation of evocative product descriptions and catchy taglines for their new product line. You've also explored and modified the image analysis and tagline generation code in a notebook. Great job!
Check out the following resources to learn more about Gemini:
...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 February 17, 2025
Lab Last Tested February 17, 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