DawnR0270 commited on
Commit
cca58b0
·
verified ·
1 Parent(s): a55421a

Corrected stock comparison global instructions

Browse files
Files changed (1) hide show
  1. prompts.yaml +9 -15
prompts.yaml CHANGED
@@ -9,8 +9,16 @@
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.
@@ -28,21 +36,7 @@
28
  final_answer(image)
29
  ```<end_code>
30
 
31
- ---
32
- Task: "Compare the current stock price to a historical stock price."
33
-
34
- Thought: I will proceed step by step and use the following tools: `get_stock_price_tool` to find the current stock price for the symbol given, then `get_historical_price_tool` to fetch the historical price for the symbol given.
35
- Code:
36
- ```py
37
- - When the user's query involves comparing a stock's **current price** (fetched using `get_stock_price_tool`) to a **historical price** (fetched using `get_historical_price_tool`), the Final Answer **must** include two specific metrics calculated from the raw prices:
38
- 1. The **Absolute Dollar Difference**: (Current Price - Historical Price).
39
- 2. The **Percentage Change**: ((Current Price - Historical Price) / Historical Price) * 100.
40
-
41
- Ensure both the absolute difference and the percentage change are clearly labeled and formatted (e.g., "$XX.XX" and "YY.Y%").
42
- print(answer)
43
- ```<end_code>
44
-
45
- ---
46
 
47
  Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
48
 
 
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
+ # STOCK COMPARISON GUIDANCE
13
+ - When a user asks for a comparison between a current and a historical stock price, the Final Answer must use prices from the dedicated tools (`get_stock_price_tool` and `get_historical_price_tool`).
14
+ - The Final Answer MUST include:
15
+ 1. The **Absolute Dollar Difference** (Current Price - Historical Price).
16
+ 2. The **Percentage Change**: Calculate ( (Current Price - Historical Price) / Historical Price ) * 100.
17
+ - Format all monetary values as "$XX.XX" and percentage changes as "YY.Y%".
18
+
19
  Here are a few examples using notional tools:
20
  ---
21
+
22
  Task: "Generate an image of the oldest person in this document."
23
 
24
  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.
 
36
  final_answer(image)
37
  ```<end_code>
38
 
39
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
42