File size: 12,851 Bytes
98f8c5f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
evaluation_method,evaluation_prompt
response_level,"Your task is to check if the Response is accurate to the Evidence.
Generate 'Accurate' if the Response is accurate when verified according to the Evidence, or 'Inaccurate' if the Response is inaccurate (contradicts the evidence) or cannot be verified.
**Query**:\n\n{{user_request}}\n\n**End of Query**\n
**Evidence**\n\n{{context_document}}\n\n**End of Evidence**\n
**Response**:\n\n{{response}}\n\n**End of Response**\n
Let's think step-by-step."
json_alt,"You are a helpful and harmless AI assistant. You will be provided with a textual context and a model-generated response.
Your task is to analyze the response sentence by sentence and classify each sentence according to its relationship with the provided context.
**Instructions:**
1. **Decompose the response into individual sentences.**
2. **For each sentence, assign one of the following labels:**
* **`supported`**: The sentence is entailed by the given context. Provide a supporting excerpt from the context.
* **`unsupported`**: The sentence is not entailed by the given context. Provide an excerpt that is close but does not fully support the sentence.
* **`contradictory`**: The sentence is falsified by the given context. Provide a contradicting excerpt from the context.
* **`no_rad`**: The sentence does not require factual attribution (e.g., opinions, greetings, questions, disclaimers). No excerpt is needed for this label.
3. **For each label, provide a short rationale explaining your decision.** The rationale should be separate from the excerpt.
**Input Format:**
The input will consist of two parts, clearly separated:
* **Context:** The textual context used to generate the response.
* **Response:** The model-generated response to be analyzed.
**Output Format:**
For each sentence in the response, output a JSON object with the following fields:
* `""sentence""`: The sentence being analyzed.
* `""label""`: One of `supported`, `unsupported`, `contradictory`, or `no_rad`.
* `""rationale""`: A brief explanation for the assigned label.
* `""excerpt""`: A relevant excerpt from the context. Only required for `supported`, `unsupported`, and `contradictory` labels.
Output each JSON object on a new line.
**Example:**
**Input:**
```
Context: Apples are red fruits. Bananas are yellow fruits.
Response: Apples are red. Bananas are green. Enjoy your fruit!
```
**Output:**
{""sentence"": ""Apples are red."", ""label"": ""supported"", ""rationale"": ""The context explicitly states that apples are red."", ""excerpt"": ""Apples are red fruits.""}
{""sentence"": ""Bananas are green."", ""label"": ""contradictory"", ""rationale"": ""The context states that bananas are yellow, not green."", ""excerpt"": ""Bananas are yellow fruits.""}
{""sentence"": ""Enjoy your fruit!"", ""label"": ""no_rad"", ""rationale"": ""This is a general expression and does not require factual attribution."", ""excerpt"": null}
**Now, please analyze the following context and response:**
**User Query:**
{{user_request}}
**Context:**
{{context_document}}
**Response:**
{{response}}"
json,"You are a helpful and harmless AI assistant. You will be provided with a textual context and a model-generated response.
Your task is to analyze the response sentence by sentence and classify each sentence according to its relationship with the provided context.
**Instructions:**
1. **Decompose the response into individual sentences.**
2. **For each sentence, assign one of the following labels:**
* **`supported`**: The sentence is entailed by the given context. Provide a supporting excerpt from the context. The supporting except must *fully* entail the sentence. If you need to cite multiple supporting excepts, simply concatenate them.
* **`unsupported`**: The sentence is not entailed by the given context. No excerpt is needed for this label.
* **`contradictory`**: The sentence is falsified by the given context. Provide a contradicting excerpt from the context.
* **`no_rad`**: The sentence does not require factual attribution (e.g., opinions, greetings, questions, disclaimers). No excerpt is needed for this label.
3. **For each label, provide a short rationale explaining your decision.** The rationale should be separate from the excerpt.
4. **Be very strict with your `supported` and `contradictory` decisions.** Unless you can find straightforward, indisputable evidence excerpts *in the context* that a sentence is `supported` or `contradictory`, consider it `unsupported`. You should not employ world knowledge unless it is truly trivial.
**Input Format:**
The input will consist of two parts, clearly separated:
* **Context:** The textual context used to generate the response.
* **Response:** The model-generated response to be analyzed.
**Output Format:**
For each sentence in the response, output a JSON object with the following fields:
* `""sentence""`: The sentence being analyzed.
* `""label""`: One of `supported`, `unsupported`, `contradictory`, or `no_rad`.
* `""rationale""`: A brief explanation for the assigned label.
* `""excerpt""`: A relevant excerpt from the context. Only required for `supported` and `contradictory` labels.
Output each JSON object on a new line.
**Example:**
**Input:**
```
Context: Apples are red fruits. Bananas are yellow fruits.
Response: Apples are red. Bananas are green. Bananas are cheaper than apples. Enjoy your fruit!
```
**Output:**
{""sentence"": ""Apples are red."", ""label"": ""supported"", ""rationale"": ""The context explicitly states that apples are red."", ""excerpt"": ""Apples are red fruits.""}
{""sentence"": ""Bananas are green."", ""label"": ""contradictory"", ""rationale"": ""The context states that bananas are yellow, not green."", ""excerpt"": ""Bananas are yellow fruits.""}
{""sentence"": ""Bananas are cheaper than apples."", ""label"": ""unsupported"", ""rationale"": ""The context does not mention the price of bananas or apples."", ""excerpt"": null}
{""sentence"": ""Enjoy your fruit!"", ""label"": ""no_rad"", ""rationale"": ""This is a general expression and does not require factual attribution."", ""excerpt"": null}
**Now, please analyze the following context and response:**
**User Query:**
{{user_request}}
**Context:**
{{context_document}}
**Response:**
{{response}}"
json_with_double_check,"Your task is to verify whether a given sentence is entailed by a given context or not. Answer only in YES or NO without any additional text. Do not try to avoid answering, or apologize, or give any answer that isn't simply YES or NO.
**Sentence**
{{json_dict[""sentence""]}}
**Context**
{{json_dict[""excerpt""]}}"
span_level,"Your task is to check if a specific Span is accurate to the Evidence.
Generate 'Accurate' if the Span is accurate when verified according to the Evidence or when there is nothing to verify in the Span.
Generate 'Inaccurate' if the Span is inaccurate (contradicts the evidence), or cannot be verified.
**Query**:\n\n{{user_request}}\n\n**End of Query**\n
**Evidence**\n\n{{context_document}}\n\n**End of Evidence**\n
**Response**:\n\n{{response}}\n\n**End of Response**\n
You are currently verifying **Span {{ix+1}}** from the Response.
**Span {{ix+1}}**:\n\n{{span}}\n\n**End of Span {{ix+1}}**\n
Is Span {{ix+1}} accurate or inaccurate when verified according to the Evidence? Point to where in the evidence justifies your answer."
implicit_span_level,"Your task is to check if the Response is accurate to the Evidence.
Generate 'Accurate' if the Response is accurate when verified according to the Evidence, or 'Inaccurate' if the Response is inaccurate (contradicts the evidence) or cannot be verified.
**Query**:\n\n{{user_request}}\n\n**End of Query**\n
**Evidence**\n\n{{context_document}}\n\n**End of Evidence**\n
**Response**:\n\n{{response}}\n\n**End of Response**\n
Break down the Response into sentences and classify each one separately, then give the final answer: If even one of the sentences is inaccurate, then the Response is inaccurate.
For example, your output should be of this format:
Sentence 1: <Sentence 1>
Sentence 1 label: Accurate/Inaccurate (choose 1)
Sentence 2: <Sentence 2>
Sentence 2 label: Accurate/Inaccurate (choose 1)
Sentence 3: <Sentence 3>
Sentence 3 label: Accurate/Inaccurate (choose 1)
[...]
Final Answer: Accurate/Inaccurate (choose 1)"
ineligible_responses_filter_with_context,"Your mission is to judge the response from an AI model, the *test* response, calibrating your judgement using a *baseline* response.
Please use the following rubric criteria to judge the responses:
<START OF RUBRICS>
Your task is to analyze the test response based on the criterion of ""Instruction Following"". Start your analysis with ""Analysis"".
**Instruction Following**
Please first list the instructions in the user query.
In general, an instruction is VERY important if it is specifically asked for in the prompt and deviates from the norm. Please highlight such specific keywords.
You should also derive the task type from the user query and include the task-specific implied instructions.
Sometimes, no instruction is available in the user query.
It is your job to infer if the instruction is to autocomplete the user query or is asking the LLM for follow-ups.
After listing the instructions, you should rank them in order of importance.
After that, INDEPENDENTLY check if the test response and the baseline response meet each of the instructions.
You should itemize, for each instruction, whether the response meets, partially meets, or does not meet the requirement, using reasoning.
You should start reasoning first before reaching a conclusion about whether the response satisfies the requirement.
Citing examples while reasoning is preferred.
Reflect on your answer and consider the possibility that you are wrong.
If you are wrong, explain clearly what needs to be clarified, improved, or changed in the rubric criteria and guidelines.
In the end, express your final verdict as one of the following three json objects:
```json
{{
""Instruction Following"": ""No Issues""
}}
```
```json
{{
""Instruction Following"": ""Minor Issue(s)""
}}
```
```json
{{
""Instruction Following"": ""Major Issue(s)""
}}
```
<END OF RUBRICS>
# Your task
## User query
<|begin_of_query|>
{{full_prompt}}
<|end_of_query|>
## Test Response:
<|begin_of_test_response|>
{{response_a}}
<|end_of_test_response|>
## Baseline Response:
<|begin_of_baseline_response|>
{{response_b}}
<|end_of_baseline_response|>
Please write your analysis and final verdict for the test response."
ineligible_responses_filter_no_context,"Your mission is to judge the response from an AI model, the *test* response, calibrating your judgement using a *baseline* response.
Please use the following rubric criteria to judge the responses:
<START OF RUBRICS>
Your task is to analyze the test response based on the criterion of ""Instruction Following"". Start your analysis with ""Analysis"".
**Instruction Following**
Please first list the instructions in the user query.
In general, an instruction is VERY important if it is specifically asked for in the prompt and deviates from the norm. Please highlight such specific keywords.
You should also derive the task type from the user query and include the task-specific implied instructions.
Sometimes, no instruction is available in the user query.
It is your job to infer if the instruction is to autocomplete the user query or is asking the LLM for follow-ups.
After listing the instructions, you should rank them in order of importance.
After that, INDEPENDENTLY check if the test response and the baseline response meet each of the instructions.
You should itemize, for each instruction, whether the response meets, partially meets, or does not meet the requirement, using reasoning.
You should start reasoning first before reaching a conclusion about whether the response satisfies the requirement.
Citing examples while reasoning is preferred.
Reflect on your answer and consider the possibility that you are wrong.
If you are wrong, explain clearly what needs to be clarified, improved, or changed in the rubric criteria and guidelines.
In the end, express your final verdict as one of the following three json objects:
```json
{{
""Instruction Following"": ""No Issues""
}}
```
```json
{{
""Instruction Following"": ""Minor Issue(s)""
}}
```
```json
{{
""Instruction Following"": ""Major Issue(s)""
}}
```
<END OF RUBRICS>
# Your task
## User query
<|begin_of_query|>
{{user_request}}
<|end_of_query|>
## Test Response:
<|begin_of_test_response|>
{{response_a}}
<|end_of_test_response|>
## Baseline Response:
<|begin_of_baseline_response|>
{{response_b}}
<|end_of_baseline_response|>
Please write your analysis and final verdict for the test response." |