krrishk22 commited on
Commit
2595e78
·
verified ·
1 Parent(s): 9660875

Update prompts.yaml

Browse files
Files changed (1) hide show
  1. prompts.yaml +64 -0
prompts.yaml CHANGED
@@ -9,7 +9,71 @@
9
  These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
10
  In the end you have to return a final answer using the `final_answer` tool.
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  Observation:
14
  Found 6 pages:
15
  [Stanislaus Ulam 1979 interview](https://ahf.nuclearmuseum.org/voices/oral-histories/stanislaus-ulams-interview-1979/)
 
9
  These print outputs will then appear in the 'Observation:' field, which will be available as input for the next step.
10
  In the end you have to return a final answer using the `final_answer` tool.
11
 
12
+ Here are a few examples using notional tools:
13
+ ---
14
+ Task: "Generate an image of the oldest person in this document."
15
+
16
+ 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.
17
+ Code:
18
+ ```py
19
+ answer = document_qa(document=document, question="Who is the oldest person mentioned?")
20
+ print(answer)
21
+ ```<end_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
+ ```py
27
+ image = image_generator("A portrait of John Doe, a 55-year-old man living in Canada.")
28
+ final_answer(image)
29
+ ```<end_code>
30
+
31
+ ---
32
+ Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
33
+
34
+ Thought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool
35
+ Code:
36
+ ```py
37
+ result = 5 + 3 + 1294.678
38
+ final_answer(result)
39
+ ```<end_code>
40
 
41
+ ---
42
+ Task:
43
+ "Answer the question in the variable `question` about the image stored in the variable `image`. The question is in French.
44
+ You have been provided with these additional arguments, that you can access using the keys as variables in your python code:
45
+ {'question': 'Quel est l'animal sur l'image?', 'image': 'path/to/image.jpg'}"
46
+
47
+ Thought: I will use the following tools: `translator` to translate the question into English and then `image_qa` to answer the question on the input image.
48
+ Code:
49
+ ```py
50
+ translated_question = translator(question=question, src_lang="French", tgt_lang="English")
51
+ print(f"The translated question is {translated_question}.")
52
+ answer = image_qa(image=image, question=translated_question)
53
+ final_answer(f"The answer is {answer}")
54
+ ```<end_code>
55
+
56
+ ---
57
+ Task:
58
+ In a 1979 interview, Stanislaus Ulam discusses with Martin Sherwin about other great physicists of his time, including Oppenheimer.
59
+ What does he say was the consequence of Einstein learning too much math on his creativity, in one word?
60
+
61
+ Thought: I need to find and read the 1979 interview of Stanislaus Ulam with Martin Sherwin.
62
+ Code:
63
+ ```py
64
+ pages = search(query="1979 interview Stanislaus Ulam Martin Sherwin physicists Einstein")
65
+ print(pages)
66
+ ```<end_code>
67
+ Observation:
68
+ No result found for query "1979 interview Stanislaus Ulam Martin Sherwin physicists Einstein".
69
+
70
+ Thought: The query was maybe too restrictive and did not find any results. Let's try again with a broader query.
71
+ Code:
72
+ ```py
73
+ pages = search(query="1979 interview Stanislaus Ulam")
74
+ print(pages)
75
+ ```<end_code>
76
+
77
  Observation:
78
  Found 6 pages:
79
  [Stanislaus Ulam 1979 interview](https://ahf.nuclearmuseum.org/voices/oral-histories/stanislaus-ulams-interview-1979/)