Create prompts for Gemini in Vertex AI Studio
Use Vertex AI Studio to design, test, and customize your prompts sent to Google's Gemini and PaLM 2 large language models (LLM). You can view the Gemini API in Vertex AI and Vertex AI API code used to generate the responses.
From Vertex AI Studio, you can complete the following:
- Test models using provided prompt samples
- Design and manage your prompts
- Compare prompt output by model
- Evaluate your prompts against select quality metrics
- Tune models to get tailored responses
- Ground model output to Vertex AI Search or Google Search
- Get the Vertex AI API code to implement your work
Before you begin
When you use Vertex AI Studio with a Google Cloud free trial account or without signing in to Google Cloud, some features are not available as shown in the following table. To try Vertex AI Studio, accept the Vertex AI Studio Terms of Service window in the Google Cloud console.
Use without a Google Cloud account | Use with a Google Cloud free trial account | Use with an existing Google Cloud account | |
---|---|---|---|
Sign in required | No | Yes | Yes |
Queries per minute (QPM) | 2 QPM for all multimodal models | See quota limits | See quota limits |
Credits offered | $0 | Up to $300 for 90 days | $0 |
Prompt gallery | No | Yes | Yes |
Prompt designer | Yes | Yes | Yes |
Save prompts | No | Yes | Yes |
Prompt history | No | Yes | Yes |
Advanced parameters | No | No | Yes |
Tuning | No | No | Yes |
API usage | No | Yes | Yes |
Billing required | No | No | Yes |
How to get started | Go to Vertex AI Studio | Sign up for a free trial | Try Vertex AI Studio in your console |
Create a Google Cloud account to get started
In order to try this quickstart, you'll need to create a Google Cloud account. With this account, you'll get $300 in free credit, plus free usage of over 20 products— not charged against your $300 credit.
Get started for freeFor more information on getting set up on Google Cloud after your account is created, see Get set up on Google Cloud.
Test a language model from the prompt gallery
- Go to the Vertex AI Studio page from the Vertex AI
section in the Google Cloud console.
Go to Vertex AI Studio - In the Language Powered by Gemini card, click Open.
In the list of prompt samples, in the Summarization section, open the Transcript summary card.
The model, parameters, examples, and test prompt are prefilled.
To generate a summary of the prompt, in the Test section, click Submit.
The response is displayed in the Output section.
Optional: To see different results, select a different model from the Model list or change the parameters, and then click Submit.
Optional: To view the Vertex AI API code that you need to generate a transcript summary, click
Get code.
Design and test your prompt
You can create and test your prompts (inputs) for tasks that are relevant to your business use case, and generate responses. By adding inputs and outputs, the LLM is capable of learning in-context from the examples of responses.
You can create a prompt, which gives a precise instruction, and asks the LLM to complete a sentence for you or to answer one-time questions.
- Go to the Vertex AI Studio page from the Vertex AI
section in the Google Cloud console.
Go to Vertex AI Studio - In the Language Powered by Gemini card, click Open.
On the Generate text card in the Create a new prompt section, click Text prompt.
An untitled prompt opens.
In the prompt box, add a clear and concise description of the task that you want the model to do, such as
Suggest a name for a flower shop that sells bouquets of dried flowers
.Click Submit.
A response appears in response box.
Optional: To view different results, adjust the prompt, model, or parameters, and click Submit.
Optional: To view the Vertex AI API code that you need to generate a similar response, click
Get code.
Vertex AI Studio prompt categories
From the Vertex AI Studio you can test and customize prompts for different generative AI models.
- Multimodal: Test multimodal prompts using multimodal models like Gemini 1.5 Pro and Gemini 1.0 Pro Vision. To learn more, see Gemini multimodal models.
- Language: Try out language prompts using a variety of language models. To learn more about these models, see Gemini multimodal models, and Overview of language models.
- Vision: Test image model generation using Imagen on Vertex AI.
- Speech: Perform text-to-speech and speech-to-text conversions. This is done using the Chirp model. To learn more about Chirp, see Chirp: Universal speech model.
Explore prompts in the prompt gallery
Prompt samples are available in the Multimodal and Language sections of Vertex AI Studio, and contain 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 specified model and parameter values so you can open the sample prompt and click Submit to get the model to generate a response.
Design and manage your prompts
Prompt design is the process of manually creating prompts that elicit the intended response from a language model. By carefully crafting prompts, you can nudge the model to generate a good result for your use case. Prompt design can be an efficient way to experiment with model output.
Vertex AI Studio enables your team to create, save, and collaboratively refine prompts. When designing a new prompt, you can input the prompt text, choose the ideal model, adjust parameters, and test it for immediate feedback. When a prompt is finalized, you can save it within your shared project in Vertex AI Studio.
To get started with prompt design, see Introduction to prompting.
Compare prompt output by model
In Vertex AI Studio, you can compare prompt results to see what model and settings pairing works best for your use case.
From the Language tab, view your prompts, and select Compare next to the prompts that you want to compare. You can compare up to three prompts side-by-side.
Prompt lifecycle management
If you have many prompts, it's necessary to have a central place to manage them. From the Multimodal and Language pages, you can view all of your prompts by type under the My prompts tab. From these pages, you can version your prompts, restore previous versions, delete, export, and manage prompt naming. You can also add notes to prompts for record keeping and as a way to centrally collaborate with your prompting team.
Ground your prompts from the Vertex AI Studio
In generative AI, grounding is the ability to connect language model output to verifiable sources of information. From the Multimodal and Language pages in the Vertex AI Studio, you can choose to ground model output to Vertex AI Search or Google Search. To learn more about grounding, see the Grounding overview. To learn more about grounding model output to Google Search, see Grounding with Google Search.
Explore generative AI models in Model Garden
Model Garden is a platform that helps you discover, test, customize, and deploy Google proprietary and select OSS models and assets. To explore the generative AI models and APIs that are available on Vertex AI, go to Model Garden in the Google Cloud console.
To learn more about Model Garden, including available models and capabilities, see Explore AI models in Model Garden.
Tune a foundation model
While prompt design is great for quick experimentation, if training data is available, higher quality can be achieved by tuning the model itself. Tuning a model lets you customize the model's response based on examples of the task that you want the model to perform.
To learn how to tune a foundation model, see Tune foundation models.
Use Vertex AI Studio to design, test, and customize your prompts sent to Google's Gemini and PaLM 2 large language models (LLM). After an LLM processes your prompt, it sends you its response. To learn more about the Vertex AI Studio, see Experiment with models in Vertex AI Studio.
What's next
- Learn about designing text prompts and text chat prompts.
- Learn about text embeddings.
- Try to tune a language foundation model.
- Learn about responsible AI best practices and Vertex AI's safety filters.
- Learn about streaming responses from a model.