Is there a performance difference between the YAML vs. non-YAML approach?

No differences in performance due to YAML vs. no-YAML approach. However, if you run identical code multiple times, the final output might be different just because of LLMs being non-deterministic (i.e., producing different outputs for the same input under identical conditions). So, if you see difference, it’s due to the nature of LLMs.

All in all, I recommend you choose the YAML approach. As stated in the docs:

Using YAML configuration provides a cleaner, more maintainable way to define agents. We strongly recommend using this approach in your CrewAI projects.

1 Like