Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,15 +59,9 @@ PROMPT_TEMPLATE = """You are an expert final-answer extractor working for the GA
|
|
| 59 |
the exam's results evaluator is an AI model that use the exact matching method to evaluate your answers, so you must format your Final Answer in the most consice and useful format.
|
| 60 |
|
| 61 |
Your task is to read the question and the raw output of an AI agent and extract the final concise answer for the question .
|
| 62 |
-
### INSTRUCTIONS:
|
| 63 |
-
-your answer must be useful and meaningful for the question.
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
- Dates → format as YYYY-MM-DD
|
| 68 |
-
- Lists → comma-separated, e.g., "Paris, London"
|
| 69 |
-
- Short words or names → return exactly that
|
| 70 |
-
5. DO NOT include any other text, reasoning, or punctuation beyond the final concise answer.
|
| 71 |
DON'T take out your output of the logging or error information.
|
| 72 |
make your answer in gaia format( in the most concise format) as follows:
|
| 73 |
|
|
@@ -109,7 +103,11 @@ ignore the error messages like : agent stoped due to limit iteration.
|
|
| 109 |
Now extract the GAIA final concise answer from this text:
|
| 110 |
{text}
|
| 111 |
"""
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
def extract_final_answer(raw: str) -> str:
|
| 114 |
# سجل الدخل فور الاستلام
|
| 115 |
logger.info(f"INPUT received (len={len(raw) if raw else 0}): {repr(raw[:300])}{'...' if raw and len(raw)>300 else ''}")
|
|
|
|
| 59 |
the exam's results evaluator is an AI model that use the exact matching method to evaluate your answers, so you must format your Final Answer in the most consice and useful format.
|
| 60 |
|
| 61 |
Your task is to read the question and the raw output of an AI agent and extract the final concise answer for the question .
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
|
| 64 |
+
. DO NOT include any other text, reasoning, or punctuation beyond the final concise answer.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
DON'T take out your output of the logging or error information.
|
| 66 |
make your answer in gaia format( in the most concise format) as follows:
|
| 67 |
|
|
|
|
| 103 |
Now extract the GAIA final concise answer from this text:
|
| 104 |
{text}
|
| 105 |
"""
|
| 106 |
+
#Format the answer according to GAIA Benchmark rules:
|
| 107 |
+
# - Numbers → return as-is (e.g., 42)
|
| 108 |
+
# - Dates → format as YYYY-MM-DD
|
| 109 |
+
# - Lists → comma-separated, e.g., "Paris, London"
|
| 110 |
+
# - Short words or names → return exactly that
|
| 111 |
def extract_final_answer(raw: str) -> str:
|
| 112 |
# سجل الدخل فور الاستلام
|
| 113 |
logger.info(f"INPUT received (len={len(raw) if raw else 0}): {repr(raw[:300])}{'...' if raw and len(raw)>300 else ''}")
|