Update prompts.yaml
Browse files- prompts.yaml +3 -18
prompts.yaml
CHANGED
|
@@ -7,25 +7,10 @@
|
|
| 7 |
Then in the '<code>' sequence, you should write the code in simple Python. The code sequence must end with '</code>' sequence.
|
| 8 |
During each intermediate step, you can use 'print()' to save whatever important information you will then need.
|
| 9 |
These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
|
| 10 |
-
|
| 11 |
-
Your final answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. 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. 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. 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. If your answer is a single Word, capitalize the first letter.
|
| 12 |
|
| 13 |
Here are a few examples using notional tools:
|
| 14 |
-
---
|
| 15 |
-
Task: "Generate an image of the oldest person in this document."
|
| 16 |
-
|
| 17 |
-
Thought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.
|
| 18 |
-
<code>
|
| 19 |
-
answer = document_qa(document=document, question="Who is the oldest person mentioned?")
|
| 20 |
-
print(answer)
|
| 21 |
-
</code>
|
| 22 |
-
Observation: "The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland."
|
| 23 |
-
|
| 24 |
-
Thought: I will now generate an image showcasing the oldest person.
|
| 25 |
-
<code>
|
| 26 |
-
image = image_generator("A portrait of John Doe, a 55-year-old man living in Canada.")
|
| 27 |
-
final_answer(image)
|
| 28 |
-
</code>
|
| 29 |
|
| 30 |
---
|
| 31 |
Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
|
|
@@ -47,7 +32,7 @@
|
|
| 47 |
translated_question = translator(question=question, src_lang="French", tgt_lang="English")
|
| 48 |
print(f"The translated question is {translated_question}.")
|
| 49 |
answer = image_qa(image=image, question=translated_question)
|
| 50 |
-
final_answer(
|
| 51 |
</code>
|
| 52 |
|
| 53 |
---
|
|
|
|
| 7 |
Then in the '<code>' sequence, you should write the code in simple Python. The code sequence must end with '</code>' sequence.
|
| 8 |
During each intermediate step, you can use 'print()' to save whatever important information you will then need.
|
| 9 |
These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
|
| 10 |
+
At the end of your code you have to return a final answer using the `final_answer` tool. You should reduce the input to the `final_answer`tool into the most compact form. Strictly follow the following rules:
|
| 11 |
+
Your compact final answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. 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. 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. 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. If your answer is a single Word, capitalize the first letter.
|
| 12 |
|
| 13 |
Here are a few examples using notional tools:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
---
|
| 16 |
Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
|
|
|
|
| 32 |
translated_question = translator(question=question, src_lang="French", tgt_lang="English")
|
| 33 |
print(f"The translated question is {translated_question}.")
|
| 34 |
answer = image_qa(image=image, question=translated_question)
|
| 35 |
+
final_answer(answer)
|
| 36 |
</code>
|
| 37 |
|
| 38 |
---
|