You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/concepts/gpt-4-v-prompt-engineering.md
+6-18Lines changed: 6 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
---
2
-
title: Introduction to prompt engineering with GPT-4 Turbo with Vision
2
+
title: Image prompt engineering techniques
3
3
titleSuffix: Azure OpenAI
4
-
description: Learn how to better engineer prompts for GPT-4 Turbo with Vision.
4
+
description: Learn how to better engineer image prompts for GPT-4 Turbo with Vision.
5
5
author: PatrickFarley
6
6
ms.author: pafarley
7
7
ms.service: azure-ai-openai
8
8
ms.topic: conceptual
9
-
ms.date: 01/30/2024
9
+
ms.date: 06/10/2024
10
10
manager: nitinme
11
11
---
12
12
13
-
# Introduction to prompt engineering with GPT-4 Turbo with Vision
13
+
# Image prompt engineering techniques
14
14
15
-
To unlock the full potential of GPT-4 Turbo with Vision, it's essential to tailor the system prompt to your specific needs. Here are some guidelines to enhance the accuracy and efficiency of your prompts.
15
+
To unlock the full potential of GPT-4 Turbo with Vision, it's essential to tailor the prompts to your specific needs. Here are some guidelines to enhance the accuracy and efficiency of your prompts.
16
16
17
-
## Fundamentals of crafting your prompt
17
+
## Fundamentals of crafting your image prompt
18
18
-**Contextual specificity:** Adding context to the scenario at hand gives the model a better understanding of an appropriate output. This level of specificity aids in focusing on relevant aspects and avoiding extraneous details.
19
19
-**Task-oriented prompts:** Focusing on a specific task helps the model to develop the output while taking that perspective into consideration.
20
20
-**Handling refusals:** When the model indicates an inability to perform a task, refining the prompt can be an effective solution. More specific prompts can guide the model towards a clearer understanding and better execution of the task. Some tips to keep in mind:
@@ -24,7 +24,6 @@ To unlock the full potential of GPT-4 Turbo with Vision, it's essential to tailo
24
24
- Ask the model to describe the image in details first and complete your specific task from the description
25
25
26
26
-**Adding examples:** Add examples that represent the type of responses you're looking for
27
-
-**Try prompt tuning:** Try prompt tuning techniques such as Chain of Thought, a technique where you describe a sequence of steps leading to an outcome, therefore communicating a sort of “chain of thought” or thought process for the model to replicate.
28
27
-**Break down requests:** Try breaking down complex requests step-by-step to create manageable sub-goals
29
28
-**Define output format:** Clearly mention the desired format for the output, such as markdown, JSON, HTML, etc. You can also suggest a specific structure, length, or specific attributes about the response.
30
29
@@ -75,17 +74,6 @@ When you receive a refusal output from a model, there are several ways you can t
75
74
|--------|-----------|
76
75
| Q: What is this dog breed and what is its average weight & height? :::image type="content" source="../media/concepts/gpt-v/pomeranian.jpg" lightbox="../media/concepts/gpt-v/pomeranian.jpg" alt-text="Photograph of a pomeranian dog sitting on a pool diving board above the water."::: <br> A: Breed: pomeranian; average weight: 3-7 lbs; average height: 8-14 inches <br> :::image type="content" source="../media/concepts/gpt-v/bulldog.jpg" lightbox="../media/concepts/gpt-v/bulldog.jpg" alt-text="Photograph of a bulldog laying in a grass field."::: A: Breed: English bulldog; average weight: 50-55 lbs; average height: 14-16 inches :::image type="content" source="../media/concepts/gpt-v/border-collie.jpg" lightbox="../media/concepts/gpt-v/border-collie.jpg" alt-text="Photograph of a border collie dog laying in a grass field."::: | A: Breed: Border Collie; average weight: 30-45 lbs; average height: 18-22 inches |
77
76
78
-
### Try prompt tuning
79
-
Using the chain of thought prompt technique below, you can guide the model to follow a thought process to achieve the correct answer.
80
-
81
-
|Basic prompt|Model output|
82
-
|--------|-----------|
83
-
| Q: Alex has 8 cookies. She buys 2 more boxes of 4 cookies each. How many cookies does she have? <br> A: 16 <br> Q: Alex has 20 balloons for a party, but 3 of them pop. She buys 10 more balloons. How many balloons does she have?| A: 27 |
84
-
85
-
|Updated prompt|Model output|
86
-
|--------|-----------|
87
-
| Q: Alex has 8 cookies. She buys 2 more boxes of 4 cookies each. How many cookies does she have? <br> A: Alex started with 8 cookies and bought two more boxes of 4 each. 2 x 4 = 8, and 8 + 8 = 16. <br> Q: Alex has 20 balloons for a party, but 3 of them pop. She buys 10 more balloons. How many balloons does she have? | A: Alex started with 20 balloons, but 3 popped, leaving her with 17 balloons. She then bought 10 more, so she has 17 + 10 = 27 balloons. |
0 commit comments