Update README.md
Browse files
README.md
CHANGED
|
@@ -68,7 +68,49 @@ Title: {document_title}
|
|
| 68 |
Question: {question}
|
| 69 |
Passage: {context_passage}
|
| 70 |
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
"""
|
| 73 |
|
| 74 |
# Model outputs structured explanations in JSON format
|
|
|
|
| 68 |
Question: {question}
|
| 69 |
Passage: {context_passage}
|
| 70 |
|
| 71 |
+
You are an expert at extracting answers and structured explanations from text.
|
| 72 |
+
Your response MUST be **valid JSON only** (no extra commentary).
|
| 73 |
+
|
| 74 |
+
Task
|
| 75 |
+
====
|
| 76 |
+
Given:
|
| 77 |
+
• a **title** for the passage,
|
| 78 |
+
• a **question** about the passage, and
|
| 79 |
+
• the **context passage** itself,
|
| 80 |
+
|
| 81 |
+
produce an explanation object with three parts:
|
| 82 |
+
|
| 83 |
+
1. "answer" – the **shortest span** from the passage that fully answers the question.
|
| 84 |
+
2. "selected_sentence" – the **single sentence** in the passage that entails or implies the answer.
|
| 85 |
+
3. "referential_equalities" – a list of mappings between phrases in the question and phrases in the selected sentence
|
| 86 |
+
that refer to the **same real-world entity/event**.
|
| 87 |
+
|
| 88 |
+
• Each mapping has two keys:
|
| 89 |
+
- "question_reference": the exact phrase from the question (**must be a contiguous substring from the question,
|
| 90 |
+
not from the context or title**).
|
| 91 |
+
- "sentence_reference": the exact phrase from the selected sentence (**must be a contiguous substring from the selected sentence,
|
| 92 |
+
not from the question or title**), or "" (empty string if the entire sentence is the referent).
|
| 93 |
+
|
| 94 |
+
▸ Use **""** for "sentence_reference" when the entity/event is not named by any specific phrase in the sentence –
|
| 95 |
+
i.e. the entire sentence acts as the referent (a *bridge* to the whole sentence).
|
| 96 |
+
This corresponds to the (start = end = -1) convention in the QED dataset.
|
| 97 |
+
|
| 98 |
+
Output format
|
| 99 |
+
=============
|
| 100 |
+
Return **only** JSON in this exact schema:
|
| 101 |
+
|
| 102 |
+
{
|
| 103 |
+
"answer": "<string from passage>",
|
| 104 |
+
"selected_sentence": "<string from passage>",
|
| 105 |
+
"referential_equalities": [
|
| 106 |
+
{
|
| 107 |
+
"question_reference": "<string from question only>",
|
| 108 |
+
"sentence_reference": "<string from selected_sentence only, or "">",
|
| 109 |
+
"bridge": "<false if not a bridge; otherwise, a string explaining the bridge connection, e.g., 'in', 'for', 'of', 'at', 'on'>"
|
| 110 |
+
}
|
| 111 |
+
...
|
| 112 |
+
]
|
| 113 |
+
}
|
| 114 |
"""
|
| 115 |
|
| 116 |
# Model outputs structured explanations in JSON format
|