Comprehensive Beginner’s Guide to Google’s Generative AI Studio for Non-technical executives

Deepak Bhaskaran
9 min readJan 11, 2024

--

Getting started with Vertex AI Generative AI Studio

This guide provides instructions on how to use Generative AI Studio through the Google Cloud console. You do not need any technical knowledge. We will be walking through the various Generative AI functionalities with easy-to-follow examples.

What is Vertex AI

Vertex AI is a machine learning (ML) platform that lets you train and deploy ML models and AI applications, and customize large language models (LLMs) for use in your AI-powered applications. Vertex AI combines data engineering, data science, and ML engineering workflows, enabling your teams to collaborate using a common toolset and scale your applications using the benefits of Google Cloud.

Vertex AI provides several options for model training and deployment:

  • AutoML lets you train tabular, image, text, or video data without writing code or preparing data splits.
  • Custom training gives you complete control over the training process, including using your preferred ML framework, writing your own training code, and choosing hyperparameter tuning options.
  • Model Garden lets you discover, test, customize, and deploy Vertex AI and select open-source (OSS) models and assets.
  • Generative AI gives you access to Google’s large generative AI models for multiple modalities (text, code, images, speech). You can tune Google’s LLMs to meet your needs, and then deploy them for use in your AI-powered applications.

Vertex AI Studio on Google Cloud

Vertex AI Studio is a Google Cloud console tool for rapidly prototyping and testing generative AI models. The following diagram shows a high level overview of the Generative AI workflow.

You can access the Generative AI Studio (or) Vertex AI Studio from Google’s Cloud console by searching “Vertex AI Studio” or via the link
Vertex AI Studio

You can test sample prompts, design your own prompts, and customize foundation models to handle tasks that meet your application’s needs without any technical knowledge, including the following:

  • Test models using prompt samples.
  • Design and save your own prompts.
  • Tune a foundation model.
  • Convert between speech and text.

Language

There are two ways to access the Language offerings from Generative AI Studio on Google Cloud:

  • Click the OPEN button at the bottom of the Language box on the Generative AI Studio Overview page.
  • Click Language from the menu on the left under Generative AI Studio tab.

Upon clicking, the following page will be presented.

Get Started

Create Prompt

Create Prompt lets you designs prompts for tasks relevant to your business use case including code generation. To get started, click on the + TEXT PROMPT button as shown in the image below

Upon clicking, you will be redirected to the following page. You can hover or click on ? buttons to find out more about each field and parameter. Also, the following image has been annotated to provide a quick overview of the interface.

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.

Currently, there is no best way to design the prompts yet. Generally, there are 3 methods that you can use to shape the model’s response in a way that you desired.

  • Zero-shot prompting — This is a method where the LLM is given no additional data on the specific task that it is being asked to perform. Instead, it is only given a prompt that describes the task. For example, if you want the LLM to answer a question, you just prompt “what is prompt design?”.
  • One-shot prompting — This is a method where the LLM is given a single example of the task that it is being asked to perform. For example, if you want the LLM to write a poem, you might give it a single example poem.
  • Few-shot prompting — This is a method where the LLM is given a small number of examples of the task that it is being asked to perform. For example, if you want the LLM to write a news article, you might give it few news articles to read.

You may also notice the FREE-FORM and STRUCTURED tabs in the image above. Those are the two modes that you can use while designing your prompt.

  • FREE-FORM — This mode provides a free and easy approach to design your prompt. It is suitable for small and experimental prompts with no additional examples. You will be using this to explore zero-shot prompting.
  • STRUCTURED — This mode provides an easy-to-use template approach to prompt design. Context and multiple examples can be added to the prompt in this mode. This is especially useful for one-shot and few-shot prompting methods which you will be exploring later.

FREE-FORM mode

You will try zero-shot prompting in FREE-FORM mode. To start,

  • copy “What is a prompt gallery?” over to the prompt input field
  • click on the SUBMIT button on the right side of the page

The model will respond a comprehensive definition of the term prompt gallery.

Here are a few exploratory exercises for you to explore.

  • adjust the Token limit parameter to 1 and click the SUBMIT button
  • adjust the Token limit parameter to 1024 and click the SUBMIT button
  • adjust the Temperature parameter to 0.5 and click the SUBMIT button
  • adjust the Temperature parameter to 1.0 and click the SUBMIT button

Inspect if how the responses change as to change the parameters?

STRUCTURED mode

With STRUCTURED mode, you can design prompts in more organized ways. You can also provide Context and Examples in their respective input fields. This is a good opportunity to learn one-shot and few-shot prompting.

In this section, you will ask the model to complete a sentence. Go back to the Text Prompt window and

  • click on the STRUCTURED tab if you have not
  • copy “the colour of the sky is” in INPUT field
  • click on the SUBMIT button on the right side of the page

You would see a similar result as shown in the image below.

Instead of completing the sentence, the model gave a full sentence as a response which is not what we wanted. You can try to influence the model’s response with one-shot prompting. This time around you will add an example for the model to based its output from.

Under Examples field,

  • copy “the colour of the grass is” to the INPUT field
  • copy “green” to the OUTPUT field
  • click on the SUBMIT button on the right side of the page.

Now the model will respond to complete the sentence instead. The response should be something similar to this.

Congrats! You have successfully influenced the way the model produces response.

For the next task, you will use the model to perform sentiment analysis on a sentence, such as determining whether a movie review is positive or negative. Go back to the Text Prompt window and

  • copy the prompt “It was a time well spent!” over to the INPUT field
  • click on the SUBMIT button on the right side of the page

As you can see, the model did not have enough information to know whether you were asking it to do sentiment analysis. This can be improved by providing the model with a few examples of what you are looking for.

Try adding these examples as shown in the image below:

INPUT : A well-made and entertaining film

OUTPUT : positive

INPUT : I fell asleep after 10 minutes

OUTPUT : negative

INPUT : The movie was ok

OUTPUT : neutral

and click on the SUBMIT button on the right side of the page

The model will now responds the way you wanted. It should respond as positive.

You can also save the newly designed prompt. To save the prompt, click on SAVE button and name it anyway you like.

The saved prompt will appear at the MY PROMPTS tab.

Create Chat Prompt

Go back to the Language page and click on the + TEXT CHAT button to create a new chat prompt.

You will see the new chat prompt page. It’s relatively similar to the new prompt page that you went through earlier.

For this section, you will add context to the chat and let the model respond based on the context provided. Let’s add these contexts to the Context field.

  • copy these context to Context field
    Your name is Roy.
    You are a support technician for an IT department.
    You only respond with “Have you tried turning it off and on again?” to any queries.
  • copy “my computer is so slow” to the chatbox and
  • press Enter key or click the send message button (the right arrow-head button)

The model would consider the provided additional context and answer the questions within the constraints.

Prompt Gallery

Prompt Gallery lets you explore how generative AI models can work for a variety of use cases. There are a variety of topics: Summarization, Classification, Extraction, Writing, and Ideation for you to explore. Head back to the Get Started page and explore them at your own pace.

Test models using prompt samples

Prompt Gallery, in the Language section of Vertex AI Studio, contains a variety of sample prompts that are predesigned to help demonstrate model capabilities. The sample prompts are categorized by the task type, such as summarization, classification, and extraction. Each prompt is preconfigured with a specified model and parameter values so you can just open the sample prompt and click Submit to get the model to generate a response.

Design and save your own prompts

Prompt design is the process of manually creating prompts that elicit the desired response from a language model. By carefully crafting prompts, you can nudge the model to generate a desired result. Prompt design can be an efficient way to experiment with adapting a language model for a specific use case.

You can create and save your own prompts in Vertex AI Studio. When creating a new prompt, you enter the prompt text, specify the model to use, configure parameter values, and test the prompt by generating a response. You can iterate on the prompt and its configurations until you get the desired results. When you are done designing the prompt, you can save it in Vertex AI Studio.

Response citations

If you are using a text model in Vertex AI Studio like text-bison, you receive text responses based on your input. Our features are intended to produce original content and not replicate existing content at length. If Vertex AI Studio quotes at length from a web page, it cites that page in the output.

You can change the quality of responses by tweaking the temperature (output randomness), and experimenting with other response parameters in Vertex AI Studio.

Citations are available in Vertex AI Studio and are available in the API. To learn more about Responsible AI and citations, see Citation metadata.

--

--

No responses yet