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

Hello,

When using crewai create… it normally create a config file where the tasks and agents are configured in yaml file. Do anyone knows if this approach introduces differences in terms of performance or any other in crews output?

I’m currently using both in different project.

Approach #1:

A class agents and a A class tasks, instantiated inside the crew file.

Approach #2:

A config folder with two yaml files agents and tasks with are instantiated inside the crew file.

Did anyone found any advantage in new format?

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