Punkty kontrolne
Hello PaLM
/ 10
Prompt Templates
/ 10
Model Parameters for 'text-bison@001'
/ 10
Advanced Chat model with the SDK
/ 10
Embedding model with 'textembedding-gecko@001'
/ 10
Code generation with 'code-bison@001'
/ 10
Code completion with code-gecko@001
/ 20
Code chat with 'codechat-bison@001'
/ 20
Generative AI with Vertex AI: Getting Started
GSP1150
Overview
This lab will provide an introductory, hands-on experience with Generative AI on Google Cloud.
PaLM 2 is Google's next generation Large Language Model (LLM) that builds on Google's legacy of breakthrough research in machine learning and responsible AI. PaLM 2 excels at tasks like advanced reasoning, translation, and code generation because of how it was built.
Vertex AI Studio and the Vertex AI PaLM API is powered by PaLM 2.
In this lab, you will learn how to get started with AI Studio and the Vertex AI PaLM API.
What you will learn:
How to use the Generative AI:
- Creating different types of prompts and getting responses in a jupyter notebook
How to use the Vertex AI PaLM API & Python SDK:
- Background on LLMs and the PaLM API
- Text generation examples
- Exploring various model parameters involved in text generation
- Chat model examples
- Code completion model examples
- Embedding model examples
Setup and requirements
Before you click the Start Lab button
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 will be made available to you.
This hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
- Access to a standard internet browser (Chrome browser recommended).
- Time to complete the lab---remember, once you start, you cannot pause a lab.
How to start your lab and sign in to the Google Cloud console
-
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
- The Open Google Cloud console button
- Time remaining
- The temporary credentials that you must use for this lab
- Other information, if needed, to step through this lab
-
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.
Note: If you see the Choose an account dialog, click Use Another Account. -
If necessary, copy the Username below and paste it into the Sign in dialog.
{{{user_0.username | "Username"}}} You can also find the Username in the Lab Details panel.
-
Click Next.
-
Copy the Password below and paste it into the Welcome dialog.
{{{user_0.password | "Password"}}} You can also find the Password in the Lab Details panel.
-
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges. -
Click through the subsequent pages:
- Accept the terms and conditions.
- Do not add recovery options or two-factor authentication (because this is a temporary account).
- Do not sign up for free trials.
After a few moments, the Google Cloud console opens in this tab.
File Organization
This lab is organized across two different files:
File | Description |
---|---|
language/getting-started/intro_generative_ai_studio.md | UI-based tutorial on getting started with AI Studio |
language/getting-started/intro_palm_api.ipynb | Notebook on getting started with the Vertex AI PaLM API & Python SDK |
Task 1. Vertex AI Workbench
In your Google Cloud project, navigate to Vertex AI Workbench. In the top search bar, enter Vertex AI Workbench of the Google Cloud console.
- Go to User-managed-notebooks.
- Click Open JupyterLab for
generative-ai-jupyterlab
. - The JupyterLab will run in a new tab.
Task 2. Open the generative-ai folder
- Navigate to the
generative-ai
folder on the left hand side of the notebook. - Navigate to the
/language/getting-started
folder. - Click on the
intro_palm_api.ipynb
file - Follow the steps in the notebook and run each cell one at a time.
Click Check my progress to verify the objectives.
text-bison@001
textembedding-gecko@001
code-bison@001
code-gecko@001
codechat-bison@001
Congratulations!
You have now completed the lab! In this lab, you worked with the PaLM API in a Jupyter notebook using the Python SDK for Generative AI.
Next steps
- Check out the Generative AI on Vertex AI documentation.
- Learn more about Generative AI on the Google Cloud Tech YouTube channel.
Google Cloud training and certification
...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 November 2nd, 2023
Lab Last Tested November 2nd, 2023
Copyright 2024 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.