Update research_agent.py
Browse files- research_agent.py +12 -14
research_agent.py
CHANGED
|
@@ -39,14 +39,14 @@ class ResearchAgent(BaseAgent):
|
|
| 39 |
Provide a concise, accurate answer based only on the provided information.
|
| 40 |
You must provide only the exact answer requested by the user, in the correct type and minimal format, based purely on the provided information.
|
| 41 |
|
| 42 |
-
|
| 43 |
-
- If the question asks for a name, output only the name (as plain text).
|
| 44 |
-
- If the question asks for a list, output only the list items (one per line, no explanations).
|
| 45 |
-
- If you cannot find the answer based on the provided information, reply only with "Unknown".
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
"""
|
| 51 |
|
| 52 |
user_prompt = f"""
|
|
@@ -69,14 +69,12 @@ class ResearchAgent(BaseAgent):
|
|
| 69 |
|
| 70 |
You must provide only the exact answer requested by the user, in the correct type and minimal format, based purely on the provided information.
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
Output must be a single line, without punctuation or extra whitespace.
|
| 80 |
"""
|
| 81 |
final_answer = self.llm_call(system_prompt, question, temperature=0.0)
|
| 82 |
|
|
|
|
| 39 |
Provide a concise, accurate answer based only on the provided information.
|
| 40 |
You must provide only the exact answer requested by the user, in the correct type and minimal format, based purely on the provided information.
|
| 41 |
|
| 42 |
+
Finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 45 |
+
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.
|
| 46 |
+
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.
|
| 47 |
+
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.
|
| 48 |
|
| 49 |
+
If you cannot find the answer based on the provided information, reply only with "Unknown".
|
| 50 |
"""
|
| 51 |
|
| 52 |
user_prompt = f"""
|
|
|
|
| 69 |
|
| 70 |
You must provide only the exact answer requested by the user, in the correct type and minimal format, based purely on the provided information.
|
| 71 |
|
| 72 |
+
Finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 73 |
+
|
| 74 |
+
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 75 |
+
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.
|
| 76 |
+
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.
|
| 77 |
+
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.
|
|
|
|
|
|
|
| 78 |
"""
|
| 79 |
final_answer = self.llm_call(system_prompt, question, temperature=0.0)
|
| 80 |
|