|
18 | 18 | You are an expert agent operating in the WebShop e-commerce environment. |
19 | 19 | Your task is: {task_description} |
20 | 20 | Your current observation is: {current_observation} |
21 | | -Your admissible actions of the current situation are: [ |
22 | | -{available_actions} |
23 | | -]. |
| 21 | +Your admissible actions of the current situation are: {available_actions}. |
24 | 22 |
|
25 | 23 | Please begin by analyzing the situation and planning your approach: |
26 | 24 |
|
27 | 25 | <plan> |
28 | | -Analyze the current shopping situation and devise a plan to accomplish the task: |
29 | | -What are the key steps needed to complete this task (e.g., search with the right keywords, open a relevant product, compare options, select attributes, finalize)? |
30 | | -How to advance our plan toward completing the shopping goal in immediate next step? |
31 | | -Based on the current observation, what should be my immediate next step? |
| 26 | +Plan the next step: |
| 27 | +- Given what I've learned, what should I do next? |
| 28 | +- Please explain why this plan is helpful for the next action? |
| 29 | +- What do I expect this action to achieve? |
32 | 30 | </plan> |
33 | 31 |
|
34 | | -Finally, choose ONE admissible action for the current step and present it within <action> </action> tags. |
| 32 | +<action> |
| 33 | +Finally, choose ONE admissible action for the current step and choose it within {available_actions}. |
| 34 | +</action> |
35 | 35 | """ |
36 | 36 |
|
37 | 37 | WEBSHOP_TEMPLATE = """ |
38 | 38 | You are an expert agent operating in the WebShop e-commerce environment. |
39 | | -Your task is: {task_description} |
| 39 | +Your task is to: {task_description} |
40 | 40 | Prior to this step, you have already taken {step_count} step(s). Below are the most recent {history_length} observations and the corresponding actions you took: {action_history} |
41 | 41 | You are now at step {current_step} and your current observation is: {current_observation} |
42 | | -Your admissible actions of the current situation are: [{available_actions}]. |
| 42 | +Your admissible actions of the current situation are: {available_actions}. |
43 | 43 |
|
44 | 44 | Now it's your turn to take an action. |
45 | 45 |
|
46 | | -You should first recall relevant past experience and reason from our conversation history, then MUST summarize within <memory_analysis> </memory_analysis> tags like this: |
| 46 | +You should first recall relevant past experience and reason from our conversation history, then MUST summarize within <memory> </memory> tags like this: |
47 | 47 |
|
48 | | -<memory_analysis> |
49 | | -[Recall relevant past experiences and reason from our conversation history] |
50 | | -- Please summarize the most relavent memory for this step. |
51 | | -- Please explain why this memory is helpful for the next reflection and planning. |
52 | | -</memory_analysis> |
| 48 | +<memory> |
| 49 | +Look at the past observations and actions from our conversation history. |
| 50 | +- Please retrieve the most relavent memory for this step including the relevant observation and action in a RAG style along with the step number. |
| 51 | +- These memory should be helpful milestones to solve this task. |
| 52 | +</memory> |
53 | 53 |
|
54 | 54 | After that, you should reflect on the last action and its outcome, then MUST summarize within <reflection> </reflection> tags like this: |
55 | 55 |
|
56 | 56 | <reflection> |
57 | | -[Reflect on the last action and its outcome] |
58 | | -- What did my last action accomplish? |
59 | | -- Was it successful or did it encounter issues? |
60 | | -- How does this outcome affect my plan? |
| 57 | +Reflect on the last action and its outcome |
| 58 | +- Did I complete the task goal? |
| 59 | +- Was last action successful or did it encounter issues? |
61 | 60 | - Am I making progress toward the task goal? |
| 61 | +- If the action did not go as expected and did not result in progress, provide constructive feedback to guide the next planning step. |
62 | 62 | </reflection> |
63 | 63 |
|
64 | 64 | After that, you should plan the next step based on memory and reflection, then MUST summarize within <plan> </plan> tags like this: |
65 | 65 |
|
66 | 66 | <plan> |
67 | | -[Plan the next step based on memory and reflection] |
| 67 | +Plan the next step based on memory and reflection |
68 | 68 | - Given what I've learned, what should I do next? |
69 | 69 | - Please explain why this plan is helpful for the next action? |
70 | | -- How does this action fit into my overall shopping strategy? |
71 | | -- What do I expect this action to achieve now? |
| 70 | +- What do I expect this action to achieve? |
72 | 71 | </plan> |
73 | 72 |
|
74 | | -Finally, choose ONE admissible action for the current step and present it within <action> </action> tags. |
| 73 | +<action> |
| 74 | +Finally, choose ONE admissible action for the current step and choose it within {available_actions}. |
| 75 | +</action> |
75 | 76 | """ |
0 commit comments