# Install the packages
! pip install --upgrade google-cloud-aiplatform
! pip install shapely<2.0.0
3 Part 1 Exercise
We’ll now practice what we have learned today. Try the following:
Use an LLM to make some data (eg customer service query categories, a small product catalogue).
Write prompts and contexts to interact with the data: try classifying a customer request, or returning relevant product details.
Make at least one output (category, product details etc) into a Python data structure that can be used for further backend tasks.
Write evaluation prompts and contexts to check the quality of outputs.
This notebook offers a simple template.
# Automatically restart kernel after installs so that your environment can access the new packages
import IPython
= IPython.Application.instance()
app True) app.kernel.do_shutdown(
from google.colab import auth
auth.authenticate_user()
# Add your project id and region
= "<...>"
PROJECT_ID = "<...>"
REGION
import vertexai
=PROJECT_ID, location=REGION) vertexai.init(project
4 TODO: Use an LLM to make some data
(eg customer service query categories, a small product catalogue).
# Your code here
4.0.1 TODO:
Write prompts and contexts to interact with the data: try classifying a customer request, or returning relevant product details.
# Your code here
4.0.2 TODO:
Make at least one output (category, product details etc) into a Python data structure that can be used for further backend tasks.
# Your code here
4.0.3 TODO:
Write evaluation prompts and contexts to check the quality of outputs.
# Your code here