You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are an expert autonomous agent operating in the WebShop e‑commerce environment.
4
-
Your task is to: {task_description}.
5
-
Your current observation is: {current_observation}.
6
-
Your admissible actions of the current situation are:
7
-
[
18
+
You are an expert agent operating in the WebShop e‑commerce environment.
19
+
Your task is: {task_description}
20
+
Your current observation is: {current_observation}
21
+
Your admissible actions of the current situation are: [
8
22
{available_actions}
9
23
].
10
24
11
-
Now it's your turn to take one action for the current step.
12
-
You should first reason step-by-step about the current situation, then think carefully which admissible action best advances the shopping goal. This reasoning process MUST be enclosed within <think> </think> tags.
13
-
Once you've finished your reasoning, you should choose an admissible action for current step and present it within <action> </action> tags.
25
+
Please begin by analyzing the situation and planning your approach:
26
+
27
+
<plan>
28
+
Analyze the current shopping situation and devise a plan to accomplish the task: {task_description}
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
+
Based on the current observation, what should be my immediate next step?
31
+
How does this action advance my plan toward completing the shopping goal?
32
+
</plan>
33
+
34
+
Finally, choose ONE admissible action for the current step and present it within <action> </action> tags.
14
35
"""
15
36
16
37
WEBSHOP_TEMPLATE="""
17
-
You are an expert autonomous agent operating in the WebShop e‑commerce environment.
18
-
Your task is to: {task_description}.
38
+
You are an expert agent operating in the WebShop e‑commerce environment.
39
+
Your task is: {task_description}
19
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}
20
-
You are now at step {current_step} and your current observation is: {current_observation}.
21
-
Your admissible actions of the current situation are:
22
-
[
41
+
You are now at step {current_step} and your current observation is: {current_observation}
42
+
Your admissible actions of the current situation are: [
23
43
{available_actions}
24
44
].
25
45
26
-
Now it's your turn to take one action for the current step.
27
-
You should first reason step-by-step about the current situation, then think carefully which admissible action best advances the shopping goal. This reasoning process MUST be enclosed within <think> </think> tags.
28
-
Once you've finished your reasoning, you should choose an admissible action for current step and present it within <action> </action> tags.
29
-
"""
46
+
Now it's your turn to take an action.
47
+
48
+
You should first recall relevant past experience and reason from our conversation history, then MUST summarize within <memory_recall> </memory_recall> tags like this:
49
+
50
+
<memory_recall>
51
+
[Recall relevant past experiences and reason from our conversation history]
52
+
Recent action history ({step_count} steps taken): {action_history}
53
+
- What similar shopping situations have I encountered?
54
+
- What strategies worked or failed before (e.g., search terms, product filtering, option selection)?
55
+
- What products, attributes, or pages have I already explored?
56
+
- What was my previous reasoning and plan?
57
+
</memory_recall>
58
+
59
+
After that, you should reflect on the last action and its outcome, then MUST summarize within <reflection> </reflection> tags like this:
60
+
61
+
<reflection>
62
+
[Reflect on the last action and its outcome]
63
+
- What did my last action accomplish?
64
+
- Was it successful or did it encounter issues?
65
+
- How does this outcome affect my plan?
66
+
- Am I making progress toward the task goal: {task_description}?
67
+
</reflection>
68
+
69
+
After that, you should plan the next step based on memory and reflection, then MUST summarize within <think> </think> tags like this:
70
+
71
+
<think>
72
+
[Plan the next step based on memory and reflection]
73
+
- Given what I've learned, what should I do next?
74
+
- How does this action fit into my overall shopping strategy?
75
+
- What do I expect this action to achieve now?
76
+
</think>
77
+
78
+
Finally, choose ONE admissible action for the current step and present it within <action> </action> tags.
0 commit comments