diff --git a/src/server/tasks/alfworld/prompts/alfworld_multiturn_cot.json b/src/server/tasks/alfworld/prompts/alfworld_multiturn_cot.json index 2a62fa4c..5d3b89d4 100644 --- a/src/server/tasks/alfworld/prompts/alfworld_multiturn_cot.json +++ b/src/server/tasks/alfworld/prompts/alfworld_multiturn_cot.json @@ -1,18 +1,18 @@ { "naive_example": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a countertop 1, a garbagecan 1, a handtowelholder 2, a handtowelholder 1, a sinkbasin 2, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: put some spraybottle on toilet.\n", - "THOUGHT: The task is to put some spraybottle on toilet, so first i need to search the room for some spraybottle.\n ACTION: go to cabinet 1\n", + "ACTION: go to cabinet 1\n", "On the cabinet 1, you see a cloth 1, a soapbar 1, a soapbottle 1.\n", - "THOUGHT: On the cabinet 1, there is no spraybottle, so i need to search somewhere else.\n ACTION: go to cabinet 2\n", + "ACTION: go to cabinet 2\n", "The cabinet 2 is closed.\n", - "THOUGHT: since the cabinet 2 is closed, i need to open it.\n ACTION: open cabinet 2\n", + "ACTION: open cabinet 2\n", "You open the cabinet 2. The cabinet 2 is open. In it, you see a candle 1, and a spraybottle 2.\n", - "THOUGHT: I have found a spraybottle 2, now i need to take it with me.\n ACTION: take spraybottle 2 from cabinet 2\n", + "ACTION: take spraybottle 2 from cabinet 2\n", "You pick up the spraybottle 2 from the cabinet 2.\n", - "THOUGHT: I have taken the spraybottle 2 and the final target is to put it on toilet, so i need to go to toilet 1.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbottle 2.\n", - "THOUGHT: The final target is to put it on toilet, now i have the spraybottle and i need to put it in/on toilet 1.\n ACTION: put spraybottle 2 in/on toilet 1\n", + "ACTION: put spraybottle 2 in/on toilet 1\n", "You put the spraybottle 2 in/on the toilet 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ] } \ No newline at end of file diff --git a/src/server/tasks/alfworld/prompts/alfworld_multiturn_new.json b/src/server/tasks/alfworld/prompts/alfworld_multiturn_new.json index 3d5c1510..29c772cb 100644 --- a/src/server/tasks/alfworld/prompts/alfworld_multiturn_new.json +++ b/src/server/tasks/alfworld/prompts/alfworld_multiturn_new.json @@ -1,104 +1,104 @@ { "put": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a countertop 1, a garbagecan 1, a handtowelholder 2, a handtowelholder 1, a sinkbasin 2, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: put some spraybottle on toilet.\n", - "THOUGHT: The task is to put some spraybottle on toilet, so first i need to search the room for some spraybottle.\n ACTION: go to cabinet 1\n", + "ACTION: go to cabinet 1\n", "On the cabinet 1, you see a cloth 1, a soapbar 1, a soapbottle 1.\n", - "THOUGHT: On the cabinet 1, there is no spraybottle, so i need to search somewhere else.\n ACTION: go to cabinet 2\n", + "ACTION: go to cabinet 2\n", "The cabinet 2 is closed.\n", - "THOUGHT: since the cabinet 2 is closed, i need to open it and check what's inside.\n ACTION: open cabinet 2\n", + "ACTION: open cabinet 2\n", "You open the cabinet 2. The cabinet 2 is open. In it, you see a candle 1, and a spraybottle 2.\n", - "THOUGHT: The task is to put some spraybottle on toilet, I have found a spraybottle 2. To put it on toilet, i need to take it with me.\n ACTION: take spraybottle 2 from cabinet 2\n", + "ACTION: take spraybottle 2 from cabinet 2\n", "You pick up the spraybottle 2 from the cabinet 2.\n", - "THOUGHT: I have taken the spraybottle 2 and the final target is to put it on toilet, so i need to go to toilet 1.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbottle 2.\n", - "THOUGHT: The task is to put some spraybottle on toilet, now i have the spraybottle and i found the toilet, just need to put it in/on toilet 1.\n ACTION: put spraybottle 2 in/on toilet 1\n", + "ACTION: put spraybottle 2 in/on toilet 1\n", "You put the spraybottle 2 in/on the toilet 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ], "clean": [ "You are in the middle of a room. Looking quickly around you, you see a bathtubbasin 1, a garbagecan 1, a handtowelholder 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: clean some soapbar and put it in toilet.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet, so i need to first find some soapbar, and soapbar is likely to be found in toilet, so i'll start to search there.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbar 4, and a soapbar 3.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet. I found soapbars in toilet 1, so i'll take one of them and go somewhere to clean it.\n ACTION: take soapbar 4 from toilet 1\n", + "ACTION: take soapbar 4 from toilet 1\n", "You pick up the soapbar 4 from the toilet 1.\n", - "THOUGHT: I have taken soapbar 4 with me, the next step is to clean it, so i need to go to the sinkbasin.\n ACTION: go to sinkbasin 1\n", + "ACTION: go to sinkbasin 1\n", "On the sinkbasin 1, you see nothing.\n", - "THOUGHT: I arrived at the sinkbasin, and i need to wash soapbar 4 now.\nACTION: clean soapbar 4 with sinkbasin 1\n", + "ACTION: clean soapbar 4 with sinkbasin 1\n", "You clean the soapbar 4 using the sinkbasin 1.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet. I have cleaned soapbar 4, then i need to put it in the toilet, so i need to go to the toilet now.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbar 3.\n", - "THOUGHT: I have arrived at the toilet and i need to put soapbar 4 in/on toilet 1.\n ACTION: put soapbar 4 in/on toilet 1\n", + "ACTION: put soapbar 4 in/on toilet 1\n", "You put the soapbar 4 in/on the toilet 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ], "heat": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 1, a diningtable 1, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: put a hot apple in fridge.\n", - "THOUGHT: The task is to put a hot apple in fridge. So i need to first find an apple and heat it, i'll start my search on diningtable 1.\n ACTION: go to diningtable 1\n", + "ACTION: go to diningtable 1\n", "On the diningtable 1, you see a apple 1, a bread 1, a fork 3, a fork 2, a fork 1, a mug 2, a peppershaker 3, a plate 2, a pot 1, a soapbottle 3, a spatula 1, a spoon 3, a spoon 2, a spoon 1, a winebottle 3, and a winebottle 2.\n", - "THOUGHT: I have found an apple 1 and i will take it and plan to heat it.\n ACTION: take apple 1 from diningtable 1\n", + "ACTION: take apple 1 from diningtable 1\n", "You pick up the apple 1 from the diningtable 1.\n", - "THOUGHT: I noticed that there is a mivrowave 1 in the room, i will use it to heat the apple.\n ACTION: go to microwave 1\n", + "ACTION: go to microwave 1\n", "The microwave 1 is closed.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet. I have taken apple 1 to the microwave 1, and i will heat apple 1 with it.\n ACTION: heat apple 1 with microwave 1\n", + "ACTION: heat apple 1 with microwave 1\n", "You heat the apple 1 using the microwave 1.\n", - "THOUGHT: The apple is heated and i will take it to the fridge and put it in the fridge.\n ACTION: go to fridge 1\n", + "ACTION: go to fridge 1\n", "The fridge 1 is open. In it, you see a cup 1, and a egg 1.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet. I will put the apple in/on fridge 1.\n ACTION: put apple 1 in/on fridge 1\n", + "ACTION: put apple 1 in/on fridge 1\n", "You put the apple 1 in/on the fridge 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ], "cool": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 16, a cabinet 15, a cabinet 14, a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 2, a countertop 1, a diningtable 1, a drawer 5, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a safe 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: cool some pan and put it in stoveburner.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner, so i need to first find a pan, and a pan is likely to be found on a stoveburner, so i plan to search all the stoveburners.\n ACTION: go to stoveburner 1\n", + "ACTION: go to stoveburner 1\n", "On the stoveburner 1, you see nothing.\n", - "THOUGHT: Since there is no pan on the stoveburner 1, i'll continue to search on stoveburner 2.\n ACTION: go to stoveburner 2\n", + "ACTION: go to stoveburner 2\n", "On the stoveburner 2, you see a pot 1.\n", - "THOUGHT: Since there is no pan on the stoveburner 2, i'll continue to search on stoveburner 3.\n ACTION: go to stoveburner 3\n", + "ACTION: go to stoveburner 3\n", "On the stoveburner 3, you see a pan 1.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. I have found a pan 1 on the stoveburner 3, then i need to take it with me and cool it.\n ACTION: take pan 1 from stoveburner 3\n", + "ACTION: take pan 1 from stoveburner 3\n", "You pick up the pan 1 from the stoveburner 3.\n", - "THOUGHT: Now i have taken the pan 1 with me and i want to cool it.\n ACTION: go to fridge 1\n", + "ACTION: go to fridge 1\n", "The fridge 1 is closed.\n", - "THOUGHT: I have found fridge 1, and i need to cool the pan 1 with it.\n ACTION: cool pan 1 with fridge 1\n", + "ACTION: cool pan 1 with fridge 1\n", "You cool the pan 1 using the fridge 1.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. The pan 1 is cooled, then i need to return the cooled pan 1 to a stoveburner and put it on the stoveburner.\n ACTION: go to stoveburner 1\n", + "ACTION: go to stoveburner 1\n", "On the stoveburner 1, you see nothing.\n", - "THOUGHT: I need to put the pan 1 on it.\n ACTION: put pan 1 in/on stoveburner 1\n", + "ACTION: put pan 1 in/on stoveburner 1\n", "You put the pan 1 in/on the stoveburner 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ], "puttwo": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: put two cellphone in sofa.\n", - "THOUGHT: The task is to put two cellphone in sofa, so i need to first find two cellphones and put them on sofa, i'll start my search on coffeetable.\n ACTION: go to coffeetable 1\n", + "ACTION: go to coffeetable 1\n", "On the coffeetable 1, you see a box 1, a cellphone 3, and a plate 1.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. I have found the cellphone 3 on coffeetable 1 and i'll take it with me.\n ACTION: take cellphone 3 from coffeetable 1\n", + "ACTION: take cellphone 3 from coffeetable 1\n", "You pick up the cellphone 3 from the coffeetable 1.\n", - "THOUGHT: I have taken one cellphone and i'll first put it on sofa.\n ACTION: go to sofa 1\n", + "ACTION: go to sofa 1\n", "On the sofa 1, you see a newspaper 2, a pillow 1, a remotecontrol 2, and a remotecontrol 1.\n", - "THOUGHT: I haven taken cellphone 3 to sofa and then i need to put it in/on sofa.\n ACTION: put cellphone 3 in/on sofa 1\n", + "ACTION: put cellphone 3 in/on sofa 1\n", "You put the cellphone 3 in/on the sofa 1.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. In order to put two cellphone in sofa, i need to search for another phone, i'll start my search on diningtable.\n ACTION: go to diningtable 1\n", + "ACTION: go to diningtable 1\n", "On the diningtable 1, you see a cellphone 2, a keychain 2, a laptop 1, a statue 2, and a statue 1.\n", - "THOUGHT: I have found the cellphone 2 on diningtable 1 and i'll take it with me.\n ACTION: take cellphone 2 from diningtable 1\n", + "ACTION: take cellphone 2 from diningtable 1\n", "You pick up the cellphone 2 from the diningtable 1.\n", - "THOUGHT: I have taken one cellphone and i'll put it on sofa 1.\n ACTION: go to sofa 1\n", + "ACTION: go to sofa 1\n", "On the sofa 1, you see a cellphone 3, a newspaper 2, a pillow 1, a remotecontrol 2, and a remotecontrol 1.\n", - "THOUGHT: I haven taken cellphone 3 to sofa and then i need to put it in/on sofa.\n ACTION: put cellphone 2 in/on sofa 1\n", + "ACTION: put cellphone 2 in/on sofa 1\n", "You put the cellphone 2 in/on the sofa 1.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ], "examine": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: look at statue under the desklamp.\n", - "THOUGHT: The task is to look at statue under the desklamp, so i need to find the statue first and then find the desklamp and look at the statue. I'll start my search on dresser 1.\n ACTION: go to dresser 1\n", + "ACTION: go to dresser 1\n", "On the dresser 1, you see a cellphone 3, a newspaper 2, a statue 1, and a television 1.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. I have found a statue 1 on dresser 1 and i would like to take it with me.\n ACTION: take statue 1 from dresser 1\n", + "ACTION: take statue 1 from dresser 1\n", "You pick up the statue 1 from the dresser 1.\n", - "THOUGHT: I have taken the statue with me and i need to find a desklamp now. I'll start my search on sidetable 1.\n ACTION: go to sidetable 1\n", + "ACTION: go to sidetable 1\n", "On the sidetable 1, you see nothing.\n", - "THOUGHT: Since there is nothing on sidetable 1, so i'll continue my search on sidetable 2.\n ACTION: go to sidetable 2\n", + "ACTION: go to sidetable 2\n", "On the sidetable 2, you see a desklamp 3, a newspaper 1, and a statue 2.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner. I've found a desklamp 3 on sidetable 2, then i need to look at the statue unfer the desklamp 3. In order to do that, i need to first use desklamp 3.\n ACTION: use desklamp 3\n", + "ACTION: use desklamp 3\n", "You turn on the desklamp 3.\n", - "THOUGHT: I have completed the task.\n ACTION: Task succeeded.\n" + "ACTION: Task succeeded.\n" ] } \ No newline at end of file diff --git a/src/server/tasks/alfworld/prompts/alfworld_multiturn_plan_first.json b/src/server/tasks/alfworld/prompts/alfworld_multiturn_plan_first.json index e0120690..29c772cb 100644 --- a/src/server/tasks/alfworld/prompts/alfworld_multiturn_plan_first.json +++ b/src/server/tasks/alfworld/prompts/alfworld_multiturn_plan_first.json @@ -1,7 +1,7 @@ { "put": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a countertop 1, a garbagecan 1, a handtowelholder 2, a handtowelholder 1, a sinkbasin 2, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: put some spraybottle on toilet.\n", - "THOUGHT: The task is to put some spraybottle on toilet, so first i need to search the room for some spraybottle. After finding the spraybottle, i need to take it to the toilet. I wil start my search on cabinets.\n ACTION: go to cabinet 1\n", + "ACTION: go to cabinet 1\n", "On the cabinet 1, you see a cloth 1, a soapbar 1, a soapbottle 1.\n", "ACTION: go to cabinet 2\n", "The cabinet 2 is closed.\n", @@ -17,7 +17,7 @@ ], "clean": [ "You are in the middle of a room. Looking quickly around you, you see a bathtubbasin 1, a garbagecan 1, a handtowelholder 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: clean some soapbar and put it in toilet.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet, so i need to first find some soapbar, and clean it in a sinkbasin. Soapbar is likely to be found in toilet, so i'll start to search there.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbar 4, and a soapbar 3.\n", "ACTION: take soapbar 4 from toilet 1\n", "You pick up the soapbar 4 from the toilet 1.\n", @@ -33,7 +33,7 @@ ], "heat": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 1, a diningtable 1, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: put a hot apple in fridge.\n", - "THOUGHT: The task is to put a hot apple in fridge. So i need to first find an apple and heat it, i'll start my search on diningtables.\n ACTION: go to diningtable 1\n", + "ACTION: go to diningtable 1\n", "On the diningtable 1, you see a apple 1, a bread 1, a fork 3, a fork 2, a fork 1, a mug 2, a peppershaker 3, a plate 2, a pot 1, a soapbottle 3, a spatula 1, a spoon 3, a spoon 2, a spoon 1, a winebottle 3, and a winebottle 2.\n", "ACTION: take apple 1 from diningtable 1\n", "You pick up the apple 1 from the diningtable 1.\n", @@ -49,7 +49,7 @@ ], "cool": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 16, a cabinet 15, a cabinet 14, a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 2, a countertop 1, a diningtable 1, a drawer 5, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a safe 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: cool some pan and put it in stoveburner.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner, so i need to first find a pan and cool it. A pan is likely to be found on a stoveburner, so i plan to search all the stoveburners.\n ACTION: go to stoveburner 1\n", + "ACTION: go to stoveburner 1\n", "On the stoveburner 1, you see nothing.\n", "ACTION: go to stoveburner 2\n", "On the stoveburner 2, you see a pot 1.\n", @@ -69,7 +69,7 @@ ], "puttwo": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: put two cellphone in sofa.\n", - "THOUGHT: The task is to put two cellphone in sofa, so i need to first find a cellphone and put it on sofa. I'll start my search on coffeetables.\n ACTION: go to coffeetable 1\n", + "ACTION: go to coffeetable 1\n", "On the coffeetable 1, you see a box 1, a cellphone 3, and a plate 1.\n", "ACTION: take cellphone 3 from coffeetable 1\n", "You pick up the cellphone 3 from the coffeetable 1.\n", @@ -89,7 +89,7 @@ ], "examine": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: look at statue under the desklamp.\n", - "THOUGHT: The task is to look at statue under the desklamp, so i need to find the statue first and then find the desklamp and look at the statue under the light. I'll start my search on dresser 1.\n ACTION: go to dresser 1\n", + "ACTION: go to dresser 1\n", "On the dresser 1, you see a cellphone 3, a newspaper 2, a statue 1, and a television 1.\n", "ACTION: take statue 1 from dresser 1\n", "You pick up the statue 1 from the dresser 1.\n", diff --git a/src/server/tasks/alfworld/prompts/alfworld_multiturn_react.json b/src/server/tasks/alfworld/prompts/alfworld_multiturn_react.json index d390d2ed..c5c92c4f 100644 --- a/src/server/tasks/alfworld/prompts/alfworld_multiturn_react.json +++ b/src/server/tasks/alfworld/prompts/alfworld_multiturn_react.json @@ -1,31 +1,31 @@ { "put": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a countertop 1, a garbagecan 1, a handtowelholder 2, a handtowelholder 1, a sinkbasin 2, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: put some spraybottle on toilet.\n", - "THOUGHT: The task is to put some spraybottle on toilet, so first i need to search the room for some spraybottle. After finding the spraybottle, i need to take it to the toilet. I wil start my search on cabinets.\n ACTION: go to cabinet 1\n", + "ACTION: go to cabinet 1\n", "On the cabinet 1, you see a cloth 1, a soapbar 1, a soapbottle 1.\n", "ACTION: go to cabinet 2\n", "The cabinet 2 is closed.\n", "ACTION: open cabinet 2\n", "You open the cabinet 2. The cabinet 2 is open. In it, you see a candle 1, and a spraybottle 2.\n", - "THOUGHT: I have found a spraybottle 2. To put it on toilet, i need to take it with me and go to the toilet.\n ACTION: take spraybottle 2 from cabinet 2\n", + "ACTION: take spraybottle 2 from cabinet 2\n", "You pick up the spraybottle 2 from the cabinet 2.\n", "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbottle 2.\n", - "THOUGHT: Since the toilet can hold many things, just put the spraybottle on the toilet.\n ACTION: put spraybottle 2 in/on toilet 1\n", + "ACTION: put spraybottle 2 in/on toilet 1\n", "You put the spraybottle 2 in/on the toilet 1.\n", "ACTION: Task succeeded.\n" ], "clean": [ "You are in the middle of a room. Looking quickly around you, you see a bathtubbasin 1, a garbagecan 1, a handtowelholder 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1.\nYour task is to: clean some soapbar and put it in toilet.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet, so i need to first find some soapbar, and clean it in a sinkbasin. Soapbar is likely to be found in toilet, so i'll start to search there.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbar 4, and a soapbar 3.\n", "ACTION: take soapbar 4 from toilet 1\n", "You pick up the soapbar 4 from the toilet 1.\n", - "THOUGHT: I have taken soapbar 4 with me, the next step is to clean it, so i need to go to the sinkbasin.\n ACTION: go to sinkbasin 1\n", + "ACTION: go to sinkbasin 1\n", "On the sinkbasin 1, you see nothing.\n", "ACTION: clean soapbar 4 with sinkbasin 1\n", "You clean the soapbar 4 using the sinkbasin 1.\n", - "THOUGHT: The task is to clean some soapbar and put it in toilet. I have cleaned soapbar 4, then i need to put it in the toilet, so i need to go to the toilet now.\n ACTION: go to toilet 1\n", + "ACTION: go to toilet 1\n", "On the toilet 1, you see a soapbar 3.\n", "ACTION: put soapbar 4 in/on toilet 1\n", "You put the soapbar 4 in/on the toilet 1.\n", @@ -33,15 +33,15 @@ ], "heat": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 1, a diningtable 1, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a shelf 3, a shelf 2, a shelf 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: put a hot apple in fridge.\n", - "THOUGHT: The task is to put a hot apple in fridge. So i need to first find an apple and heat it, i'll start my search on diningtables.\n ACTION: go to diningtable 1\n", + "ACTION: go to diningtable 1\n", "On the diningtable 1, you see a apple 1, a bread 1, a fork 3, a fork 2, a fork 1, a mug 2, a peppershaker 3, a plate 2, a pot 1, a soapbottle 3, a spatula 1, a spoon 3, a spoon 2, a spoon 1, a winebottle 3, and a winebottle 2.\n", "ACTION: take apple 1 from diningtable 1\n", "You pick up the apple 1 from the diningtable 1.\n", - "THOUGHT: I noticed that there is a mivrowave 1 in the room, i will use it to heat the apple.\n ACTION: go to microwave 1\n", + "ACTION: go to microwave 1\n", "The microwave 1 is closed.\n", "ACTION: heat apple 1 with microwave 1\n", "You heat the apple 1 using the microwave 1.\n", - "THOUGHT: The apple is heated and i will take it to the fridge and put it in the fridge.\n ACTION: go to fridge 1\n", + "ACTION: go to fridge 1\n", "The fridge 1 is open. In it, you see a cup 1, and a egg 1.\n", "ACTION: put apple 1 in/on fridge 1\n", "You put the apple 1 in/on the fridge 1.\n", @@ -49,7 +49,7 @@ ], "cool": [ "You are in the middle of a room. Looking quickly around you, you see a cabinet 16, a cabinet 15, a cabinet 14, a cabinet 13, a cabinet 12, a cabinet 11, a cabinet 10, a cabinet 9, a cabinet 8, a cabinet 7, a cabinet 6, a cabinet 5, a cabinet 4, a cabinet 3, a cabinet 2, a cabinet 1, a coffeemachine 1, a countertop 2, a countertop 1, a diningtable 1, a drawer 5, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a fridge 1, a garbagecan 1, a microwave 1, a safe 1, a sinkbasin 1, a stoveburner 4, a stoveburner 3, a stoveburner 2, a stoveburner 1, and a toaster 1.\nYour task is to: cool some pan and put it in stoveburner.\n", - "THOUGHT: The task is to cool some pan and put it in stoveburner, so i need to first find a pan and cool it. A pan is likely to be found on a stoveburner, so i plan to search all the stoveburners.\n ACTION: go to stoveburner 1\n", + "ACTION: go to stoveburner 1\n", "On the stoveburner 1, you see nothing.\n", "ACTION: go to stoveburner 2\n", "On the stoveburner 2, you see a pot 1.\n", @@ -57,11 +57,11 @@ "On the stoveburner 3, you see a pan 1.\n", "ACTION: take pan 1 from stoveburner 3\n", "You pick up the pan 1 from the stoveburner 3.\n", - "THOUGHT: Now i have taken the pan 1 with me and i want to cool it using a fridge.\n ACTION: go to fridge 1\n", + "ACTION: go to fridge 1\n", "The fridge 1 is closed.\n", "ACTION: cool pan 1 with fridge 1\n", "You cool the pan 1 using the fridge 1.\n", - "THOUGHT: The pan 1 is cooled, then i need to return the cooled pan 1 to a stoveburner and put it on the stoveburner.\n ACTION: go to stoveburner 1\n", + "ACTION: go to stoveburner 1\n", "On the stoveburner 1, you see nothing.\n", "ACTION: put pan 1 in/on stoveburner 1\n", "You put the pan 1 in/on the stoveburner 1.\n", @@ -69,7 +69,7 @@ ], "puttwo": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: put two cellphone in sofa.\n", - "THOUGHT: The task is to put two cellphone in sofa, so i need to first find a cellphone and put it on sofa. I'll start my search on coffeetables.\n ACTION: go to coffeetable 1\n", + "ACTION: go to coffeetable 1\n", "On the coffeetable 1, you see a box 1, a cellphone 3, and a plate 1.\n", "ACTION: take cellphone 3 from coffeetable 1\n", "You pick up the cellphone 3 from the coffeetable 1.\n", @@ -77,7 +77,7 @@ "On the sofa 1, you see a newspaper 2, a pillow 1, a remotecontrol 2, and a remotecontrol 1.\n", "ACTION: put cellphone 3 in/on sofa 1\n", "You put the cellphone 3 in/on the sofa 1.\n", - "THOUGHT: In order to put two cellphones in sofa, i need to search for another phone, i'll start my search on diningtables.\n ACTION: go to diningtable 1\n", + "ACTION: go to diningtable 1\n", "On the diningtable 1, you see a cellphone 2, a keychain 2, a laptop 1, a statue 2, and a statue 1.\n", "ACTION: take cellphone 2 from diningtable 1\n", "You pick up the cellphone 2 from the diningtable 1.\n", @@ -86,14 +86,14 @@ "ACTION: put cellphone 2 in/on sofa 1\n", "You put the cellphone 2 in/on the sofa 1.\n", "ACTION: Task succeeded.\n" - ], + ], "examine": [ "You are in the middle of a room. Looking quickly around you, you see a coffeetable 1, a diningtable 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a sidetable 2, a sidetable 1, and a sofa 1.\nYour task is to: look at statue under the desklamp.\n", - "THOUGHT: The task is to look at statue under the desklamp, so i need to find the statue first and then find the desklamp and look at the statue under the light. I'll start my search on dresser 1.\n ACTION: go to dresser 1\n", + "ACTION: go to dresser 1\n", "On the dresser 1, you see a cellphone 3, a newspaper 2, a statue 1, and a television 1.\n", "ACTION: take statue 1 from dresser 1\n", "You pick up the statue 1 from the dresser 1.\n", - "THOUGHT: I have taken the statue with me and i need to find a desklamp now. I'll start my search on sidetable 1.\n ACTION: go to sidetable 1\n", + "ACTION: go to sidetable 1\n", "On the sidetable 1, you see nothing.\n", "ACTION: go to sidetable 2\n", "On the sidetable 2, you see a desklamp 3, a newspaper 1, and a statue 2.\n", diff --git a/src/server/tasks/alfworld/task.py b/src/server/tasks/alfworld/task.py index 40d10168..3c32b8ef 100644 --- a/src/server/tasks/alfworld/task.py +++ b/src/server/tasks/alfworld/task.py @@ -126,7 +126,7 @@ def release(self): @staticmethod def get_task_instruction(): # return "Interact with a household to solve a task. Imagine you are an intelligent agent in a household environment and your target is to perform actions to complete the task goal. In the beginning of your interactions, you will be given the detailed description of the current environment and your goal to accomplish. For each of your turn, you should choose from two actions: \"THOUGHT\" or \"ACTION\". If you choose \"THOUGHT\", you should first think about the current condition and plan for your future actions, and then output your action in this turn. Your output must strictly follow this format:\"THOUGHT: your thoughts.\n ACTION: your next action\n\"; If you choose \"ACTION\", you should directly output the action in this turn. Your output must strictly follow this format:\"ACTION: your next action\n\". After your each turn, the environment will give you immediate feedback based on which you plan your next few steps. if the envrionment output \"Nothing happened\", that means the previous action is invalid and you should try more options.\n\n" - return "Interact with a household to solve a task. Imagine you are an intelligent agent in a household environment and your target is to perform actions to complete the task goal. At the beginning of your interactions, you will be given the detailed description of the current environment and your goal to accomplish. For each of your turn, you will be given a list of actions which you can choose one to perform in this turn. You should choose from two actions: \"THOUGHT\" or \"ACTION\". If you choose \"THOUGHT\", you should first think about the current condition and plan for your future actions, and then output your action in this turn. Your output must strictly follow this format:\"THOUGHT: your thoughts.\n ACTION: your next action\n\"; If you choose \"ACTION\", you should directly output the action in this turn. Your output must strictly follow this format:\"ACTION: your next action\n\". After your each turn, the environment will give you immediate feedback based on which you plan your next few steps. if the environment output \"Nothing happened\", that means the previous action is invalid and you should try more options.\n Reminder: \n1. the action must be chosen from the given available actions. Any actions except provided available actions will be regarded as illegal. \n2. Think when necessary, try to act directly more in the process.\n\n" + return "Interact with a household to solve a task. Imagine you are an intelligent agent in a household environment and your target is to perform actions to complete the task goal. At the beginning of your interactions, you will be given the detailed description of the current environment and your goal to accomplish. For each of your turn, you will be given a list of actions which you can choose one to perform in this turn. You should directly output the action in this turn. Your output must strictly follow this format:\"ACTION: your next action\n\". After your each turn, the environment will give you immediate feedback based on which you plan your next few steps. if the environment output \"Nothing happened\", that means the previous action is invalid and you should try more options.\n Reminder: \n1. the action must be chosen from the given available actions. Any actions except provided available actions will be regarded as illegal. \n2. Try to act directly more in the process.\n\n" def get_prompt(self, filename: str): # return [] diff --git a/src/server/tasks/os_interaction/task.py b/src/server/tasks/os_interaction/task.py index c4508ce1..28e990ef 100644 --- a/src/server/tasks/os_interaction/task.py +++ b/src/server/tasks/os_interaction/task.py @@ -163,9 +163,7 @@ def get_evaluation_content(self): {"role": "user", "content": 'tell me how many files are in the directory "/etc"?'}, { "role": "agent", - "content": """Think: To count the files in /etc, I need to print all the files in it. - -Act: bash + "content": """Act: bash ```bash ls /etc @@ -178,9 +176,7 @@ def get_evaluation_content(self): }, { "role": "agent", - "content": """Think: The output has been truncated because it is too long, so I need to count files by script directly. - -Act: bash + "content": """Act: bash ```bash ls -1 /etc | wc -l @@ -189,9 +185,7 @@ def get_evaluation_content(self): {"role": "user", "content": "The output of the OS:\n220"}, { "role": "agent", - "content": """Think: Now I get the answer, it is 220. - -Act: answer(220)""", + "content": """Act: answer(220)""", }, ] @@ -336,13 +330,13 @@ def get_indices(self) -> List[Any]: return list(self.problem_configs.keys()) def extract_action(self, raw: str): - think_pattern = r"Think:\s*(.+)" + #think_pattern = r"Think:\s*(.+)" act_pattern = r"Act:\s*(.+)" - think = re.findall(think_pattern, raw) + #think = re.findall(think_pattern, raw) act = re.findall(act_pattern, raw) - ret = {"thought": "\n".join(think), "action": None, "content": None} + ret = {"action": None, "content": None} # reversly iterate over the action list for action in act[::-1]: @@ -427,28 +421,19 @@ async def _judge( session.inject( { "role": "user", - "content": """You are an assistant that will act like a person, I'will play the role of linux(ubuntu) operating system. Your goal is to implement the operations required by me or answer to the question proposed by me. For each of your turn, you should first think what you should do, and then take exact one of the three actions: "bash", "finish" or "answer". - -1. If you think you should execute some bash code, take bash action, and you should print like this: - -Think: put your thought here. + "content": """You are an assistant that will act like a person, I'will play the role of linux(ubuntu) operating system. Your goal is to implement the operations required by me or answer to the question proposed by me. For each of your turn, you should take exact one of the three actions: "bash", "finish" or "answer". +1. If you should execute some bash code, take bash action, and you should print like this: Act: bash ```bash # put your bash code here ``` -2. If you think you have finished the task, take finish action, and you should print like this: - -Think: put your thought here. - +2. If you have finished the task, take finish action, and you should print like this: Act: finish -3. If you think you have got the answer to the question, take answer action, and you should print like this: - -Think: put your thought here. - +3. If you have got the answer to the question, take answer action, and you should print like this: Act: answer(Your answer to the question should be put in this pair of parentheses) If the output is too long, I will truncate it. The truncated output is not complete. You have to deal with the truncating problem by yourself. Attention, your bash code should not contain any input operation. Once again, you should take only exact one of the three actions in each turn.\n\n""",