Skip to content

Commit cb87321

Browse files
committed
[perf] update alfworld and webshop rollout prompt
1 parent 68b1dbe commit cb87321

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

openmanus_rl/environments/prompts/alfworld.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
3737
Now it's your turn to take an action.
3838
39-
You should first recall relevant past experiences and reason from our conversation history, then MUST summarize within <memory_recall> </memory_recall> tags like this:
39+
You should first recall relevant past experiences and reason from our conversation history, then MUST summarize within <memory_analysis> </memory_analysis> tags like this:
4040
4141
<memory_analysis>
4242
[Recall relevant past experiences and reason from our conversation history]

openmanus_rl/environments/prompts/webshop.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# --------------------- WebShop --------------------- #
1717
WEBSHOP_TEMPLATE_NO_HIS = """
18-
You are an expert agent operating in the WebShop ecommerce environment.
18+
You are an expert agent operating in the WebShop e-commerce environment.
1919
Your task is: {task_description}
2020
Your current observation is: {current_observation}
2121
Your admissible actions of the current situation are: [
@@ -25,36 +25,31 @@
2525
Please begin by analyzing the situation and planning your approach:
2626
2727
<plan>
28-
Analyze the current shopping situation and devise a plan to accomplish the task: {task_description}
28+
Analyze the current shopping situation and devise a plan to accomplish the task:
2929
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?
3031
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?
3232
</plan>
3333
3434
Finally, choose ONE admissible action for the current step and present it within <action> </action> tags.
3535
"""
3636

3737
WEBSHOP_TEMPLATE = """
38-
You are an expert agent operating in the WebShop ecommerce environment.
38+
You are an expert agent operating in the WebShop e-commerce environment.
3939
Your task is: {task_description}
4040
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}
4141
You are now at step {current_step} and your current observation is: {current_observation}
42-
Your admissible actions of the current situation are: [
43-
{available_actions}
44-
].
42+
Your admissible actions of the current situation are: [{available_actions}].
4543
4644
Now it's your turn to take an action.
4745
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:
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:
4947
50-
<memory_recall>
48+
<memory_analysis>
5149
[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>
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>
5853
5954
After that, you should reflect on the last action and its outcome, then MUST summarize within <reflection> </reflection> tags like this:
6055
@@ -63,17 +58,18 @@
6358
- What did my last action accomplish?
6459
- Was it successful or did it encounter issues?
6560
- How does this outcome affect my plan?
66-
- Am I making progress toward the task goal: {task_description}?
61+
- Am I making progress toward the task goal?
6762
</reflection>
6863
69-
After that, you should plan the next step based on memory and reflection, then MUST summarize within <think> </think> tags like this:
64+
After that, you should plan the next step based on memory and reflection, then MUST summarize within <plan> </plan> tags like this:
7065
71-
<think>
66+
<plan>
7267
[Plan the next step based on memory and reflection]
7368
- Given what I've learned, what should I do next?
69+
- Please explain why this plan is helpful for the next action?
7470
- How does this action fit into my overall shopping strategy?
7571
- What do I expect this action to achieve now?
76-
</think>
72+
</plan>
7773
7874
Finally, choose ONE admissible action for the current step and present it within <action> </action> tags.
7975
"""

0 commit comments

Comments
 (0)