AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Auto-gpt tries to write file with invalid name and content

Open villesau opened this issue 1 year ago • 6 comments

Duplicates

  • [X] I have searched the existing issues

Steps to reproduce 🕹

  1. write a prompt that requires to write stuff to file
  2. following command is generated: NEXT ACTION: COMMAND = write_to_file ARGUMENTS = {'file': '<file_name>', 'text': '<information>'}
  • Note that the file it tries to write is actually <file_name> (i validated this from the disk) and the information written is actually <information> (i validated this from the written file)

Thus, no actual information is stored.

Current behavior 😯

writing to file results in weird file name and no actual information to be stored in the file, only placeholders.

Expected behavior 🤔

The actual information should be stored with proper file name.

Your prompt 📝

# Paste your prompt here

villesau avatar Apr 16 '23 13:04 villesau

The command is generated by the language model, which is supposed to fill in the blanks. If it doesn't that isn't necessarily a problem with Auto-GPT.

Pwuts avatar Apr 16 '23 14:04 Pwuts

I'm not sure about the architecture of auto-gpt, but maybe that could be sorted out by adjusting the prompt to clarify things about filling in the blanks?

villesau avatar Apr 16 '23 14:04 villesau

If you think about the way this is worded "write a prompt that requires to write stuff to file"

write a prompt -> respond to me with a template (you are asking it for the prompt, not to use the prompt) that requires -> me, the human to do something (you are telling it you want to fill it in) to write stuff to file -> to fill in a prompt that makes a file

So your wording choice is probably just poor, because it can be translated into exactly what it did

Saying something like this would probably work a lot better: Create a file for me. Pick the file name, and something to put into the file.

The issue might be that it doesn't know how to show the prompt, without accidentally executing it. I don't think it wanted to run the prompt in this case. Maybe it needs to be taught how to escape prompts, so it can show them

wrexbe avatar Apr 16 '23 15:04 wrexbe

I actually never asked auto-gpt to write files, it decided to do so independently, probably for caching purposes or something.

I think this only happens on master, not on stable.

villesau avatar Apr 16 '23 15:04 villesau

Okay so it gave itself a bad command then?

wrexbe avatar Apr 16 '23 15:04 wrexbe

I guess that's the case. But in my case it did that every time, not just occasionally.

villesau avatar Apr 16 '23 16:04 villesau

LLMs don't provide clean data. Neither does anything with greater complexity than a pocket calculator. Even then half a cupcake gets wedged in the buttons somehow. Never assume you're getting a clean file name from anything or anyone. Especially your mother. It has to be checked. Everything has to be verified because this entire planet is completely diseased. From a data standpoint.

"Did You Fall Down And Smack Your Little Head On The Pavement?" - Cassandra Priestley

omphos avatar Apr 18 '23 13:04 omphos

Closing as this is just the GPT outputting bad commands, nothing we can do about that directly. If anyone has proposals for more effective prompts, please create a separate issue or PR for that.

Pwuts avatar Apr 18 '23 15:04 Pwuts