![]() |
https://www.pexels.com/photo/a-man-with-a-mustache-in-white-long-sleeves-7568794/ |
In the previous few blogs, we succinctly look at the different AutoGen orchestrators. In this blog, we compare them, essentially looking that number of turns needed to complete a simple task, and the number of token usages.
The code is in this repo. Below are the results of sample successful runs
SelectorGroupChat
```json { "account_id": "789", "saving_balance": 30000.3, "investment_balance": 300000.3, "total_balance": 330000.6 } ``` TERMINATE Stop reason: Text 'TERMINATE' mentioned Agent Name Prompt Tokens Completion Tokens -------------------- --------------- ------------------- saving_account_agent 99 32 account_agent 102 12 saving_account_agent 146 19 customer_agent 254 36 investment_agent 202 20 customer_agent 308 51
Round Robin Orchestrator
It went a few turns before landed with a solution. We can see that the number of tokens in prompts grow over time.
```json { "account_id": "123", "saving_balance": 10000.1, "investment_balance": 100000.1, "total_balance": 110000.2 } ``` TERMINATE Stop reason: Text 'TERMINATE' mentioned Agent Name Prompt Tokens Completion Tokens -------------------- --------------- ------------------- customer_agent 195 9 account_agent 79 12 saving_account_agent 123 19 investment_agent 136 39 customer_agent 276 9 account_agent 178 30 saving_account_agent 230 31 investment_agent 243 20 customer_agent 349 51
Swarm
When we are not careful with Swarm, We can end up like this. many turns and a lot of token used.
```json { "account_id": "456", "saving_balance": 20000.2, "investment_balance": 200000.2, "total_balance": 220000.4 } ``` TERMINATE Stop reason: Text 'TERMINATE' mentioned Agent Name Prompt Tokens Completion Tokens -------------------- --------------- ------------------- customer_agent 243 45 account_agent 99 43 customer_agent 378 12 account_agent 193 32 account_agent 231 12 customer_agent 474 14 saving_account_agent 283 19 saving_account_agent 321 33 saving_account_agent 361 28 investment_agent 355 20 investment_agent 394 36 investment_agent 436 19 investment_agent 461 12 investment_agent 479 12 investment_agent 497 17 investment_agent 520 23 investment_agent 549 15 investment_agent 570 16 investment_agent 592 17 investment_agent 615 12 investment_agent 633 13 investment_agent 652 32 investment_agent 690 55 investment_agent 781 51 investment_agent 838 44 investment_agent 888 52 investment_agent 965 20 investment_agent 1004 20 investment_agent 1043 36 investment_agent 1085 15 investment_agent 1106 19 investment_agent 1131 16 investment_agent 1153 12 investment_agent 1171 17 investment_agent 1194 12 investment_agent 1212 17 investment_agent 1235 50 customer_agent 1316 52
Comments
Post a Comment