Potential improvement by "thinking harder"
I just thought of something. Sometimes errors like:
025-03-16 23:14:08.001 | INFO | app.agent.toolcall:act:138 - Tool 'python_execute' completed its mission! Result: Observed output of cmd python_execute executed: {'observation': 'unterminated string literal (detected at line 5) (, line 5)', 'success': False}
Might turn up because of malformed code, and sometimes the prompts give same result as before and so on. One way to deal with bad results is often just to tell the LLM to think harder, perhaps that is a potential way to deal with such issues?`
Catch certain errors and issues like that and then just insert a "think harder" and maybe mention the error or something. Might this be a worthwhile approach? Any thoughts about it?
Source: FoundationAgents/OpenManus