Skip to content

Commit

Permalink
Add WMT instructions suffix to output_format_instructions run expander (
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanmai authored Aug 27, 2024
1 parent 6c8ebd5 commit 7b6452d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/helm/benchmark/run_expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,17 @@ def expand(self, run_spec: RunSpec) -> List[RunSpec]:
instructions = "Answer with the English translation."
elif self.scenario == "wmt_14_only_last_sentence":
instructions = "Answer with only the English translation for the last sentence."
elif self.scenario == "wmt_14_only_last_sentence_suffix":
instructions = "Answer with only the English translation for the last sentence."
return [
replace(
run_spec,
adapter_spec=replace(
run_spec.adapter_spec,
global_suffix=f"{run_spec.adapter_spec.global_suffix}\n\n{instructions}",
),
),
]
elif self.scenario == "math":
instructions = "Wrap the final answer with the \\boxed{} command."
elif self.scenario == "numeric_nlg":
Expand Down

0 comments on commit 7b6452d

Please sign in to comment.