Getting Started with Vertex AI

Generative AI like Google Gemini is great, but it is pre trained. Ready for more control over your AI model? Getting started with Vertex AI.
Blue background that says vertex ai

EdTech Books by Alice Keeler

  • Student Engagement
  • Google Classroom
  • Student Centered Classrooms
  • Google Apps for Littles
  • Math and Google Apps
  • Ditch That Homework
Getting Started with Vertex AI

In 2023 I was honored to be part of Google Cloud NEXT Developer Keynote, as the Queen of Spreadsheets. In the live demo we showed how Google AppSheet and Google Vertex AI could develop an intelligent app. Now, I want to show you, as a teacher, how you can use Vertex AI for something practical in your classroom, even if you’ve never touched machine learning.

Getting Started with Vertex AI

Your AI Toolbox (No Coding Required, Yet!)

Teachers are constantly seeking innovative tools to enhance instruction, personalize learning, and gain deeper insights into student progress. Artificial intelligence (AI) offers tremendous potential in this regard, and Google Cloud’s Vertex AI provides a powerful yet accessible platform for educators to leverage the benefits of AI, even without extensive technical expertise.

What is Vertex AI?

Vertex AI is Google Cloud’s unified machine learning platform. It provides a comprehensive suite of tools and services that streamline the process of building, deploying, and managing AI models. It’s a platform designed to empower developers and data scientists to create sophisticated AI solutions.

Why Shift to Vertex AI

I use Generative AI at gemini.google.com and also in the sidebar of my Google Sheets. Gemini is great for helping you to answer questions, generate text, summarize information, and even help you write formulas and code snippets within Sheets. It’s great for general productivity and exploring AI capabilities. Vertex AI is professional grade AI that you can design, build, deploy and manage machine learning models. You have more control over your AI projects. 

Explain That to Me Like I'm a 3rd Grader

I asked Gemini to explain the difference from using Gemini in Google Sheets to using Google Vertex AI in less jargony terms: 

Imagine you’re making cookies:

  • Gemini (the basic chatbot): Is like using a ready-made cookie dough. It’s convenient and easy, but you can’t change the recipe much. You are using a recipe that someone else made.

  • Vertex AI: Is like having your own fully-equipped kitchen.

    • “Building… machine learning models”: You get to create your own cookie recipes from scratch. You choose the ingredients (data), the baking method (algorithms), and the flavor (what you want the AI to do).
    • “Deploying”: You get to bake your cookies and share them with others (make your AI available for use). You decide if you want to share them with just a few friends or with everyone in the world.
    • “Managing”: You get to keep track of your recipes, update them if needed, and make sure you have enough ingredients to make more cookies. You are able to make sure the recipe is good now and in the future.
    • “At scale”: You can make a few cookies or a HUGE batch for a big party – enough for everyone who wants one. Vertex AI can handle a lot of requests.
    • “Much finer control over your AI projects”: You’re the head chef! You decide exactly how the cookies are made, who gets them, and how many you bake. You have complete control over your cookie (AI) creation and distribution.

In simpler terms, Vertex AI lets you:

  1. Create your own custom AI “recipes” (models).
  2. “Bake” (train) those AI models using your own data.
  3. “Serve” (deploy) your AI so others can use it.
  4. Make sure your AI keeps working well and make changes as needed.
  5. Handle lots of users without your AI slowing down.
  6. Be the boss of your own AI project.

Instead of using a pre-made solution like Gemini, Vertex AI gives you the tools and the power to build exactly the AI you need, from start to finish. It is like being able to create any kind of cookie you can imagine, rather than just using what’s available at the store.

How Can Vertex AI Benefit Teachers?

For the average teacher. It can’t. You may use solutions that other people used Vertex AI to build, but it is important to understand that Vertex AI is NOT marketed as a classroom tool. Google Gemini has some thoughts on how it might benefit educators: 

While educators may not directly build AI models themselves (at least not yet), Vertex AI’s capabilities can significantly benefit teachers in several ways:

  • Empowering Developers to Create Educational Tools: Vertex AI provides the foundation for developers to build AI-powered applications specifically designed for educational use. Think of custom tools that integrate with existing learning management systems or analyze student data to provide personalized recommendations.
  • Accessing Pre-trained AI Models: Vertex AI offers access to pre-trained AI models for various tasks, such as natural language processing (understanding text) and image recognition. These models can be integrated into educational tools to provide features like automated feedback, content analysis, or personalized learning experiences.
  • Driving Innovation in Education: By providing a robust platform for AI development, Vertex AI helps drive innovation in the educational technology space. This leads to the creation of more advanced and intelligent tools that teachers can ultimately use in the classroom.

So Who Is This Getting Started with Vertex AI Blog Post For?

The purpose of this tutorial is to give anyone with a desire to gain a little more understanding into machine learning and training AI models an opportunity to at least jump in with a small project. This is an opportunity to gain awareness around the topics and explore if learning more about training AI models is for you. 

Wait, We Need to Train Models?

You might be thinking, “Train models? That sounds complicated!” And you’re right, training a machine learning model from scratch can be a very complex undertaking. It involves gathering massive amounts of data, choosing the right algorithms, and fine-tuning the model’s parameters. This is typically the work of data scientists and machine learning engineers.

However, the good news is that for many common tasks, you don’t need to train a model from scratch. Think of it like this: you don’t need to build a car from scratch to drive to the grocery store. You can just buy a car that’s already been built for you.

Similarly, platforms like Vertex AI offer something called pre-trained models. These are models that have already been trained on vast datasets by experts at Google. They’re ready to use “out of the box” for tasks like understanding the sentiment of text (is it positive, negative, or neutral?), recognizing objects in images, or even translating languages. These are the kinds of models that power features like “Help me write” in Google Docs or image search in Google Photos. Gemini and ChatGPT, for example, are based on very large, pre-trained models.

So, Why Would Anyone Train a Model?

If pre-trained models are so good, why would anyone bother training their own? There are a few key reasons:

  • Specialized Tasks: Pre-trained models are great for general tasks, but what if you need a model for something very specific? For example, imagine you want to build a tool that can identify different species of birds from photos. A general image recognition model might not be accurate enough. In this case, you would likely need to train a custom model on a dataset of bird images. This is where Vertex AI becomes essential. It allows you to take a pre-trained model and fine-tune it with your own data to make it more accurate for your specific task.
  • Customization: Even for more general tasks, you might want to customize a model to better suit your needs. For example, you might want to build a sentiment analysis tool that’s specifically tailored to the language used by your students. By training a model on data from your classroom, you can create a tool that’s more accurate and relevant.
  • Innovation: Training your own models opens up the door to creating entirely new AI-powered solutions. If you have a unique idea for how AI could be used in education, you might need to train a custom model to bring your vision to life.

Getting Started with a Vertex AI Project

For years, educators have relied on automated grading for multiple-choice assessments. This is a straightforward process for computers. Each question has a pre-defined correct answer, and a simple program can compare a student’s selection to the answer key, instantly determining its accuracy. This method, while efficient, only scratches the surface of evaluating student understanding.

Free-response questions, on the other hand, present a far greater challenge for automated systems. These questions, which require students to articulate their thoughts, explain concepts, or analyze information in their own words, demand a deeper level of comprehension from the grader. Unlike multiple-choice, there isn’t a single “correct” answer. Evaluating these responses requires an understanding of nuance, context, and the subtle variations in human language. This is a task that has traditionally been the exclusive domain of human educators.

Enter Artificial Intelligence: Bridging the Gap

This is where AI, specifically tools like Google’s Vertex AI, enters the picture. Vertex AI provides a platform for leveraging the power of machine learning, including sophisticated natural language processing (NLP) models. These models are trained on vast amounts of text data, enabling them to “understand” the meaning behind words in a way that traditional programming simply cannot.

Automating Feedback Analysis with Vertex AI

To illustrate the potential of Vertex AI, let’s consider a practical example: analyzing student feedback on a course. This is a task that, while crucial for pedagogical improvement, can be incredibly time-consuming for instructors. Here’s how Vertex AI can streamline this process: Imagine you’ve collected numerous open-ended student evaluations at the end of a semester. Instead of manually reading through each response, you can leverage Vertex AI’s natural language processing capabilities to quickly gauge the overall sentiment and identify key themes. By employing a pre-trained sentiment analysis model, Vertex AI can automatically categorize each piece of feedback as positive, negative, or neutral, assigning a confidence score to each classification. This process involves preparing the text data, sending it to the model via the Vertex AI API, and then interpreting the model’s output, which provides an at-a-glance overview of student sentiment. This allows you to quickly identify areas where the course excelled, such as engaging lectures or helpful assignments, as well as pinpoint areas needing attention, such as confusing concepts or an overly fast pace. This rapid analysis empowers instructors to make data-driven adjustments to their teaching methods and course content, ultimately fostering a more effective learning environment.

1. Setting Up a Google Cloud Account:

To use Vertex AI, you’ll need a Google Cloud account.

  • Go to: https://cloud.google.com/
  • Click “Get Started for Free”: Follow the instructions to create an account. You may need a Google account and provide billing information. Google Cloud offers a Free Tier with limited usage of many services, including Vertex AI.

The likelihood that your initial projects would cost you money is very small and it would probably only be pennies if it did. 

Sample pricing for cloud storage. Less than 3 cents per GIGABYTE per month.

2. Creating a Google Cloud Project:

A “project” is a way to organize your Google Cloud resources.

  • Go to the Google Cloud Console: https://console.cloud.google.com/ (You’ll need to log in with your Google Cloud account.)
  • Create a New Project: Click on the project dropdown menu at the top of the page and select “NEW PROJECT.” Give your project a name (e.g., “StudentFeedbackAnalysis”).

3. Enabling the Vertex AI API

You might think you can just jump right into using Vertex AI after finding it in the Google Cloud Console. However, you first need to enable its API. Think of it like this: Google Cloud offers a toolbox filled with different tools (services). Each tool has its own “on” switch (the API). By default, most of these switches are turned off. Enabling the Vertex AI API is simply flipping the switch to “on” for that specific tool within your project. This tells Google that you intend to use Vertex AI, allowing them to properly manage permissions, track your usage for billing (even on the Free Tier), and allocate the necessary resources. It’s a quick but essential step to ensure secure and controlled access to Vertex AI’s powerful features.

  • Go to the API Library: In the Cloud Console, locate the search box at the top of your project page.
  • Search for “Vertex AI API”: Click on the Vertex AI API and then click “Enable.”

9. Go to Vertex AI on Google Cloud Console

We’ll use a pre-built container that’s designed for text classification. This simplifies the process significantly.

  • Go to Vertex AI in the Cloud Console: Search for “Vertex AI” in the console.

4. Creating a Vertex AI Workbench Instance

  • Instance Name: Enter a name in the “Name” field. instance-20250131-155009 or a name like edu-feedback-instance is perfectly fine.

  • Region: Select your desired region from the “Region” dropdown. us-central1 (Iowa) is a good choice if you’re in the central US.

  • Zone: Leave the “Zone” as the default (us-central1-a in this case).

  • Attach 1 NVIDIA T4 GPU: Leave this unchecked. You do not need a GPU for this sentiment analysis tutorial.

  • Enable Dataproc Serverless Interactive Sessions: Uncheck this option. You do not need Dataproc for this tutorial. Disabling this will also help reduce potential costs.

  • Networking: Within the “Advanced Options” section, leave the “Networking” settings as they are (using the defaults selected in the previous steps).
  • Network in this project: Select “Network in this project”. Set “Network” to default. Set “Subnetwork” to the default subnet (e.g., default(10.128.0.0/20)).

  • Skip to Advanced Options: You can skip the other settings in this top section and proceed directly to the bottom of the page. Click on “ADVANCED OPTIONS”.

More with Advanced Options

Okay, here’s the updated section with the new “Environment” settings based on your screenshot, formatted as requested with bullet points and bolded headings:

  • Instance properties: Leave “Dataproc Serverless Interactive Sessions” unchecked. Leave GPU type as “No GPU”. Consider enabling idle shutdown to save costs.

Expand Out Option Sections

  • Environment: Expand the “Environment” section.
    • JupyterLab Version: Select “JupyterLab 3.x”.
    • Use custom container: Leave this unchecked.
    • Version: Select “Use the latest version”.
    • Post-startup script: Leave this blank.
    • Metadata: Leave this blank.
  • Machine Type: Expand the “Machine type” section. Change the “Machine type” from e2-standard-4 to n1-standard-1 (1 vCPU, 3.75 GB RAM). This is crucial for cost savings.
    • Shielded VM:

      • You can leave these settings at their default values. They are security features, and the defaults provide a good level of protection:
        • Secure Boot: You can leave this checked or unchecked.
        • Virtual Trusted Platform Module (vTPM): You can leave this checked.
        • Integrity Monitoring: You can leave this checked.
    • Idle Shutdown:

      • Enable Idle Shutdown: Check the box.
      • Time of inactivity before shutdown (Minutes): Set this to a reasonable value, such as 60 (minutes). This will automatically stop your instance after 60 minutes of inactivity, saving you money.
    •  
  • Leave the rest of the options defaulted.
  • Create: Double-check all settings, especially the machine type (n1-standard-1) and that you’ve selected “Use the latest version” under “Environment.” Click the blue “CREATE” button at the bottom right.
  • Wait: It will take a few minutes for your instance to be created.

4. Open JUPYTERLAB

  • Open JupyterLab: Once the instance is ready (status shows a green checkmark), click the “OPEN JUPYTERLAB” button next to your instance name.

5. Python 3 Notebook

  • Select Python 3: Click on Python 3 under the Notebook section.
  • Install the SDK: In the first cell of your new notebook, type the following command and press Shift+Enter to run it:
    !pip install google-cloud-aiplatform)
    • This command uses pip (the Python package installer) to install the Vertex AI SDK for Python. This SDK provides the necessary tools to interact with Vertex AI services from your code.
  • Restart the Kernel: After the installation finishes, go to the “Kernel” menu at the top of the JupyterLab interface and select “Restart Kernel”.
    • This ensures that the newly installed SDK is properly loaded and available for use in your notebook.
    • You can ignore any messages asking you to update pip.
  • Authenticate in the Notebook: In a new cell in your Jupyter notebook, paste the following code:
    
    from google.cloud import aiplatform
    
    # Replace with your project ID
    PROJECT_ID = "YOUR_PROJECT_ID"
    
    # Initialize the Vertex AI SDK
    aiplatform.init(project=PROJECT_ID, location="us-central1")  
    # Change location if needed
    # Load the pre-trained text generation model
    model = TextGenerationModel.from_pretrained("text-bison@001")
    
    # Example text prompt
    prompt = "What are some good ideas for improving this course?"
    
    # Generate text
    response = model.predict(prompt)
    
    print(response)
        
  • Replace the Project ID: In another tab go to console.cloud.google.com to grab your project ID. 
  • Run this cell: by pressing Shift+Enter.

6. Load the Pre-trained Model and Classify Text

  • Load the Model: In a new cell, paste the following code and run it:

    from google.cloud import aiplatform

    model = aiplatform.TextGenerationModel.from_pretrained("text-bison@001")

  • Prepare Input Text: In a new cell, create a list of example student feedback.

    student_feedback = [
    "This course was incredibly helpful and engaging. I learned a lot!",
    "I found the material to be too difficult and the pace too fast.",
    "The instructor was knowledgeable but the assignments were not very relevant.",
    "I enjoyed the class discussions and the interactive activities.",
    "The course content was okay, nothing special."
    ]
  • Get Predictions: In a new cell, paste the following code to get sentiment predictions:
    
    for feedback in student_feedback:
        prediction = model.predict(instances=[feedback])
        sentiment_score = prediction[0].predictions[0]['scores'][0]
    
        if sentiment_score >= 0.7:
            sentiment = "Positive"
        elif sentiment_score < 0.4:
            sentiment = "Negative"
        else:
            sentiment = "Neutral"
    
        print(f"'{feedback}' -> Sentiment: {sentiment} (Score: {sentiment_score:.2f})")
    
  • Prepare Input Text: In a new cell, create a list of example student feedback. student_feedback = [ "This course was incredibly helpful and engaging. I learned a lot!", "I found the material to be too difficult and the pace too fast.", "The instructor was knowledgeable but the assignments were not very relevant.", "I enjoyed the class discussions and the interactive activities.", "The course content was okay, nothing special." ]

Leave a Reply

© 2025 All Rights Reserved.

💥 FREE OTIS WORKSHOP

Join Alice Keeler, Thursday Oct24th or register to gain access to the recording.
Create a free OTIS account.

Join Alice Keeler for this session for using FigJam to start every lesson.

Exit this pop up by pressing escape or clicking anywhere off the pop up.