langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Custom Agent Repeats same thought

Open alexprice12 opened this issue 2 years ago • 1 comments

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?

alexprice12 avatar Feb 13 '23 02:02 alexprice12

Can you try setting max iterations to something like 2?

max_iterations=2

conceptofmind avatar Feb 13 '23 06:02 conceptofmind

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!

dosubot[bot] avatar Aug 19 '23 16:08 dosubot[bot]

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!

dosubot[bot] avatar Aug 19 '23 16:08 dosubot[bot]