|
1043 | 1043 |
|
1044 | 1044 | REMEMBER: Your answer will help improve the AI model. It is important to answer the question correctly. Even answering "no" will improve the model! You must strictly adhere to the output format in this prompt.
|
1045 | 1045 | Evaluation:
|
| 1046 | +
|
1046 | 1047 | <question>
|
1047 | 1048 | """
|
1048 | 1049 | PAIRWISE_INSTRUCTION_FOLLOWING_RUBRIC_CRITIQUE_TEMPLATE = """# Instructions
|
|
1113 | 1114 | """
|
1114 | 1115 |
|
1115 | 1116 | MULTIMODAL_UNDERSTANDING_RUBRIC_GENERATION_PROMPT_TEMPLATE = """# Instructions
|
1116 |
| -Your task is to generate a rubric that can be used to evaluate the image understanding quality of responses generated by an AI model. Specifically, to generate rubrics for an image and user prompt that describes the properties that should hold for a good response to that prompt. Generate the rubric following the provided guidelines. |
| 1117 | +Your task is to generate a rubric that can be used to evaluate the image understanding quality of responses generated by an AI model. Specifically, you will generate a checklist of questions for a user prompt and its associated image that will measure how complete and correct a model response is based on how many questions it satisfies. The image and user prompt are provided below. |
| 1118 | +
|
| 1119 | +
|
| 1120 | +# Rubric Guidelines |
1117 | 1121 |
|
1118 |
| -First, describe the contents of the image thoroughly, making sure to document all of the important objects and their interactions with each other and the scenery. Then, thoroughly examine the prompt and decompose its individual instructions into a list of yes/no questions. Be as specific and concise as possible for each question. Ensure each question directly relates to the image and infer the connection if it is not explicitly stated. |
| 1122 | +Generate the rubric following the provided guidelines below. |
| 1123 | +
|
| 1124 | +First, describe the contents of the image thoroughly, making sure to document all of the important objects and their interactions with each other and the scenery. Then, thoroughly examine the prompt and decompose its individual instructions into a numbered list. Be as specific and concise as possible for each question. Ensure each question directly relates to the image and infer the connection if it is not explicitly stated. |
1119 | 1125 |
|
1120 | 1126 | For example, if the prompt is:
|
1121 | 1127 |
|
1122 |
| -**Provide a list of all the following attributes: ingredients, type of cuisine, vegetarian or not, in JSON format** |
| 1128 | +"Provide a list of all the following attributes: ingredients, type of cuisine, vegetarian or not, in JSON format" |
1123 | 1129 |
|
1124 | 1130 | Then you will return:
|
1125 | 1131 |
|
|
1128 | 1134 | [[Description of image]]
|
1129 | 1135 | The image shows a skillet filled with cooked food. There are four chicken breasts arranged inside the skillet sitting in a creamy pale sauce. Between the chicken lie pieces of green asparagus. Slices of lemon are also interspersed within the skillet. The skillet itself appears to be a dark color, possibly cast iron, and has a teal handle. The background has a mottled grey texture.
|
1130 | 1136 | [[Questions]]
|
1131 |
| - 1. Does the response correctly determine all of the ingredients in the image? |
1132 |
| - 2. Does the response correctly state the type of cuisine seen in the image? |
1133 |
| - 3. Does the response correctly judge whether or not the displayed cuisine is vegetarian? |
1134 |
| - 4. Does the response correctly display the above three properties as a properly formatted JSON list? |
| 1137 | +1. Determine all of the ingredients seen in the image |
| 1138 | +2. Determine the type of cuisine seen in the image |
| 1139 | +3. Determine if the displayed cuisine is vegetarian or not |
| 1140 | +4. Display the above three properties as a JSON list |
| 1141 | +
|
1135 | 1142 | ---
|
1136 | 1143 |
|
1137 |
| -When you are finished, REVIEW the image, the prompt, and your rubric and determine if 1. your description of the image is correct and 2. every instruction contained in the prompt is fully covered by your rubric and is relevant to the image. If not, correct your mistakes and output a revised answer in addition to the previous answer. Increment the iter field by 1 each time. Do not exceed 3 iterations in total. |
| 1144 | +# Recursive Self-Refinement |
| 1145 | +
|
| 1146 | +When you are finished, REVIEW the image, the prompt, and your rubric and determine if 1. your description of the image is correct and 2. every instruction contained in the prompt is fully covered by your rubric and is relevant to the image. If not, correct your mistakes and output a revised answer in addition to the previous answer. Increment the "iter" field by 1 each time. Do not exceed 5 iterations in total. |
1138 | 1147 | Repeat the above process until you are satisfied your description of the image is accurate and your rubric fully covers and accurately represents the original prompt instructions, or if there is no significant difference between your last answer and its preceding answer. Append each revised answer below the previous answer at each iteration.
|
1139 |
| -When you are confident your answer is correct or when max iterations are reached, output [[FINAL ANSWER]] and repeat your final answer at the very bottom. Example: |
| 1148 | +When you are confident your answer is correct or when max iterations are reached, output [[FINAL ANSWER]] and repeat your final answer after all your iterations. Example: |
1140 | 1149 |
|
1141 | 1150 | ---
|
1142 | 1151 | [[FINAL ANSWER]]
|
1143 | 1152 | [[Description of image]]
|
1144 | 1153 | The image is a close-up, overhead shot of a black skillet with a teal handle filled with cooked food. The main elements are four, cooked chicken breasts which are browned and drizzled with a creamy white sauce. These breasts are resting in a light yellow, creamy sauce. Green asparagus spears and slices of lemon are interspersed and arranged around the chicken. The entire skillet is sitting on a textured grey surface.
|
1145 | 1154 | [[Questions]]
|
1146 |
| - 1. Does the response correctly determine all of the ingredients in the image? |
1147 |
| - 2. Does the response correctly state the type of cuisine seen in the image? |
1148 |
| - 3. Does the response correctly judge whether or not the displayed cuisine is vegetarian? |
1149 |
| - 4. Does the response correctly display the above three properties as a properly formatted JSON list? |
| 1155 | +1. Determine all of the ingredients of the entree seen in the image |
| 1156 | +2. Determine the type of cuisine seen in the image |
| 1157 | +3. Determine if the displayed cuisine is vegetarian or not |
| 1158 | +4. Display the above three properties as a JSON list |
1150 | 1159 | ---
|
1151 | 1160 |
|
| 1161 | +# JSON return format |
| 1162 | +
|
1152 | 1163 | Finally, translate the description and questions of your final answer into JSON format according to this schema:
|
1153 | 1164 |
|
1154 | 1165 | ```json
|
|
1204 | 1215 | # User Inputs, AI-generated Response, and Rubrics
|
1205 | 1216 | ## User Inputs
|
1206 | 1217 | ### Image
|
1207 |
| -<MM_IMAGE> |
1208 |
| -{image} |
1209 |
| -</MM_IMAGE> |
| 1218 | +<MM_IMAGE>{image}</MM_IMAGE> |
1210 | 1219 |
|
1211 | 1220 | ### Prompt
|
1212 | 1221 | {prompt}
|
|
1220 | 1229 | REMEMBER: Your answer will help improve the AI model. It is important to answer the question correctly. Even answering "no" will improve the model!
|
1221 | 1230 |
|
1222 | 1231 | Evaluation:
|
| 1232 | +
|
1223 | 1233 | <question>
|
1224 | 1234 | """
|
1225 | 1235 | PAIRWISE_MULTIMODAL_UNDERSTANDING_RUBRIC_CRITIQUE_TEMPLATE = """# Instructions:
|
1226 | 1236 |
|
1227 |
| -Your task is to evaluate the image understanding quality of responses generated by two AI models. At the bottom of this system instruction you will be presented with an image, a text description of that image, a user prompt, and the responses of Model A and Model B to that user prompt. You will also be provided a rubric as a numbered list against which Response A and Response B will be judged. Each rubricv question is a list of instructions that each response must follow in order to satisfy the user prompt. |
| 1237 | +Your task is to evaluate the image understanding quality of responses generated by two AI models. You will be presented with an image, a text description of that image, a user prompt, and the responses of Model A and Model B to that user prompt. You will also be provided a rubric against which Response A and Response B will be judged. The rubric is a list of questions that each response must follow in order to satisfy the user prompt. |
1228 | 1238 |
|
1229 | 1239 | # Rubric Scoring:
|
1230 | 1240 |
|
1231 |
| -For each response, rephrase every rubric point as a question and answer [[YES]] or [[NO]] to each point. Then, display the rubric grade as the sum of the correct rubric points over the total number of points. Finally, score the response on a scale of 1 to 5 stars based on how enjoyable you think it is for a human to read and understand and state your reasoning. |
| 1241 | +For each response, rephrase every rubric point as a question and answer [[YES]] or [[NO]] to each point. Then, display the rubric grade as the sum of the correct rubric points over the total number of points. Then, write a paragraph analyzing how enjoyable this response would be to read for a human, taking into account factors like grammar, tone, relevance, and ease of comprehension. Finally, score this response on a scale of 1 to 5 stars based on how enjoyable you think it is for a human to read and understand. |
1232 | 1242 |
|
1233 | 1243 | For example, if the rubric questions are:
|
1234 | 1244 | [[Rubric]]
|
1235 |
| -<question>Does the response correctly determine all of the ingredients in the image? |
1236 |
| -<question>Does the response correctly state the type of cuisine seen in the image? |
1237 |
| -<question>Does the response correctly judge whether or not the displayed cuisine is vegetarian? |
1238 |
| -<question>Does the response correctly display the above three properties as a properly formatted JSON list? |
| 1245 | +<question>Determine all of the ingredients seen in the image. |
| 1246 | +<question>Determine the type of cuisine seen in the image. |
| 1247 | +<question>Determine if the displayed cuisine is vegetarian or not |
| 1248 | +<question>Display the above three properties as a JSON list |
| 1249 | +
|
1239 | 1250 |
|
1240 | 1251 | Then you will score Response A as:
|
1241 | 1252 |
|
1242 | 1253 | [[Response A Answers:]]
|
1243 | 1254 | <question>
|
1244 |
| -Question: Does the response correctly determine all of the ingredients in the image? |
| 1255 | +Question: Does the Response A correctly determine all of the ingredients in the image? |
1245 | 1256 | Verdict: [[YES]]
|
1246 | 1257 | </question>
|
1247 | 1258 | <question>
|
1248 |
| -Question: Does the response correctly state the type of cuisine seen in the image? |
| 1259 | +Question: Does the Response A correctly state the type of cuisine seen in the image? |
1249 | 1260 | Verdict: [[NO]]
|
1250 | 1261 | </question>
|
1251 | 1262 | <question>
|
1252 |
| -Question: Does the response correctly judge whether or not the displayed cuisine is vegetarian? |
| 1263 | +Question: Does the Response A correctly judge whether or not the displayed cuisine is vegetarian? |
1253 | 1264 | Verdict: [[YES]]
|
1254 | 1265 | </question>
|
1255 | 1266 | <question>
|
1256 |
| -Question: Does the response correctly display the above three properties as a properly formatted JSON list? |
| 1267 | +Question: Does the Response A correctly display the above three properties as a properly formatted JSON list? |
1257 | 1268 | Verdict: [[NO]]
|
1258 | 1269 | </question>
|
1259 | 1270 |
|
1260 | 1271 | [[Rubric Score: 2/4]]
|
1261 |
| -[[Human Enjoyment Rating: 4 stars]] |
1262 | 1272 | [[Human Rating Reason: This response is accurate and has no grammatical errors but feels too verbose and formal.]]
|
| 1273 | +[[Human Enjoyment Rating: 4 stars]] |
1263 | 1274 |
|
1264 | 1275 | Repeat the above for Response B.
|
1265 | 1276 |
|
|
0 commit comments