Skip to content

Commit

Permalink
Merge pull request stanfordnlp#869 from Vasilije1990/extend_hotpot_qa…
Browse files Browse the repository at this point in the history
…_with_context

feature(dsp) Add context to details
  • Loading branch information
arnavsinghvi11 authored May 31, 2024
2 parents 7a78cb5 + 8a882a7 commit 8e01bee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dspy/datasets/hotpotqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, *args, only_hard_examples=True, keep_details='dev_titles', un
for raw_example in hf_official_train:
if raw_example['level'] == 'hard':
if keep_details is True:
keys = ['id', 'question', 'answer', 'type', 'supporting_facts']
keys = ['id', 'question', 'answer', 'type', 'supporting_facts', 'context']
elif keep_details == 'dev_titles':
keys = ['question', 'answer', 'supporting_facts']
else:
Expand Down Expand Up @@ -81,4 +81,4 @@ def __init__(self, *args, only_hard_examples=True, keep_details='dev_titles', un
Both London and German have seen attacks during war, there was one specific type of attack that Germany called the blitz, what did London call a similar attack?
Pre-Madonna was a collection of demos by the singer who was a leading presence during the emergence of what network?
Alan Mills composed the classic folk song that tells the story of what?
"""
"""

0 comments on commit 8e01bee

Please sign in to comment.