prompt example and response

A shared tag with AI prompts and code snippets

From workspace: Google Gemini

Team: Gemini

Total snippets: 26

Google Gemini

prompt example and response

26 snippets

Hashtags for a video

Generate hashtags for a video ad

Generate 5-10 hashtags that relate to the video content. Try to use more popular and engaging terms, e.g. #Viral. Do not add content not related to the video. Start the output with 'Tags:'

Audio summary on clean energy

Summarize a piece of audio recording.

Please provide a summary of the audio.

Context best practices

The following table shows you some best practices when adding content in the context field of your prompt:

Creative output 2

Use images together with prompt

Can you write me a descriptive and dramatic poem about this image and include the location?

Creative output 1

Use images together with prompt

Can you write me a poem about this image?

Updated one more time prompt

Use images together with prompt

What is in common between these images? Refer to what's in the images in your response.

Updated prompt

Use images together with prompt

First, describe what's in each image in detail. What's in common between these images?

What is common?

Use images together with prompt

What is in common between these images?

Updated Diapers

Use image together with prompt

How long will these diapers last before I run out? Use the weight shown on the box to determine the child's age, and use the total number of diapers in the box. Divide the total number by how many diapers the child goes through per day.

Diapers

Use image together with prompt

How many days will these diapers last a baby?

Paella

Provide a list of all the following attributes: ingredients, type of cuisine, vegetarian or not, in JSON format

Table

Parse the table in this image into markdown format

Math problems

What is the 4th term in the sequence? Think step by step.

Updated toilet paper prompt

use image again

1. First, count how many toilet paper rolls are in this picture. 2. Then, determine how much toilet paper a typical person uses per day. 3. Calculate how long these rolls of toilet paper will last.

Toilet paper

Add pic to the prompt

When will I run out of toilet paper?

Break it down step-by-step

For complex tasks like the ones that require both visual understanding and reasoning, it can be helpful to split the task into smaller, more straightforward steps. Alternatively, it could also be effective if you directly ask the model to “think...

Updated Determine City

Add pictures to the prompt

Determine the city along with the landmark.

Determine city

Determine the city along with the landmark.

Updated image description

Add the picture to the prompt

Parse the time and city from the airport board shown in this image into a list.

Image description

Add the picture to the prompt

Describe this image.

Contextual information

Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle. Generative AI on Vertex AI Documentation Was this helpful? Send feedbackIntroduction to prompting bookmark_border To see an example of prompt design, run the "Intro to prompt design" notebook in one of the following environments: Open in Colab | Open in Colab Enterprise | Open in Vertex AI Workbench user-managed notebooks | View on GitHub Introduction to Prompting A prompt is a natural language request submitted to a language model to receive a response. Prompts can contain questions, instructions, contextual information, and examples to guide the model. After the model receives a prompt, it can generate various outputs, such as text, code, images, and more, depending on its capabilities. For example, a simple prompt could be a question: Prompt: What is the largest planet in our solar system? Response: The largest planet in our solar system is Jupiter. What is prompt design and prompt engineering Prompt design is the process of creating prompts that elicit the desired response from a language model. Writing well-structured prompts is essential for ensuring accurate, high-quality responses. The iterative process of refining prompts and evaluating the model's responses is often called prompt engineering. While Gemini models often perform well without extensive prompt engineering for straightforward tasks, effective prompt engineering remains crucial for achieving optimal results in complex scenarios. Components of a prompt A prompt can include various types of information to guide the model. While a Task is always required, other components are optional and can be used to improve the quality and relevance of the model's response. The following table provides a high-level overview of the common components of a prompt. Component Description When to Use Task (Required) The specific instruction or question you want the model to respond to. Always include this. It is the core request for the model. System Instructions (Optional) High-level instructions that define the model's persona, style, tone, or operational constraints. Use when you need to set a consistent personality or enforce specific rules for the entire conversation. Few-shot Examples (Optional) A set of example request-response pairs that demonstrate the desired output format and style. Use to guide the model on specific output formats, styles, or complex tasks where showing is better than telling. Contextual Information (Optional) Background information that the model can use or reference when generating a response. Use when the model needs specific data, facts, or background details to answer the prompt accurately. The following tabs provide detailed explanations and examples for each component. Task System instructions Few-shot examples Contextual information Contextual information, or context, is data you include in the prompt for the model to reference when generating a response. This information can be provided in various formats, such as text or tables.

Marble color Number of marbles Red | 12 Blue | 28 Yellow | 15 Green | 17 How many green marbles are there?

Few-shots

Few-shot examples are sample request-response pairs included in a prompt to demonstrate the desired output. They are particularly effective for dictating a specific style, tone, or format.

Classify the following as red wine or white wine: <examples> Name: Chardonnay Type: White wine Name: Cabernet Type: Red wine Name: Moscato ...

System Instructions

System instructions are high-level directives passed to the model before the user's prompt. They are used to define the model's persona, style, and constraints. You can add system instructions using the dedicated systemInstruction parameter. In the following example, system instructions dictate the model's persona, tone, and knowledge constraints.

#system: You are Captain Barktholomew, the most feared pirate dog of the seven seas. You are from the 1700s and have no knowledge of anything after that time. You only talk about topics related to being a pirate. End every message with...

Instruction Task

A task is the part of the prompt that specifies what you want the model to do. Tasks are typically provided by the user and can be a question or an instruction.

Write a one-stanza poem about Captain Barktholomew, the most feared pirate dog of the seven seas.

Question Task

A task is the part of the prompt that specifies what you want the model to do. Tasks are typically provided by the user and can be a question or an instruction.

What are the colors in the rainbow?

Introduction to Prompting

A prompt is a natural language request submitted to a language model to receive a response. Prompts can contain questions, instructions, contextual information, and examples to guide the model. After the model receives a prompt, it can generate various outputs, such as text, code, images, and more, depending on its capabilities. For example, a simple prompt could be a question:

What is the largest planet in our solar system?

Google Gemini - prompt example and response - AI Prompts & Code Snippets | Snippets AI