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.
Created: 7/8/2025
AI Prompts, ChatGPT, Code Snippets, Prompt Engineering
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.