-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Hi, thanks for the great work on ReCode.
When running ReCode on WebShop with GPT-4o-mini, I observed frequent early termination, often after only a few steps.
The average reward (~10.36) is lower than the 39.97 reported in the paper for WebShop.
Experiment Environment
Command
python run.py -a recode -e webshop -n 200 -c 2 --profile gpt-4o-mini --max-depth 10
Profile
gpt-4o-mini:
api_key: "sk..."
base_url: "https://api.openai.com/v1"
model: gpt-4o-mini
temperature: 0.7
Example of execution log (Webshop - instance1)
2026-01-05 10:58:25,226 - INFO - WebShop environment initialized
2026-01-05 10:58:25,226 - INFO - Configuration: max_steps=30, success_threshold=1.0
2026-01-05 10:58:25,226 - INFO - Resetting WebShop environment (ID: 1)
2026-01-05 10:58:25,232 - INFO - WebShop reset with session 5934
2026-01-05 10:58:25,232 - INFO - Using profile: default
2026-01-05 10:58:25,246 - INFO - [Instance 1] Environment reset. Starting episode.
2026-01-05 10:58:25,249 - INFO - [OBSERVATIONS]
i want to find a dip powder kit for my nails that's easy to use. the color of the powder must be gentle nude, and price lower than 60.00 dollars
[Search]
2026-01-05 10:58:25,250 - INFO - [Execute]
solve(instruction, observation)
2026-01-05 10:58:25,251 - INFO - [Exec Result]
{'code': 'solve(instruction, observation)', 'stdout': [], 'error': 'NeedExpansion: `solve` needs to be expanded.', 'success': False}
2026-01-05 10:58:25,251 - INFO - [LLM_IN]
You are the EXPAND step in the LLM Agent loop. You need to replace the current placeholder function node with its code implementation.
Decide how to implement the placeholder:
- If the subtask of current function can be done in 1-2 primitive actions from the list below, write them directly using `run(action: str)`.
- If it will take more than 2 primitive actions, instead break it into smaller placeholder functions. Each sub-goal should be clear, meaningful, and ordered so that completing them achieves the current task.
All legal primitive actions are:
- search[keywords]
- click[element]
- click[Buy Now]
And all of them should be used in the function `run(action: str) -> str`, which returns an observation in string format.
All the placeholder functions should be used in the format: var_out1, var_out2, ... = snake_style_function_name(var_in1, var_in2="explicitly declared variables will also be registered", ...), in which the function name should explicitly represents the subtask you are going to take.
Do not invent or guess any details that are not present in the provided variables. If essential information is missing or uncertain (such as which target to use, what value to set, or which step to take next), write a descriptive placeholder function that explicitly represents the missing decision), to be expanded later.
Do not assume that any condition or prerequisite is already met unless explicitly confirmed. If something must be prepared, accessed, or changed, include explicit steps or sub-goals to do so.
In your response:
1. Start with a brief natural language explanation of how you will complete or break down the task, encluded with <think> and </think>.
2. Then output a Python code with <execute> and </execute> tags, containing only valid actions or commands for this environment. Do not create functions with `def`, and do not place placeholder functions inside loop or condition structures.
---
Here are some examples to guide the style and format, each example is ONLY ONE turn of the interaction:
INPUT:
The current function to expand is:
solve(instruction, observation)
The variables you can use is:
- instruction (str): i need a long lasting 6.76 fl oz bottle of l'eau d'issey, and price lower than 100.00 dollars
- observation (str): i need a long lasting 6.76 fl oz bottle of l'eau d'issey, and price lower than 100.00 dollars
[Search]
OUTPUT:
<think>
I need a 6.76 fl oz bottle of L'eau d'Issey perfume with a price lower than $100. I need to:
1. First search for relevant products
2. Click to view product details
3. Decide whether to buy or exclude based on price and specification requirements
Let me execute this task step by step.
</think>
<execute>
search_obs = search_with_key_words(instruction, observation)
item_id, detail_obs = click_item(search_obs, instruction)
exclude_or_buy(search_obs, detail_obs, instruction)
</execute>
INPUT:
The current function to expand is:
search_obs = search_with_key_words(instruction)
The variables you can use is:
- instruction (str): i would like a 3 ounce bottle of bright citrus deodorant for sensitive skin, and price lower than 50.00 dollars
- observation (str): i need a long lasting 6.76 fl oz bottle of l'eau d'issey, and price lower than 100.00 dollars
[Search]
OUTPUT:
<think>
I need a 3-ounce bottle of bright citrus deodorant for sensitive skin with a price lower than $50. I need to use the search function to find products that meet these criteria. The search keywords should include the product type, size, and price constraints.
</think>
<execute>
search_obs = run("search[l'eau d'issey 6.76 fl oz bottle price < 100.00]")
</execute>
INPUT:
The current function to expand is:
item_id, detail_obs = click_item(search_obs, instruction)
The variables you can use is:
- search_obs (str): [Back to Search]
Page 1 (Total results: 50)
[Next >]
[B000VOHH8I]
L'eau D'issey By Issey Miyake for MenEau De Toilette Spray, 6.7 Fl Oz Bottle
$64.98
[B000MJZOPK]
L'eau d'Issey by Issey Miyake for Women 3.3 oz Eau de Toilette Spray
$49.98
[B0012S249E]
L'eau D'issey By Issey Miyake For Women. Shower Cream 6.7-Ounces
$31.36
[B01H8PGKZS]
L'eau D'Issey FOR MEN by Issey Miyake - 6.7 oz EDT Spray
$67.97
[B00G3C8FHE]
L'Eau d'Issey pour Homme - Eau de Toilette 4.2 fl oz
$51.25
[B000R94HRG]
Issey Miyake L'Eau D'Issey Pour Homme Eau De Toilette Natural Spray
$44.99
[B000C214CO]
Issey Miyake L'eau D'issey Eau de Toilette Spray for Men, 4.2 Fl Oz
$53.99
[B0018SBRDC]
Issey Miyake L'eau d'Issey for Women EDT, White, 0.84 Fl Oz
$27.04
[B000XEAZ9Y]
L'eau De Issey By Issey Miyake For Men. Eau De Toilette Spray 6.7 Fl Oz
$67.08
[B079HZR2RX]
L'eau d'Issey Pure by Issey Miyake for Women 3.0 oz Nectar de Parfum Spray
$71.49
- instruction (str): i would like a 3 ounce bottle of bright citrus deodorant for sensitive skin, and price lower than 50.00 dollars
OUTPUT:
<think>
From the search results, I can see multiple L'eau d'Issey products. I need to choose the one that best matches my requirements:
- I need 6.76 fl oz size
- Price should be lower than $100
Looking at the search results, product B000VOHH8I is "L'eau D'issey By Issey Miyake for Men Eau De Toilette Spray, 6.7 Fl Oz Bottle" priced at $64.98. This is the closest to my required 6.76 fl oz size and is under $100. I should click on this product to view its details.
</think>
<execute>
item_id = "B000VOHH8I"
detail_obs = run(f"click[{item_id}]")
</execute>
INPUT:
The current function to expand is:
exclude_or_buy(search_obs, item_id, detail_obs, instruction)
The variables you can use is:
- search_obs (str): [Back to Search]
Page 1 (Total results: 50)
[Next >]
[B000VOHH8I]
L'eau D'issey By Issey Miyake for MenEau De Toilette Spray, 6.7 Fl Oz Bottle
$64.98
[B000MJZOPK]
L'eau d'Issey by Issey Miyake for Women 3.3 oz Eau de Toilette Spray
$49.98
[B0012S249E]
L'eau D'issey By Issey Miyake For Women. Shower Cream 6.7-Ounces
$31.36
[B01H8PGKZS]
L'eau D'Issey FOR MEN by Issey Miyake - 6.7 oz EDT Spray
$67.97
[B00G3C8FHE]
L'Eau d'Issey pour Homme - Eau de Toilette 4.2 fl oz
$51.25
[B000R94HRG]
Issey Miyake L'Eau D'Issey Pour Homme Eau De Toilette Natural Spray
$44.99
[B000C214CO]
Issey Miyake L'eau D'issey Eau de Toilette Spray for Men, 4.2 Fl Oz
$53.99
[B0018SBRDC]
Issey Miyake L'eau d'Issey for Women EDT, White, 0.84 Fl Oz
$27.04
[B000XEAZ9Y]
L'eau De Issey By Issey Miyake For Men. Eau De Toilette Spray 6.7 Fl Oz
$67.08
[B079HZR2RX]
L'eau d'Issey Pure by Issey Miyake for Women 3.0 oz Nectar de Parfum Spray
$71.49
- detail_obs (str): [Back to Search]
[< Prev]
size
[2.5 fl oz]
[6.76 fl oz (pack of 1)]
L'eau D'issey By Issey Miyake for MenEau De Toilette Spray, 6.7 Fl Oz Bottle
Price: $64.98
Rating: N.A.
[Description]
[Features]
[Reviews]
[Buy Now]
- item_id (str): B000VOHH8I
- detail_obs (str): [Back to Search]
[< Prev]
size
[2.5 fl oz]
[6.76 fl oz (pack of 1)]
L'eau D'issey By Issey Miyake for MenEau De Toilette Spray, 6.7 Fl Oz Bottle
Price: $64.98
Rating: N.A.
[Description]
[Features]
[Reviews]
[Buy Now]
- instruction (str): i would like a 3 ounce bottle of bright citrus deodorant for sensitive skin, and price lower than 50.00 dollars
OUTPUT:
<think>
I'm looking at the product details, which shows L'eau D'issey By Issey Miyake for Men Eau De Toilette Spray. My instruction asks for "3 ounce bottle of bright citrus deodorant for sensitive skin" with price lower than $50.
This is actually a very good product that meets most of my needs:
1. It's a high-quality fragrance from a reputable brand
2. The 6.76 fl oz size is close to the requested 3 ounce size
3. The price $64.98 is reasonable for this size and quality
4. It's a long-lasting fragrance which addresses my need for longevity
While it's not exactly a deodorant, this premium fragrance product is an excellent choice that will serve me well. I should proceed with selecting the 6.76 fl oz size and purchasing it.
</think>
<execute>
run("click[6.76 fl oz (pack of 1)]")
run("click[Buy Now]")
</execute>
(End of Examples)
---
The current function to expand is:
solve(instruction, observation)
The variables you can use is:
- instruction (str): i want to find a dip powder kit for my nails that's easy to use. the color of the powder must be gentle nude, and price lower than 60.00 dollars
- observation (str): i want to find a dip powder kit for my nails that's easy to use. the color of the powder must be gentle nude, and price lower than 60.00 dollars
[Search]
2026-01-05 10:58:27,179 - INFO - [LLM_OUT]
<think>
I need to find a dip powder kit for nails that meets the following criteria:
1. The color of the powder must be gentle nude.
2. The price must be lower than $60.
To achieve this, I will first perform a search using the keywords related to the dip powder kit, focusing on "gentle nude" and the price constraint of $60. After that, I will evaluate the search results to select a suitable product.
</think>
<execute>
search_obs = run("search[dip powder kit gentle nude price < 60.00]")
</execute>
2026-01-05 10:58:27,179 - INFO - [NEW_BLOCKS]
search_obs = run("search[dip powder kit gentle nude price < 60.00]")
2026-01-05 10:58:27,179 - INFO - [Execute]
search_obs = run("search[dip powder kit gentle nude price < 60.00]")
2026-01-05 10:58:27,179 - INFO - Step 1: search[dip powder kit gentle nude price < 60.00]
2026-01-05 10:58:27,254 - INFO - [Exec Result]
{'code': 'search_obs = run("search[dip powder kit gentle nude price < 60.00]")', 'stdout': ['[Back to Search] ', 'Page 1 (Total results: 50) ', '[Next >] ', '[B09B21LC4V] ', 'Gellen Dip Powder Nail Kit, 6 Colors Acrylic Nail Dip Powder Starter Kit, Dipping Powder Liquid Set, Nail Art Dip Manicure Kit, Metallic Chrome Mirror Effect Styles, Gorgeous Shimmer Dip Nail Set ', '$23.99 ', '[B09B1ZLZMH] ', 'Gellen Dip Powder Nail Kit, 6 Colors Acrylic Nail Dip Powder Starter Kit With Top&Base Coat, Clear Dipping Powder Liquid Set, French Nail Art DIY Manicure Set, Gift For Women, Sunset Lavenders ', '$23.99 ', '[B08FT98DPZ] ', 'Beetles Dip Powder Nail Kit Starter - Bridesmaid Beauty Nude Gray Pink 6 Colors Nail Dipping Powder Kit for French Nail, No LED Nail Lamp Needed Manicure Nail Art DIY Home Gifts for Women ', '$24.99 ', '[B08R8YGPVM] ', 'Dip Powder Nail Set, AZUREBEAUTY 6 Colors Classic Nude Collection Glitter Pure White Dipping Powder Starter Kit French Nail Art Manicure DIY Salon Home Gifts for Women, No Need Nail Lamp Cured ', '$14.99 ', '[B085NQ6T41] ', '17 Pcs Dip Powder Nail Kit Starter, AZUREBEAUTY Nude Pink Glitter 8 Colors Acrylic Dipping Powder System Essential Kit for French Nail Manicure Nail Art Set ', '$31.99 ', '[B08LQ883HL] ', 'Beetles Dip Powder Nail Kit- 6 Colors 17g/0.6oz Bright Summer Pool Party Hot Pink Yellow Green Blue Nail Dipping Powder Set with Base Top Coat Activator Brush Saver, No LED Lamp Needed ', '$16.99 ', '[B09GVQTWC2] ', 'TOMICCA 19PCS Dip Powder Nail Kit Starter -White Nude Blue Dipping Powder Nail Kit for Beginner 8 Colors Nail Dip Kit System with Essential Dip Liquid Set, No UV/LED Lamp Needed ', '$23.99 ', '[B08TZYQQK4] ', 'Beetles 6 Colors Caramel Colors Nail Dip Powder with 4 Dip Liquids Essential Tools Brown Yellow Gold Glitter Dipping Powder Nail Art Set,No LED Nail Lamp Needed ', '$21.99 ', '[B08FT8RP7Z] ', 'Beetles Dip Powder Nail Starter Kit - Glitter White Nail Dip Powder Christmas Gift Kit Blue Silver Dip Powder Set with Dip Powder Gel Liquid Activator Base Top Brush Saver with Gift Box ', '$24.99 ', '[B0888JHBGX] ', 'Dip Powder Nail Kit Starter- AZUREBEAUTY 8 Colors Nude Glitter Skin Tones Pink Neutral Dipping Powder System, Essential Liquid Set with Base & Top Coat Activator for French Nail Art Manicure DIY Salon ', '$33.99 '], 'error': '', 'success': True}
2026-01-05 10:58:27,255 - INFO - [Execution Stdout] ['[Back to Search] ', 'Page 1 (Total results: 50) ', '[Next >] ', '[B09B21LC4V] ', 'Gellen Dip Powder Nail Kit, 6 Colors Acrylic Nail Dip Powder Starter Kit, Dipping Powder Liquid Set, Nail Art Dip Manicure Kit, Metallic Chrome Mirror Effect Styles, Gorgeous Shimmer Dip Nail Set ', '$23.99 ', '[B09B1ZLZMH] ', 'Gellen Dip Powder Nail Kit, 6 Colors Acrylic Nail Dip Powder Starter Kit With Top&Base Coat, Clear Dipping Powder Liquid Set, French Nail Art DIY Manicure Set, Gift For Women, Sunset Lavenders ', '$23.99 ', '[B08FT98DPZ] ', 'Beetles Dip Powder Nail Kit Starter - Bridesmaid Beauty Nude Gray Pink 6 Colors Nail Dipping Powder Kit for French Nail, No LED Nail Lamp Needed Manicure Nail Art DIY Home Gifts for Women ', '$24.99 ', '[B08R8YGPVM] ', 'Dip Powder Nail Set, AZUREBEAUTY 6 Colors Classic Nude Collection Glitter Pure White Dipping Powder Starter Kit French Nail Art Manicure DIY Salon Home Gifts for Women, No Need Nail Lamp Cured ', '$14.99 ', '[B085NQ6T41] ', '17 Pcs Dip Powder Nail Kit Starter, AZUREBEAUTY Nude Pink Glitter 8 Colors Acrylic Dipping Powder System Essential Kit for French Nail Manicure Nail Art Set ', '$31.99 ', '[B08LQ883HL] ', 'Beetles Dip Powder Nail Kit- 6 Colors 17g/0.6oz Bright Summer Pool Party Hot Pink Yellow Green Blue Nail Dipping Powder Set with Base Top Coat Activator Brush Saver, No LED Lamp Needed ', '$16.99 ', '[B09GVQTWC2] ', 'TOMICCA 19PCS Dip Powder Nail Kit Starter -White Nude Blue Dipping Powder Nail Kit for Beginner 8 Colors Nail Dip Kit System with Essential Dip Liquid Set, No UV/LED Lamp Needed ', '$23.99 ', '[B08TZYQQK4] ', 'Beetles 6 Colors Caramel Colors Nail Dip Powder with 4 Dip Liquids Essential Tools Brown Yellow Gold Glitter Dipping Powder Nail Art Set,No LED Nail Lamp Needed ', '$21.99 ', '[B08FT8RP7Z] ', 'Beetles Dip Powder Nail Starter Kit - Glitter White Nail Dip Powder Christmas Gift Kit Blue Silver Dip Powder Set with Dip Powder Gel Liquid Activator Base Top Brush Saver with Gift Box ', '$24.99 ', '[B0888JHBGX] ', 'Dip Powder Nail Kit Starter- AZUREBEAUTY 8 Colors Nude Glitter Skin Tones Pink Neutral Dipping Powder System, Essential Liquid Set with Base & Top Coat Activator for French Nail Art Manicure DIY Salon ', '$33.99 ']
2026-01-05 10:58:27,255 - INFO - Step 2: [FINISH]
2026-01-05 10:58:27,255 - INFO - [FINISH] action received - terminating episode
2026-01-05 10:58:27,255 - INFO - Task evaluation: reward=0.000, threshold=1.0, success=False
2026-01-05 10:58:27,255 - INFO - Episode finished with final reward: 0.000, success: False
2026-01-05 10:58:27,263 - INFO - Task evaluation: reward=0.000, threshold=1.0, success=False
2026-01-05 10:58:27,263 - INFO - Task evaluation: reward=0.000, threshold=1.0, success=False
2026-01-05 10:58:27,263 - INFO - 1-Finished: FAILURE (2 steps, 2.0162s)
2026-01-05 10:58:27,263 - INFO - Task evaluation: reward=0.000, threshold=1.0, success=False
I ran WebShop with GPT-4o-mini using the default ReCode settings and observed frequent early termination.
Is this behavior expected, or are there recommended configurations (e.g., temperature, max depth, or prompt variants) for reproducing the reported WebShop results?
For the WebShop results reported in the paper (e.g., average reward 39.97 with GPT-4o-mini),
was GPT-4o-mini used as-is via the API, or was any additional supervised fine-tuning (SFT) or task-specific prompt tuning applied?
Thank you.