Tried to both perform Action and give a Final Answer at the same time, I must do one or the other

Error parsing LLM output, agent will retry: I did it wrong. Tried to both perform Action and give a Final Answer at the same time, I must do one or the other

getting these in my logs , if any one can help

@Yash There can be two reasons:

  • Such an error can happen because of the LLM you’re using (source). Unfortunately, smaller LLMs sometimes struggle to work with CrewAI. Try to switch the LLM to a more capable one.
  • Such an error can happen because the task configuration is too long or strong (source), which changes some internal CrewAI keywords like action, thought, etc. Try to rephrase the task configuration.

@rokbenko i am using llama3-8b and also my task prompt are not too big and strict

Hi @Yash

Did you managed to solve your issue? Seems like whenever I try use Open Source Models from the small ones to Gemma2-27b the system runs too slow. And often I receive this error message.

Error parsing LLM output, agent will retry: I did it wrong.

Just as I mentioned above. :upside_down_face:

I understand what you just said. The point was to throw this request so that the developing team don’t solely focus on big models but optimize it as well for small models :man_facepalming:t6: :man_shrugging:t6:

1 Like

Having the same issue with llama3-8b, even with a tiny simple prompt, which works fine if I just post a request with it, but causes the endless cycle of I did it wrong. Invalid Format: I missed the 'Action:' after 'Thought:'. I will do right next, and don't use a tool I have already used. when using the model with crewAI.
If llama3-8b is considered too small, and errors like these are the expected behavior, then it would be nice to have it mentioned in the docs. But in the here in the docs I see the example with llama3.2 (11b as I can see). So is it supposed to work fine?

Since the documentation doesn’t provide official guidance on LLMs, the best approach is to test and observe the results. My guess is that the 11B version of Llama 3.2 should work.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.