AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

AgentGPT execute tasks recursively (And fails to complete the task of giving the current date)

Open Fox2Code opened this issue 2 years ago • 3 comments

Name: DateGPT Goal: Give the current date Logs:

Embarking on a new goal:Give the current date
Thinking...(Restart if this takes more than 30 seconds)
Added task:Retrieve the current date from system clock
Added task:Format date as a string
Added task:Return date string as output
Thinking...(Restart if this takes more than 30 seconds)
Executing "Retrieve the current date from system clock"Executing task: Retrieve the current date from system clock Response: Today's date is [insert current date here].
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date as a string
Added task:Execute task: Return date string as output
Thinking...(Restart if this takes more than 30 seconds)
Executing "Format date as a string"The current date is September 28, 2021.
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Return date string as output
Thinking...(Restart if this takes more than 30 seconds)
Executing "Return date string as output"Today's date is October 20, 2021.
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date as a string
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Format date as a string"Executing task: Format date as a string. Today's date is: July 28, 2021. Returning response as a string: "July 28, 2021".
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Return date and time string as output
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Return date string as output"Sure, the current date is [insert current date here].
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date as a string
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Return date string as output"As an AI language model, I do not have access to real-time data or system clock. However, if I am to provide a sample output, it would be something like: "Today is August 25, 2021."
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date and time as a string
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Format date as a string"Executing task: Format date as a string. The current date is: August 3, 2021. String formatted date: 08/03/2021 Returning formatted date as a string.
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Return date and time string as output
Added task:Execute task: Format date and time as a string
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Return date and time string as output"Sure, I can help with that! The current date and time is [insert current date and time here].
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date as a string
Added task:Execute task: Format date and time as a string
Thinking...(Restart if this takes more than 30 seconds)
Executing "Execute task: Format date as a string"Task response: Today's date is: 2021-10-17
Thinking...(Restart if this takes more than 30 seconds)
Added task:Execute task: Format date and time as a string
Added task:Execute task: Return date and time string as output
Added task:Execute task: Format date and time as a string
Added task:Execute task: Format date and time as a string
We're sorry, because this is a demo, we cannot have our agents running for too long. Shutting down.

This looks pretty stupid, especially the "Execute task: Format date as a string" part that seems the AI got stuck on.

Fox2Code avatar Apr 10 '23 13:04 Fox2Code

I though about a way to fix it, detecting when the AI loop on the same task like this should be possible to detect.

Then when we detect that we could ask ChatGPT to reformulate the task for ChatGPT, and add the reformulated task instead, if the reformulation still end up in a loop we can just stop the AI or ignore adding the task back.

Fox2Code avatar Apr 10 '23 13:04 Fox2Code

Hi! So the problem is the agents don't have long term memory. They dont know about executed tasks beyond the last executed one and then they get stuck in unproductive loops. We are gong to implement vector DB integration so that should solve this problem. However we do have other issues in the list and would appreciate if you could look into those!

Srijan-Subedi avatar Apr 10 '23 21:04 Srijan-Subedi

Hey, looks awesome. So does that mean they get stuck in unproductive loops for all tasks right now?

samshapley avatar Apr 11 '23 21:04 samshapley

Hello, @Fox2Code @samshapley have you recently tried agentgpt?? if so have you noticed any changes to this behavior, currently our dev team is working on implementing vectorDBs like pinecone to combat these problems

jasangill1 avatar Jun 27 '23 21:06 jasangill1

Hello @Fox2Code @samshapley due to inactivity, please feel free to reopen if this is still happening !!!

jasangill1 avatar Jun 29 '23 21:06 jasangill1