Update util.py
Browse files
util.py
CHANGED
|
@@ -17,11 +17,12 @@ def get_questions():
|
|
| 17 |
|
| 18 |
def get_final_answer(question, initial_answer):
|
| 19 |
prompt_template = """
|
| 20 |
-
You are an expert
|
| 21 |
Your final answer must be a number and/or string OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 22 |
If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
|
| 23 |
If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
|
| 24 |
If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
|
|
|
| 25 |
|
| 26 |
**Question:** """ + question + """
|
| 27 |
|
|
|
|
| 17 |
|
| 18 |
def get_final_answer(question, initial_answer):
|
| 19 |
prompt_template = """
|
| 20 |
+
You are an expert question answering assistant. Given a question and an initial answer, your task is to provide the final answer.
|
| 21 |
Your final answer must be a number and/or string OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 22 |
If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
|
| 23 |
If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
|
| 24 |
If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
| 25 |
+
If the final answer is a single word, start the word with an uppercase letter.
|
| 26 |
|
| 27 |
**Question:** """ + question + """
|
| 28 |
|