Commit
Β·
3707bff
1
Parent(s):
b5ed0c0
enhanced prompt
Browse files
app.py
CHANGED
@@ -329,35 +329,31 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
329 |
print(f"Skipping item with missing task_id or question: {item}")
|
330 |
continue
|
331 |
try:
|
332 |
-
full_prompt = f"""
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
- Use `web_search`
|
337 |
-
-
|
338 |
-
-
|
339 |
-
-
|
340 |
-
-
|
341 |
-
-
|
342 |
-
-
|
343 |
-
-
|
344 |
-
-
|
345 |
-
|
346 |
-
-
|
347 |
-
|
348 |
-
- Do not include reasoning, steps, thoughts, or commentary β just the final value.
|
349 |
Example:
|
350 |
-
If asked
|
351 |
-
|
352 |
-
```py
|
353 |
print("Paris")
|
354 |
-
|
355 |
-
|
356 |
-
--begin of question--
|
357 |
{question_text}
|
358 |
-
|
359 |
-
|
360 |
-
file_name: {file_name}"""
|
361 |
submitted_answer = agent.run(full_prompt)
|
362 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
363 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
|
|
329 |
print(f"Skipping item with missing task_id or question: {item}")
|
330 |
continue
|
331 |
try:
|
332 |
+
full_prompt = f"""
|
333 |
+
You are a precise answering agent optimized for exact-match benchmarks like GAIA.
|
334 |
+
|
335 |
+
Your job is to:
|
336 |
+
- Use tools (e.g., `web_search`, `read_wikipedia_page`, `smart_paginate_around_query`, `reverse_sentence`, `open_file_as_text`, etc.) only when needed.
|
337 |
+
- Never make assumptions. Do not guess.
|
338 |
+
- Use `read_wikipedia_page` to read full content if snippets from `web_search` are not enough.
|
339 |
+
- Use `smart_paginate_around_query` with 1-3 keyword terms β never full questions.
|
340 |
+
- Use `reverse_sentence` for any reverse operation, never do it manually.
|
341 |
+
- Use the provided `file_name` field for file tasks, not filenames inside the question.
|
342 |
+
- Output formats:
|
343 |
+
- Numbers: Digits only, no commas, $, or %.
|
344 |
+
- Strings: No articles, abbreviations, or spelled-out numbers unless required.
|
345 |
+
- Lists: Comma separated, single space after each comma.
|
346 |
+
- At the end, print only the final answer. No explanation, no reasoning.
|
347 |
+
|
|
|
348 |
Example:
|
349 |
+
If asked, βWhat is the capital of France?β
|
350 |
+
Respond:
|
|
|
351 |
print("Paris")
|
352 |
+
|
353 |
+
Question:
|
|
|
354 |
{question_text}
|
355 |
+
|
356 |
+
File to use (if needed): {file_name}"""
|
|
|
357 |
submitted_answer = agent.run(full_prompt)
|
358 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
359 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|