Spaces:
Runtime error
Runtime error
Refactor `GaiaWorkflow` to use `Context` for state management, add `PlanEvent` class, and enhance prompt handling in `agent.py`.
Browse files
src/gaia_solving_agent/prompts.py
CHANGED
|
@@ -23,29 +23,34 @@ Each sub-task should be concise and clear.
|
|
| 23 |
|
| 24 |
User query: "{{ user_request }}"
|
| 25 |
|
|
|
|
|
|
|
| 26 |
Respond with exactly:
|
| 27 |
'''
|
| 28 |
-
1. <Question> : xxxxxxx
|
| 29 |
-
2. <Known facts>:
|
| 30 |
- xxxxxxx
|
| 31 |
- xxxxxxx
|
| 32 |
-
|
|
|
|
| 33 |
{% if additional_file_extension|length -%}
|
| 34 |
-
- There is an additional
|
| 35 |
{%- endif %}
|
| 36 |
- xxxxxxx
|
| 37 |
- xxxxxxx
|
|
|
|
| 38 |
'''
|
| 39 |
"""
|
| 40 |
|
| 41 |
FORMAT_ANSWER = """
|
| 42 |
-
You are a
|
| 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),
|
| 47 |
-
|
| 48 |
-
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.
|
| 49 |
|
| 50 |
There is the question : {{ question }}
|
|
|
|
|
|
|
| 51 |
"""
|
|
|
|
| 23 |
|
| 24 |
User query: "{{ user_request }}"
|
| 25 |
|
| 26 |
+
Follow strictly this format and special patterns.
|
| 27 |
+
Replace only the xxxxxxx.
|
| 28 |
Respond with exactly:
|
| 29 |
'''
|
| 30 |
+
1. <Question> : xxxxxxx </Question>
|
| 31 |
+
2. <Known facts> :
|
| 32 |
- xxxxxxx
|
| 33 |
- xxxxxxx
|
| 34 |
+
</Known facts>
|
| 35 |
+
3. <Sub-tasks> :
|
| 36 |
{% if additional_file_extension|length -%}
|
| 37 |
+
- There is an additional {{ additional_file_extension }} file to analyse. You must analyse it to find out xxxxxxx
|
| 38 |
{%- endif %}
|
| 39 |
- xxxxxxx
|
| 40 |
- xxxxxxx
|
| 41 |
+
</Sub-tasks>
|
| 42 |
'''
|
| 43 |
"""
|
| 44 |
|
| 45 |
FORMAT_ANSWER = """
|
| 46 |
+
You are a formatter AI assistant. Given a question and the answer provided by an other AI agent, you must format the answer as follows:
|
| 47 |
+
- Use the following template: ```FINAL ANSWER: [YOUR FINAL ANSWER]```.
|
| 48 |
+
- YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 49 |
+
- 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.
|
| 50 |
+
- 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.
|
| 51 |
+
- 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.
|
|
|
|
| 52 |
|
| 53 |
There is the question : {{ question }}
|
| 54 |
+
|
| 55 |
+
There is the AI agent unformatted answer : {{ answer }}
|
| 56 |
"""
|