Spaces:
Sleeping
Sleeping
ping98k
commited on
Commit
·
46c7455
1
Parent(s):
295a884
Update tournament_utils.py
Browse files- tournament_utils.py +8 -8
tournament_utils.py
CHANGED
|
@@ -68,16 +68,16 @@ def prompt_score(
|
|
| 68 |
prompt = f"""Evaluate the output below on the following criteria:
|
| 69 |
{criteria_block}
|
| 70 |
|
| 71 |
-
{'Provide detailed reasons in English.' if explain else 'Provide a short reason.'}
|
| 72 |
"""
|
| 73 |
|
| 74 |
if explain:
|
| 75 |
-
prompt += "
|
| 76 |
-
|
| 77 |
-
|
|
|
|
| 78 |
else:
|
| 79 |
prompt += "Respond in plain text exactly like:\n" \
|
| 80 |
-
f"Final verdict: [{example_scores}]"
|
| 81 |
|
| 82 |
if include_instruction:
|
| 83 |
prompt += f"\n\nInstruction:\n{instruction}"
|
|
@@ -115,14 +115,14 @@ def prompt_pairwise(
|
|
| 115 |
prompt = f"""Compare the two players below using:
|
| 116 |
{criteria_block}
|
| 117 |
|
| 118 |
-
{'Provide detailed reasons in English.' if explain else 'Provide a short reason.'}
|
| 119 |
"""
|
| 120 |
|
| 121 |
verdict_example = "Final verdict: A or Final verdict: B"
|
| 122 |
if explain:
|
| 123 |
prompt += (
|
| 124 |
-
"
|
| 125 |
-
"
|
|
|
|
| 126 |
f"{verdict_example}"
|
| 127 |
)
|
| 128 |
else:
|
|
|
|
| 68 |
prompt = f"""Evaluate the output below on the following criteria:
|
| 69 |
{criteria_block}
|
| 70 |
|
|
|
|
| 71 |
"""
|
| 72 |
|
| 73 |
if explain:
|
| 74 |
+
prompt += "Provide detailed reasons in English.\n"\
|
| 75 |
+
"Respond in plain text with two sections in following format:\n" \
|
| 76 |
+
"Reasons:\n<explain your reasoning in each criteria before write final score>\n\n\n" \
|
| 77 |
+
f"Final verdict: <list of each criteria score> (e.g. [{example_scores}])"
|
| 78 |
else:
|
| 79 |
prompt += "Respond in plain text exactly like:\n" \
|
| 80 |
+
f"Final verdict: <list of each criteria score> (e.g. [{example_scores}])"
|
| 81 |
|
| 82 |
if include_instruction:
|
| 83 |
prompt += f"\n\nInstruction:\n{instruction}"
|
|
|
|
| 115 |
prompt = f"""Compare the two players below using:
|
| 116 |
{criteria_block}
|
| 117 |
|
|
|
|
| 118 |
"""
|
| 119 |
|
| 120 |
verdict_example = "Final verdict: A or Final verdict: B"
|
| 121 |
if explain:
|
| 122 |
prompt += (
|
| 123 |
+
"Provide detailed reasons in English.\n" \
|
| 124 |
+
"Respond in plain text with two sections in following format:\n"
|
| 125 |
+
"Reasons:\n<explain your reasoning in each criteria before write final verdict>\n\n\n"
|
| 126 |
f"{verdict_example}"
|
| 127 |
)
|
| 128 |
else:
|