Views
No views yet
| Metric | Base Model (Zero-shot) | Fine-tuned Model | Improvement |
|---|---|---|---|
| Exact Match Accuracy | 0.9% | 11.8% | +10.9% |
| Answer Accuracy | 82.0% | 86.4% | +4.4% |
| All Mention F1 | 5.5% | 38.4% | +32.9% |
| Question Mention F1 | 6.0% | 47.6% | +41.6% |
| Context Mention F1 | 5.0% | 29.2% | +24.2% |
1# Input format
2prompt = """
3Title: [Document Title]
4Question: [Your Question]
5Passage: [Context Passage]
6
7You are an expert at extracting answers and structured explanations from text.
8Your response MUST be **valid JSON only** (no extra commentary).
9
10Task
11====
12Given:
13• a **title** for the passage,
14• a **question** about the passage, and
15• the **context passage** itself,
16
17produce an explanation object with three parts:
18
191. "answer" – the **shortest span** from the passage that fully answers the question.
202. "selected_sentence" – the **single sentence** in the passage that entails or implies the answer.
213. "referential_equalities" – a list of mappings between phrases in the question and phrases in the selected sentence
22 that refer to the **same real-world entity/event**.
23
24 • Each mapping has two keys:
25 - "question_reference": the exact phrase from the question (**must be a contiguous substring from the question,
26 not from the context or title**).
27 - "sentence_reference": the exact phrase from the selected sentence (**must be a contiguous substring from the selected sentence,
28 not from the question or title**), or "" (empty string if the entire sentence is the referent).
29
30 ▸ Use **""** for "sentence_reference" when the entity/event is not named by any specific phrase in the sentence –
31 i.e. the entire sentence acts as the referent (a *bridge* to the whole sentence).
32 This corresponds to the (start = end = -1) convention in the QED dataset.
33
34Output format
35=============
36Return **only** JSON in this exact schema:
37
38{
39 "answer": "<string from passage>",
40 "selected_sentence": "<string from passage>",
41 "referential_equalities": [
42 {
43 "question_reference": "<string from question only>",
44 "sentence_reference": "<string from selected_sentence only, or "">",
45 "bridge": "<false if not a bridge; otherwise, a string explaining the bridge connection, e.g., 'in', 'for', 'of', 'at', 'on'>"
46 }
47 ...
48 ]
49}
50"""
51
52# Expected output format
53{
54 "answer": "<shortest span from passage>",
55 "selected_sentence": "<sentence that entails the answer>",
56 "referential_equalities": [
57 {
58 "question_reference": "<entity from question>",
59 "sentence_reference": "<corresponding entity from sentence>",
60 "bridge": false
61 }
62 ]
63}1@article{lamm2020qed,
2 title={QED: A Framework and Dataset for Explanations in Question Answering},
3 author={Lamm, Matthew and Palomaki, Jennimaria and Alberti, Chris and Andor, Daniel and Chen, Eunsol and Devlin, Jacob and Michael, Julian},
4 journal={arXiv preprint arXiv:2010.13806},
5 year={2020}
6}