langchain
langchain copied to clipboard
Custom Agent Repeats same thought
Looking at this example, the CustomAgent repeats the same thought "I should look for the population of Canada." endlessly.
I tried to fix this by adding the instruction "Memorize the Obersavation for each thought. Do not repeat the same thought." but that didn't work. Is this an issue with OpenAI or the ZeroShotAgent?
Can you try setting max iterations to something like 2?
max_iterations=2
Hi, @alexprice12! I'm helping the LangChain team manage their backlog and I wanted to let you know that we are marking this issue as stale.
From what I understand, you reported an issue with the CustomAgent in the provided example. You noticed that it was repeating the same thought and tried to fix it by adding an instruction, but it didn't work. conceptofmind suggested setting the max iterations to 2 as a possible solution.
I wanted to check with you if this issue is still relevant to the latest version of the LangChain repository. If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your contribution and please let us know if you have any further questions or concerns!
Hi, @alexprice12! I'm helping the LangChain team manage their backlog and I wanted to let you know that we are marking this issue as stale.
From what I understand, you reported an issue with the CustomAgent in the provided example. You noticed that it was repeating the same thought and tried to fix it by adding an instruction, but it didn't work. conceptofmind suggested setting the max iterations to 2 as a possible solution.
I wanted to check with you if this issue is still relevant to the latest version of the LangChain repository. If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your contribution and please let us know if you have any further questions or concerns!