Spaces:
Running
Running
Update prompts.py
Browse files- prompts.py +66 -3
prompts.py
CHANGED
@@ -33,9 +33,9 @@ Score 5: The model consistently offers highly relevant and useful responses that
|
|
33 |
|
34 |
# Fixed suffix that will always be appended
|
35 |
FIXED_EVAL_SUFFIX = """
|
36 |
-
[User Query]: {{
|
37 |
|
38 |
-
[AI Response]: {{
|
39 |
|
40 |
# Define the Prometheus prompt used by default (without reference)
|
41 |
PROMETHEUS_PROMPT = """###Task Description:
|
@@ -91,4 +91,67 @@ Score 5: {score5_desc}
|
|
91 |
"""
|
92 |
|
93 |
# Judge system prompt for non-Prometheus models
|
94 |
-
JUDGE_SYSTEM_PROMPT = """Please act as an impartial judge and evaluate based on the user's instruction. Your output format should strictly adhere to JSON as follows: {"feedback": "<write feedback>", "result": <numerical score>}. Ensure the output is valid JSON, without additional formatting or explanations."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
# Fixed suffix that will always be appended
|
35 |
FIXED_EVAL_SUFFIX = """
|
36 |
+
[User Query]: {{human_input}}
|
37 |
|
38 |
+
[AI Response]: {{ai_response}}"""
|
39 |
|
40 |
# Define the Prometheus prompt used by default (without reference)
|
41 |
PROMETHEUS_PROMPT = """###Task Description:
|
|
|
91 |
"""
|
92 |
|
93 |
# Judge system prompt for non-Prometheus models
|
94 |
+
JUDGE_SYSTEM_PROMPT = """Please act as an impartial judge and evaluate based on the user's instruction. Your output format should strictly adhere to JSON as follows: {"feedback": "<write feedback>", "result": <numerical score>}. Ensure the output is valid JSON, without additional formatting or explanations."""
|
95 |
+
|
96 |
+
ATLA_PROMPT = """<|begin_of_text|><|start_header_id|>user<|end_header_id|> You are tasked with evaluating a response based on a given instruction (which may contain an Input) and a scoring rubric that serve as the evaluation standard. Provide a comprehensive feedback on the response quality strictly adhering to the scoring rubric, without any general evaluation. Follow this with a score between 1 and 5, referring to the scoring rubric. Avoid generating any additional opening, closing, or explanations.
|
97 |
+
Here are some rules of the evaluation:
|
98 |
+
(1) You should prioritize evaluating whether the response satisfies the provided rubric. The basis of your score should depend exactly on the rubric. However, the response does not need to explicitly address points raised in the rubric. Rather, evaluate the response based on the criteria outlined in the rubric.
|
99 |
+
|
100 |
+
Your reply should strictly follow this format:
|
101 |
+
**Reasoning:** <Your feedback>
|
102 |
+
|
103 |
+
**Result:** <an integer between 1 and 5>
|
104 |
+
|
105 |
+
Here is the data:
|
106 |
+
|
107 |
+
Instruction:
|
108 |
+
```
|
109 |
+
{human_input}
|
110 |
+
```
|
111 |
+
|
112 |
+
Response:
|
113 |
+
```
|
114 |
+
{ai_response}
|
115 |
+
```
|
116 |
+
|
117 |
+
Score Rubrics:
|
118 |
+
[{eval_criteria}]
|
119 |
+
Score 1: {score1_desc}
|
120 |
+
Score 2: {score2_desc}
|
121 |
+
Score 3: {score3_desc}
|
122 |
+
Score 4: {score4_desc}
|
123 |
+
Score 5: {score5_desc}
|
124 |
+
<|eot_id|><|start_header_id|>assistant<|end_header_id|>"""
|
125 |
+
|
126 |
+
ATLA_PROMPT_WITH_REFERENCE = """You are tasked with evaluating a response based on a given instruction (which may contain an Input) and a scoring rubric and reference answer that serve as the evaluation standard. Provide a comprehensive feedback on the response quality strictly adhering to the scoring rubric, without any general evaluation. Follow this with a score between 1 and 5, referring to the scoring rubric. Avoid generating any additional opening, closing, or explanations.
|
127 |
+
|
128 |
+
Here are some rules of the evaluation:
|
129 |
+
(1) You should prioritize evaluating whether the response satisfies the provided rubric. The basis of your score should depend exactly on the rubric. However, the response does not need to explicitly address points raised in the rubric. Rather, evaluate the response based on the criteria outlined in the rubric.
|
130 |
+
|
131 |
+
Your reply should strictly follow this format:
|
132 |
+
**Reasoning:** <Your feedback>
|
133 |
+
|
134 |
+
**Result:** <an integer between 1 and 5>
|
135 |
+
|
136 |
+
Here is the data:
|
137 |
+
|
138 |
+
Instruction:
|
139 |
+
```
|
140 |
+
{human_input}
|
141 |
+
```
|
142 |
+
|
143 |
+
Response:
|
144 |
+
```
|
145 |
+
{ai_response}
|
146 |
+
```
|
147 |
+
|
148 |
+
Score Rubrics:
|
149 |
+
[{eval_criteria}]
|
150 |
+
Score 1: {score1_desc}
|
151 |
+
Score 2: {score2_desc}
|
152 |
+
Score 3: {score3_desc}
|
153 |
+
Score 4: {score4_desc}
|
154 |
+
Score 5: {score5_desc}
|
155 |
+
|
156 |
+
Reference answer:
|
157 |
+
{ground_truth_input}"""
|