Upload prompt template grounding_json_alt.yaml
Browse files- grounding_json_alt.yaml +40 -0
grounding_json_alt.yaml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
prompt:
|
2 |
+
template: "You are a helpful and harmless AI assistant. You will be provided with a textual context and a model-generated
|
3 |
+
response.\nYour task is to analyze the response sentence by sentence and classify each sentence according to its relationship
|
4 |
+
with the provided context.\n\n**Instructions:**\n\n1. **Decompose the response into individual sentences.**\n2. **For
|
5 |
+
each sentence, assign one of the following labels:**\n * **`supported`**: The sentence is entailed by the given context.\
|
6 |
+
\ Provide a supporting excerpt from the context.\n * **`unsupported`**: The sentence is not entailed by the given
|
7 |
+
context. Provide an excerpt that is close but does not fully support the sentence.\n * **`contradictory`**: The sentence
|
8 |
+
is falsified by the given context. Provide a contradicting excerpt from the context.\n * **`no_rad`**: The sentence
|
9 |
+
does not require factual attribution (e.g., opinions, greetings, questions, disclaimers). No excerpt is needed for this
|
10 |
+
label.\n\n3. **For each label, provide a short rationale explaining your decision.** The rationale should be separate
|
11 |
+
from the excerpt.\n\n**Input Format:**\n\nThe input will consist of two parts, clearly separated:\n\n* **Context:** The
|
12 |
+
textual context used to generate the response.\n* **Response:** The model-generated response to be analyzed.\n\n**Output
|
13 |
+
Format:**\n\nFor each sentence in the response, output a JSON object with the following fields:\n\n* `\"sentence\"`: The
|
14 |
+
sentence being analyzed.\n* `\"label\"`: One of `supported`, `unsupported`, `contradictory`, or `no_rad`.\n* `\"rationale\"\
|
15 |
+
`: A brief explanation for the assigned label.\n* `\"excerpt\"`: A relevant excerpt from the context. Only required for
|
16 |
+
`supported`, `unsupported`, and `contradictory` labels.\n\nOutput each JSON object on a new line.\n\n**Example:**\n\n
|
17 |
+
**Input:**\n\n```\nContext: Apples are red fruits. Bananas are yellow fruits.\n\nResponse: Apples are red. Bananas are
|
18 |
+
green. Enjoy your fruit!\n```\n\n**Output:**\n\n{\"sentence\": \"Apples are red.\", \"label\": \"supported\", \"rationale\"\
|
19 |
+
: \"The context explicitly states that apples are red.\", \"excerpt\": \"Apples are red fruits.\"}\n{\"sentence\": \"
|
20 |
+
Bananas are green.\", \"label\": \"contradictory\", \"rationale\": \"The context states that bananas are yellow, not green.\"\
|
21 |
+
, \"excerpt\": \"Bananas are yellow fruits.\"}\n{\"sentence\": \"Enjoy your fruit!\", \"label\": \"no_rad\", \"rationale\"\
|
22 |
+
: \"This is a general expression and does not require factual attribution.\", \"excerpt\": null}\n\n**Now, please analyze
|
23 |
+
the following context and response:**\n\n**User Query:**\n{{user_request}}\n\n**Context:**\n{{context_document}}\n\n**Response:**\n\
|
24 |
+
{{response}}"
|
25 |
+
template_variables:
|
26 |
+
- user_request
|
27 |
+
- context_document
|
28 |
+
- response
|
29 |
+
metadata:
|
30 |
+
description: "An evaluation prompt from the paper 'The FACTS Grounding Leaderboard: Benchmarking LLMs’ Ability to Ground
|
31 |
+
Responses to Long-Form Input' by Google DeepMind.\n The prompt was copied from the evaluation_prompts.csv file from
|
32 |
+
Kaggle.\n This specific prompt elicits an NLI-style sentence-by-sentence checker outputting JSON for each sentence."
|
33 |
+
evaluation_method: json_alt
|
34 |
+
tags:
|
35 |
+
- fact-checking
|
36 |
+
version: 1.0.0
|
37 |
+
author: Google DeepMind
|
38 |
+
source: https://www.kaggle.com/datasets/deepmind/FACTS-grounding-examples?resource=download&select=evaluation_prompts.csv
|
39 |
+
client_parameters: {}
|
40 |
+
custom_data: {}
|