MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.4k stars 493 forks source link

"No functions found" errors are not fed back to the prompt. #21

Closed Ellen7ions closed 1 year ago

Ellen7ions commented 1 year ago
****Action Agent ai message****
Plan:
1) Check if there are 3 raw beef in the inventory. If not, explore until find a cow and kill it to get raw beef.
2) Check if there is a furnace in the inventory. If not, craft one using 8 cobblestones.
3) Place the furnace near the player.
4) Open the furnace menu.
5) Put 3 raw beef in the top slot of the furnace.
6) Put a fuel source, such as coal or wood, in the bottom slot of the furnace.
7) Wait for the beef to cook. It should take about 10 seconds.
8) Once the beef is cooked, it will appear in the bottom slot of the furnace. Take it out and put it in the inventory.

Code:
```javascript
async
****Recorder message: 3790 ticks have elapsed****
****Recorder message: 106 iteration passed****
Error parsing action response (before program execution): No functions found Trying again!

I noticed that the code generated by GPT has been reviewed by the Action agent first, but when there are errors in the code, they cannot be fed back to the prompt, resulting in the same error in the following code.

For example, the above code has an error of "No functions found", the attribute "Execution error" of following prompt is No error

Is it a bug ?

****Action Agent human message****
Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: forest

Time: night
go-maple commented 1 year ago

bro, Which gpt do you used in MC, gpt4 or gpt3.5?

Ellen7ions commented 1 year ago

I'm using gpt3.5. Is it caused by the poor code generation ability of GPT3.5?

Ellen7ions commented 1 year ago

This may be caused by GPT3.5, which cannot produce very long results at a time.

go-maple commented 1 year ago

@Ellen7ions Yes,I think so, that the reason you can't generate ability. May I ask you other question?

go-maple commented 1 year ago

Do you have any social tool? Discord?

Ellen7ions commented 1 year ago

yeah, Nohtyp at Discord

xieleo5 commented 1 year ago

It's highly recommended to use GPT-4. I just updated a section in FAQ. If you really want to use GPT-3.5, you can set skill_manager_retrieval_top_k=0 to reduce context length.