Overview of prompting strategies

A shared folder with AI prompts and code snippets

From workspace: Google Gemini

Team: Gemini

Total snippets: 7

Google Gemini

Overview of prompting strategies

7 snippets

Prompt health checklist - Prompt and system design issues

If a prompt is not performing as expected, use the following checklist to identify potential issues and improve the prompt's performance.

- Underspecified task: Ensure that the prompt's instructions provide a clear path for handling edge cases and unexpected inputs, and provide instructions for handling missing data rather than assuming inserted data will always be present and...

Prompt health checklist - Issues with instructions and examples

If a prompt is not performing as expected, use the following checklist to identify potential issues and improve the prompt's performance.

- Overt manipulation: Remove language outside of the core task from the prompt that attempts to influence performance using emotional appeals, flattery, or artificial pressure. While first generation foundation models showed improvement in some...

Prompt health checklist - Writing issues

If a prompt is not performing as expected, use the following checklist to identify potential issues and improve the prompt's performance.

- Typos: Check keywords that define the task (for example, sumarize instead of summarize), technical terms, or names of entities, as misspellings can lead to poor performance. - Grammar: If a sentence is difficult to parse, contains run-on...

Sample prompt template

The following prompt template shows you an example of what a well-structured prompt might look like:

<OBJECTIVE_AND_PERSONA> You are a [insert a persona, such as a "math teacher" or "automotive expert"]. Your task is to... </OBJECTIVE_AND_PERSONA> <INSTRUCTIONS> To complete the task, you need to follow these...

Components of a prompt

The following table shows the essential and optional components of a prompt:

Depending on the specific tasks at hand, you might choose to include or exclude some of the optional components. You can also adjust the ordering of the components and check how that can affect the response.

How to create an effective prompt

There are two aspects of a prompt that ultimately affect its effectiveness: content and structure.

Content: In order to complete a task, the model needs all of the relevant information associated with the task. This information can include instructions, examples, contextual information, and so on. Structure: Even when all the required...

Prompt engineering workflow

Prompt engineering is a test-driven and iterative process that can enhance model performance. When creating prompts, it is important to clearly define the objectives and expected outcomes for each prompt and systematically test them to identify...

Google Gemini - Overview of prompting strategies - AI Prompts & Code Snippets | Snippets AI