Spaces:
Sleeping
Sleeping
File size: 70,514 Bytes
1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 5912687 1f814f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 |
import marimo
__generated_with = "0.11.26"
app = marimo.App(width="full")
@app.cell
def _():
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import altair as alt
return alt, np, pd, plt, sns
@app.cell
def _(platforms_data):
# Complete the platform data with GC AI, Notebook LM, and Vecflow
platforms_data.update(
{
'GC AI': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 40},
{'metric': 'Helpfulness (Arthur)', 'value': 1.4 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 0.5 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.8 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.0 * 50},
],
'performance': [
{'task': 'Task #6', 'arthur': 6, 'anna': 0},
{'task': 'Task #13', 'arthur': 0, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 0, 'anna': 0},
{'task': 'Task #20', 'arthur': 6, 'anna': 0},
],
'strengths': [
'Good adequate length rating from Arthur',
'Decent pass rate from Arthur (60%)',
'Solid helpfulness score from Arthur',
],
'weaknesses': [
'Lowest helpfulness rating from Anna (0.5/2.0)',
'Largest discrepancy between evaluators',
'Lower pass rate from Anna (40%)',
],
},
'Notebook LM': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 60},
{'metric': 'Helpfulness (Arthur)', 'value': 0.8 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 1.2 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.6 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 2.0 * 50},
],
'performance': [
{'task': 'Task #3', 'arthur': 6, 'anna': 0},
{'task': 'Task #6', 'arthur': 0, 'anna': 0},
{'task': 'Task #11', 'arthur': 0, 'anna': 6},
{'task': 'Task #13', 'arthur': 6, 'anna': 6},
{'task': 'Task #15', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 6, 'anna': 6},
],
'strengths': [
'Perfect agreement between Arthur and Anna on pass/fail',
'Highest adequate length rating from Anna (2.0/2.0)',
'Consistent pass rate between evaluators (60%)',
],
'weaknesses': [
'Lower helpfulness rating from Arthur (0.8/2.0)',
'Mixed performance in specific tasks',
],
},
'Vecflow': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 40},
{'metric': 'Helpfulness (Arthur)', 'value': 0.6 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 0.6 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.8 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.4 * 50},
],
'performance': [
{'task': 'Task #11', 'arthur': 0, 'anna': 6},
{'task': 'Task #13', 'arthur': 6, 'anna': 0},
{'task': 'Task #15', 'arthur': 6, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 0, 'anna': 0},
],
'strengths': [
'Perfect agreement on helpfulness between evaluators',
'Strong adequate length scores from both evaluators',
'Good performance in specialized tasks',
],
'weaknesses': [
'Lowest helpfulness rating overall (0.6/2.0)',
'Lower pass rate from Anna (40%)',
'Inconsistent evaluation on complex tasks',
],
},
}
)
return
@app.cell
def _():
# Platform data
platforms_data = {
'Chat GPT': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 100},
{'metric': 'Pass Rate (Anna)', 'value': 40},
{'metric': 'Helpfulness (Arthur)', 'value': 1.5 * 50}, # Scaling to 0-100
{'metric': 'Helpfulness (Anna)', 'value': 1.25 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.75 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.25 * 50},
],
'performance': [{'task': 'Task #1', 'arthur': 6, 'anna': 0}, {'task': 'Task #3', 'arthur': 6, 'anna': 0}],
'strengths': [
'High pass rate from Arthur (100%)',
'Strong helpfulness ratings from both evaluators',
'Good adequate length scores',
],
'weaknesses': ['Lower pass rate from Anna (40%)', 'Inconsistent evaluation between Arthur and Anna'],
},
'CoPilot': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 40},
{'metric': 'Pass Rate (Anna)', 'value': 60},
{'metric': 'Helpfulness (Arthur)', 'value': 1.0 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 1.33 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.2 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.33 * 50},
],
'performance': [
{'task': 'Task #1', 'arthur': 6, 'anna': 6},
{'task': 'Task #11', 'arthur': 0, 'anna': 6},
{'task': 'Task #15', 'arthur': 0, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 0},
{'task': 'Task #20', 'arthur': 0, 'anna': 6},
],
'strengths': [
'Balanced helpfulness scores from both evaluators',
'Consistent adequate length ratings',
'Higher pass rate from Anna than from Arthur',
],
'weaknesses': ['Lower overall pass rates', 'Inconsistent evaluation between tasks', 'Below-average scores on complex tasks'],
},
'DeepSeek': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 75},
{'metric': 'Pass Rate (Anna)', 'value': 100},
{'metric': 'Helpfulness (Arthur)', 'value': 1.33 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 2.0 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 2.0 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.67 * 50},
],
'performance': [
{'task': 'Task #11', 'arthur': 6, 'anna': 6},
{'task': 'Task #13', 'arthur': 6, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 0, 'anna': 6},
],
'strengths': [
'Perfect pass rate from Anna (100%)',
'Highest helpfulness rating from Anna (2.0/2.0)',
'Highest adequate length rating from Arthur (2.0/2.0)',
'Strong overall performance across metrics',
],
'weaknesses': ['Some inconsistency between evaluators', 'Lower pass rate from Arthur compared to Anna'],
},
}
return (platforms_data,)
@app.cell
def _(platforms_data):
# Complete the platform data with GC AI, Notebook LM, and Vecflow
platforms_data.update(
{
'GC AI': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 40},
{'metric': 'Helpfulness (Arthur)', 'value': 1.4 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 0.5 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.8 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.0 * 50},
],
'performance': [
{'task': 'Task #6', 'arthur': 6, 'anna': 0},
{'task': 'Task #13', 'arthur': 0, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 0, 'anna': 0},
{'task': 'Task #20', 'arthur': 6, 'anna': 0},
],
'strengths': [
'Good adequate length rating from Arthur',
'Decent pass rate from Arthur (60%)',
'Solid helpfulness score from Arthur',
],
'weaknesses': [
'Lowest helpfulness rating from Anna (0.5/2.0)',
'Largest discrepancy between evaluators',
'Lower pass rate from Anna (40%)',
],
},
'Notebook LM': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 60},
{'metric': 'Helpfulness (Arthur)', 'value': 0.8 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 1.2 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.6 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 2.0 * 50},
],
'performance': [
{'task': 'Task #3', 'arthur': 6, 'anna': 0},
{'task': 'Task #6', 'arthur': 0, 'anna': 0},
{'task': 'Task #11', 'arthur': 0, 'anna': 6},
{'task': 'Task #13', 'arthur': 6, 'anna': 6},
{'task': 'Task #15', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 6, 'anna': 6},
],
'strengths': [
'Perfect agreement between Arthur and Anna on pass/fail',
'Highest adequate length rating from Anna (2.0/2.0)',
'Consistent pass rate between evaluators (60%)',
],
'weaknesses': [
'Lower helpfulness rating from Arthur (0.8/2.0)',
'Mixed performance in specific tasks',
],
},
'Vecflow': {
'metrics': [
{'metric': 'Pass Rate (Arthur)', 'value': 60},
{'metric': 'Pass Rate (Anna)', 'value': 40},
{'metric': 'Helpfulness (Arthur)', 'value': 0.6 * 50},
{'metric': 'Helpfulness (Anna)', 'value': 0.6 * 50},
{'metric': 'Adequate Length (Arthur)', 'value': 1.8 * 50},
{'metric': 'Adequate Length (Anna)', 'value': 1.4 * 50},
],
'performance': [
{'task': 'Task #11', 'arthur': 0, 'anna': 6},
{'task': 'Task #13', 'arthur': 6, 'anna': 0},
{'task': 'Task #15', 'arthur': 6, 'anna': 0},
{'task': 'Task #18', 'arthur': 6, 'anna': 6},
{'task': 'Task #19', 'arthur': 0, 'anna': 0},
],
'strengths': [
'Perfect agreement on helpfulness between evaluators',
'Strong adequate length scores from both evaluators',
'Good performance in specialized tasks',
],
'weaknesses': [
'Lowest helpfulness rating overall (0.6/2.0)',
'Lower pass rate from Anna (40%)',
'Inconsistent evaluation on complex tasks',
],
},
}
)
return
@app.cell
def _(pd):
# Task type data
task_type_data = pd.DataFrame(
[
{'name': 'Simple Extraction', 'arthur': 80, 'anna': 70},
{'name': 'Complex Analysis', 'arthur': 65, 'anna': 60},
{'name': 'Regulatory/Legal', 'arthur': 50, 'anna': 40},
{'name': 'Identification', 'arthur': 90, 'anna': 75},
{'name': 'Summarization', 'arthur': 70, 'anna': 65},
]
)
# Platform performance over time data
trend_data = {
'Chat GPT': [
{'task': 1, 'arthur': 6, 'anna': 0},
{'task': 3, 'arthur': 6, 'anna': 0},
{'task': 11, 'arthur': 6, 'anna': 0},
{'task': 13, 'arthur': 6, 'anna': 6},
{'task': 18, 'arthur': 6, 'anna': 6},
],
'CoPilot': [
{'task': 1, 'arthur': 6, 'anna': 6},
{'task': 11, 'arthur': 0, 'anna': 6},
{'task': 15, 'arthur': 0, 'anna': 0},
{'task': 18, 'arthur': 6, 'anna': 0},
{'task': 20, 'arthur': 0, 'anna': 6},
],
'DeepSeek': [
{'task': 11, 'arthur': 6, 'anna': 6},
{'task': 13, 'arthur': 6, 'anna': 0},
{'task': 18, 'arthur': 6, 'anna': 6},
{'task': 19, 'arthur': 0, 'anna': 6},
],
'GC AI': [
{'task': 6, 'arthur': 6, 'anna': 0},
{'task': 13, 'arthur': 0, 'anna': 0},
{'task': 18, 'arthur': 6, 'anna': 6},
{'task': 19, 'arthur': 0, 'anna': 0},
{'task': 20, 'arthur': 6, 'anna': 0},
],
'Notebook LM': [
{'task': 3, 'arthur': 6, 'anna': 0},
{'task': 6, 'arthur': 0, 'anna': 0},
{'task': 11, 'arthur': 0, 'anna': 6},
{'task': 13, 'arthur': 6, 'anna': 6},
{'task': 15, 'arthur': 6, 'anna': 6},
{'task': 19, 'arthur': 6, 'anna': 6},
],
'Vecflow': [
{'task': 11, 'arthur': 0, 'anna': 6},
{'task': 13, 'arthur': 6, 'anna': 0},
{'task': 15, 'arthur': 6, 'anna': 0},
{'task': 18, 'arthur': 6, 'anna': 6},
{'task': 19, 'arthur': 0, 'anna': 0},
],
}
# Map pass/fail values to binary for plotting
mapped_trend_data = {}
for platform, data in trend_data.items():
mapped_trend_data[platform] = [
{'task': item['task'], 'arthur': 1 if item['arthur'] == 6 else 0, 'anna': 1 if item['anna'] == 6 else 0} for item in data
]
return data, mapped_trend_data, platform, task_type_data, trend_data
@app.cell
def _(alt, mapped_trend_data, pd):
def plot_task_performance_interactive(platform_name):
"""Create an interactive line chart for task performance"""
# Convert to DataFrame
data = pd.DataFrame(mapped_trend_data[platform_name])
# Melt the dataframe for Altair
data_melted = data.melt(id_vars=['task'], var_name='evaluator', value_name='result')
# Create a color scale
color_scale = alt.Scale(domain=['arthur', 'anna'], range=['#4c78a8', '#ff7f0e'])
# Create the chart
chart = (
alt.Chart(data_melted)
.mark_line(point=True)
.encode(
x=alt.X('task:N', title='Task Number'),
y=alt.Y(
'result:N', title='Result', scale=alt.Scale(domain=[0, 1]), axis=alt.Axis(labelExpr="datum.value === 0 ? 'Fail' : 'Pass'")
),
color=alt.Color('evaluator:N', title='Evaluator', scale=color_scale, legend=alt.Legend(title='Evaluator')),
tooltip=['task', 'evaluator', alt.Tooltip('result', title='Result', format='.0f', formatType='number')],
)
.transform_calculate(result_label="datum.result === 0 ? 'Fail' : 'Pass'")
.properties(width=500, height=300, title=f'{platform_name} Task Performance')
.configure_title(fontSize=20, anchor='start')
.configure_axis(labelFontSize=12, titleFontSize=14)
.configure_point(size=100)
.interactive()
)
return chart
return (plot_task_performance_interactive,)
@app.cell
def _(alt, task_type_data):
def plot_task_type_performance_interactive():
"""Create an interactive bar chart for task type performance"""
# Melt the dataframe for Altair
task_type_melted = task_type_data.melt(id_vars=['name'], var_name='evaluator', value_name='score')
# Create a color scale
color_scale = alt.Scale(domain=['arthur', 'anna'], range=['#4c78a8', '#ff7f0e'])
# Create the chart
chart = (
alt.Chart(task_type_melted)
.mark_bar()
.encode(
x=alt.X('name:N', title='Task Type', axis=alt.Axis(labelAngle=-45)),
y=alt.Y('score:Q', title='Average Score (%)'),
color=alt.Color('evaluator:N', title='Evaluator', scale=color_scale),
tooltip=['name', 'evaluator', alt.Tooltip('score', title='Score', format='.0f')],
)
.properties(width=600, height=400, title='Task Type Performance Analysis')
.configure_title(fontSize=20, anchor='start')
.configure_axis(labelFontSize=12, titleFontSize=14)
.interactive()
)
return chart
return (plot_task_type_performance_interactive,)
@app.cell
def _(
display_platform_evaluation,
platform_summary,
plot_platform_radar_interactive,
plot_task_performance_interactive,
):
def analyze_platform_interactive(platform_name='DeepSeek'):
"""Create a comprehensive interactive analysis for a single platform"""
from IPython.display import display, HTML, Markdown
# Display the platform name
display(Markdown(f'# AI Platform In-Depth Analysis: {platform_name}'))
# Create the radar chart for metrics
display(Markdown('## Performance Metrics'))
display(plot_platform_radar_interactive(platform_name))
# Show task performance
display(Markdown('## Task Performance'))
display(plot_task_performance_interactive(platform_name))
# Display strengths and weaknesses
display(Markdown('## Platform Evaluation'))
display_platform_evaluation(platform_name)
# Show platform summary
display(Markdown('## Platform Summary'))
platform_summary(platform_name)
return None
return (analyze_platform_interactive,)
@app.cell
def _(analyze_platform_interactive):
# Analyze Vecflow
analyze_platform_interactive('Vecflow')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze Vecflow
analyze_platform_interactive('Vecflow')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze Notebook LM
analyze_platform_interactive('Notebook LM')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze GC AI
analyze_platform_interactive('GC AI')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze CoPilot
analyze_platform_interactive('CoPilot')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze Chat GPT
analyze_platform_interactive('Chat GPT')
return
@app.cell
def _(analyze_platform_interactive):
# Analyze DeepSeek
analyze_platform_interactive('DeepSeek')
return
@app.cell
def _(compare_all_platforms_interactive):
# Compare all platforms
compare_all_platforms_interactive()
return
@app.cell
def _(
compare_platforms_interactive,
pd,
platforms_data,
plot_task_type_performance_interactive,
):
def compare_all_platforms_interactive():
"""Display interactive comparison of all platforms"""
from IPython.display import display, Markdown
# Display the title
display(Markdown('# AI Platform Comparison'))
# Show interactive comparison chart
display(Markdown('## Metrics Comparison'))
display(compare_platforms_interactive())
# Show task type performance
display(Markdown('## Task Type Performance'))
display(plot_task_type_performance_interactive())
# Overall rankings
display(Markdown('## Overall Platform Rankings'))
# Calculate average metrics for each platform
rankings = []
for platform, data in platforms_data.items():
avg_metrics = sum(metric['value'] for metric in data['metrics']) / len(data['metrics'])
rankings.append({'Platform': platform, 'Average Score': avg_metrics})
rankings_df = pd.DataFrame(rankings)
rankings_df.sort_values('Average Score', ascending=False, inplace=True)
# Create a DataFrame to display rankings
for i, (idx, row) in enumerate(rankings_df.iterrows(), 1):
print(f'{i}. {row["Platform"]} - Average Score: {row["Average Score"]:.2f}')
return None
return (compare_all_platforms_interactive,)
@app.cell
def _(alt, pd, platforms_data):
def compare_platforms_interactive():
"""Create an interactive chart for comparing all platforms"""
# Create a DataFrame with all platform metrics
metrics_comparison = []
for platform, data in platforms_data.items():
for metric in data['metrics']:
metrics_comparison.append({'Platform': platform, 'Metric': metric['metric'], 'Value': metric['value']})
comparison_df = pd.DataFrame(metrics_comparison)
# Create a grouped bar chart
chart = (
alt.Chart(comparison_df)
.mark_bar()
.encode(
x=alt.X('Platform:N', title='Platform'),
y=alt.Y('Value:Q', title='Score'),
color=alt.Color('Platform:N', legend=None),
column=alt.Column('Metric:N', title=None),
tooltip=['Platform', 'Metric', 'Value'],
)
.properties(width=100, title='Platform Metric Comparison')
.configure_title(fontSize=20, anchor='start')
.configure_axis(labelFontSize=12, titleFontSize=14)
.interactive()
)
return chart
return (compare_platforms_interactive,)
@app.cell
def _(alt, pd, platforms_data):
def plot_platform_radar_interactive(platform_name):
"""Create an interactive radar chart for platform metrics using Altair"""
# Get platform metrics data
metrics = platforms_data[platform_name]['metrics']
# Convert to long format for Altair
metrics_df = pd.DataFrame(metrics)
# Create the base chart
chart = (
alt.Chart(metrics_df)
.mark_line(point=True)
.encode(
x=alt.X('metric:N', title=None, sort=None),
y=alt.Y('value:Q', scale=alt.Scale(domain=[0, 100]), title='Score'),
color=alt.value('#4c78a8'),
tooltip=['metric', 'value'],
)
.properties(width=500, height=400, title=f'{platform_name} Performance Metrics')
.configure_title(fontSize=20, anchor='start')
.configure_axis(labelFontSize=12, titleFontSize=14)
.configure_point(size=100)
.interactive()
)
return chart
return (plot_platform_radar_interactive,)
@app.cell
def _(alt):
alt.renderers.enable('default')
return
@app.cell
def _(compare_all_platforms):
# Compare all platforms
compare_all_platforms()
return
@app.cell
def _(pd, platforms_data, plot_task_type_performance, plt):
def compare_all_platforms():
"""Display comparison of all platforms"""
# Create a DataFrame with all platform metrics for comparison
metrics_comparison = []
for platform, data in platforms_data.items():
# Extract metrics
platform_metrics = {metric['metric']: metric['value'] for metric in data['metrics']}
platform_metrics['Platform'] = platform
metrics_comparison.append(platform_metrics)
comparison_df = pd.DataFrame(metrics_comparison)
comparison_df.set_index('Platform', inplace=True)
# Display the comparison table
print('# AI Platform Comparison\n')
print('## Metrics Comparison')
print(comparison_df)
# Create a bar chart to compare platforms
plt.figure(figsize=(14, 8))
comparison_df.plot(kind='bar', figsize=(14, 8))
plt.title('Platform Metrics Comparison')
plt.xlabel('Platform')
plt.ylabel('Score')
plt.legend(title='Metrics', bbox_to_anchor=(1.05, 1), loc='upper left')
plt.tight_layout()
print('\n## Task Type Performance')
plot_task_type_performance()
# Overall rankings
print('\n## Overall Platform Rankings')
# Calculate average metrics for each platform
rankings = []
for platform, data in platforms_data.items():
avg_metrics = sum(metric['value'] for metric in data['metrics']) / len(data['metrics'])
rankings.append({'Platform': platform, 'Average Score': avg_metrics})
rankings_df = pd.DataFrame(rankings)
rankings_df.sort_values('Average Score', ascending=False, inplace=True)
# Display rankings
for i, (idx, row) in enumerate(rankings_df.iterrows(), 1):
print(f'{i}. {row["Platform"]} - Average Score: {row["Average Score"]:.2f}')
return plt.gca()
return (compare_all_platforms,)
@app.cell
def _(compare_all_platforms):
# Compare all platforms
compare_all_platforms()
return
@app.cell
def _(platforms_data):
def platform_summary(platform_name):
"""Display a summary of the platform performance"""
summaries = {
'DeepSeek': 'DeepSeek shows the strongest overall performance across both evaluators, with a perfect pass rate from Anna and high marks on both helpfulness and adequate length metrics. It consistently delivers high-quality responses across various task types.',
'Chat GPT': "Chat GPT performs excellently according to Arthur with a perfect pass rate, but shows inconsistency with Anna's evaluations. Its strengths lie in helpfulness and adequate response length, particularly in extraction and summarization tasks.",
'Notebook LM': 'Notebook LM demonstrates the highest level of evaluator agreement with identical pass rates from Arthur and Anna. It excels in adequate length ratings but scores lower on helpfulness metrics from Arthur.',
'CoPilot': 'CoPilot shows moderate performance across metrics with slightly higher ratings from Anna than Arthur. It maintains consistency in adequate length but struggles with more complex analysis tasks.',
'GC AI': 'GC AI exhibits the largest discrepancy between evaluator ratings, with Arthur giving significantly higher scores than Anna across all metrics. It performs well in adequate length according to Arthur but scores poorly in helpfulness from Anna.',
'Vecflow': 'Vecflow demonstrates perfect agreement on helpfulness ratings between evaluators, though these scores are the lowest across all platforms. It excels in adequate length metrics but shows inconsistent pass rates between evaluators.',
}
# Create tags for the platform
tags = []
metrics = platforms_data[platform_name]['metrics']
tags.append(f'📊 {platform_name}')
if metrics[0]['value'] >= 60:
tags.append('🟢 High Arthur Pass Rate')
if metrics[1]['value'] >= 60:
tags.append('🟢 High Anna Pass Rate')
if metrics[2]['value'] / 50 >= 1.3:
tags.append('🟣 Strong Helpfulness (Arthur)')
if metrics[3]['value'] / 50 >= 1.3:
tags.append('🟣 Strong Helpfulness (Anna)')
if metrics[4]['value'] / 50 >= 1.7:
tags.append('🔵 Excellent Length (Arthur)')
if metrics[5]['value'] / 50 >= 1.7:
tags.append('🔵 Excellent Length (Anna)')
if metrics[0]['value'] == metrics[1]['value']:
tags.append('🟡 Evaluator Agreement')
print(f'== {platform_name} Summary ==\n')
print(summaries[platform_name])
print('\nTags:')
print(' '.join(tags))
return None
return (platform_summary,)
@app.cell
def _(np, platforms_data, plt):
def plot_platform_radar(platform_name):
"""Create a radar chart for platform metrics with enhanced styling"""
metrics = platforms_data[platform_name]['metrics']
# Extract data
categories = [m['metric'] for m in metrics]
values = [m['value'] for m in metrics]
# Number of categories
N = len(categories)
# Create angle for each category
angles = [n / float(N) * 2 * np.pi for n in range(N)]
angles += angles[:1] # Close the loop
# Add the first value at the end to close the circle
values += values[:1]
# Create figure
fig, ax = plt.subplots(figsize=(10, 6), subplot_kw=dict(polar=True), facecolor='#f8f9fa')
# Draw the chart
ax.plot(angles, values, linewidth=2, linestyle='solid', label=platform_name, color='#8884d8')
ax.fill(angles, values, alpha=0.25, color='#8884d8')
# Set category labels
plt.xticks(angles[:-1], categories, size=10, fontweight='bold', color='#444444')
# Set y-axis limits
ax.set_ylim(0, 100)
# Add grid
ax.grid(color='#dddddd', linestyle='-', linewidth=0.5)
# Set background color for each level
ax.set_facecolor('#f8f9fa')
# Add title with platform-specific color
platform_colors = {
'DeepSeek': '#6b5b95',
'Chat GPT': '#3498db',
'CoPilot': '#f39c12',
'GC AI': '#1abc9c',
'Notebook LM': '#e74c3c',
'Vecflow': '#9b59b6',
}
color = platform_colors.get(platform_name, '#8884d8')
plt.title(f'{platform_name} Performance Metrics', size=16, fontweight='bold', color=color, pad=20)
# Add legend
plt.legend(loc='upper right', bbox_to_anchor=(0.1, 0.1), frameon=True, facecolor='white', edgecolor='#dddddd')
plt.tight_layout()
return plt.gca()
return (plot_platform_radar,)
@app.cell
def _(mapped_trend_data, pd, plt, sns):
def plot_task_performance(platform_name):
"""Create an enhanced line chart for task performance"""
# Convert to DataFrame
data = pd.DataFrame(mapped_trend_data[platform_name])
# Set a theme
sns.set_style('whitegrid')
plt.figure(figsize=(10, 6), facecolor='#f8f9fa')
# Platform-specific colors
platform_colors = {
'DeepSeek': ('#6b5b95', '#d64161'),
'Chat GPT': ('#3498db', '#1abc9c'),
'CoPilot': ('#f39c12', '#e67e22'),
'GC AI': ('#1abc9c', '#16a085'),
'Notebook LM': ('#e74c3c', '#c0392b'),
'Vecflow': ('#9b59b6', '#8e44ad'),
}
arthur_color, anna_color = platform_colors.get(platform_name, ('#8884d8', '#82ca9d'))
# Plot lines with enhanced styling
plt.plot(
data['task'],
data['arthur'],
marker='o',
markersize=10,
linestyle='-',
linewidth=2.5,
label="Arthur's Evaluation",
color=arthur_color,
alpha=0.9,
)
plt.plot(
data['task'],
data['anna'],
marker='s',
markersize=10,
linestyle='-',
linewidth=2.5,
label="Anna's Evaluation",
color=anna_color,
alpha=0.9,
)
# Customize plot
plt.title(f'{platform_name} Task Performance', fontsize=16, fontweight='bold')
plt.xlabel('Task Number', fontsize=12, fontweight='bold')
plt.ylabel('Result', fontsize=12, fontweight='bold')
# Set y-axis to show Pass/Fail instead of 1/0
plt.yticks([0, 1], ['Fail', 'Pass'], fontsize=12)
# Ensure x-axis shows integer task numbers
plt.xticks(data['task'], fontsize=11)
plt.grid(True, linestyle='--', alpha=0.7)
# Enhanced legend
legend = plt.legend(
loc='upper center', bbox_to_anchor=(0.5, -0.15), facecolor='white', edgecolor='#dddddd', shadow=True, ncol=2, fontsize=12
)
# Add a border to the plot
ax = plt.gca()
for spine in ax.spines.values():
spine.set_edgecolor('#dddddd')
spine.set_linewidth(1.5)
plt.tight_layout()
return plt.gca()
return (plot_task_performance,)
@app.cell
def _(platforms_data):
def display_platform_evaluation(platform_name):
"""Display platform strengths and weaknesses with HTML styling"""
strengths = platforms_data[platform_name]['strengths']
weaknesses = platforms_data[platform_name]['weaknesses']
# Platform-specific color
platform_colors = {
'DeepSeek': '#6b5b95',
'Chat GPT': '#3498db',
'CoPilot': '#f39c12',
'GC AI': '#1abc9c',
'Notebook LM': '#e74c3c',
'Vecflow': '#9b59b6',
}
color = platform_colors.get(platform_name, '#8884d8')
html_output = f"""
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 10px; border: 1px solid #dddddd; margin: 15px 0;">
<h2 style="color: {color}; text-align: center; margin-bottom: 20px; border-bottom: 2px solid {color}; padding-bottom: 10px;">
{platform_name} Evaluation
</h2>
<div style="display: flex; flex-wrap: wrap; gap: 20px;">
<div style="flex: 1; min-width: 300px; background-color: white; border-radius: 8px; padding: 15px; border: 1px solid #eaeaea; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
<h3 style="color: #28a745; margin-bottom: 15px; border-bottom: 1px solid #eaeaea; padding-bottom: 8px;">Key Strengths</h3>
<ul style="list-style-type: none; padding-left: 5px; margin-bottom: 0;">
"""
for strength in strengths:
html_output += f'<li style="margin-bottom: 10px; display: flex; align-items: center;"><span style="color: #28a745; margin-right: 10px; font-size: 18px;">✅</span> {strength}</li>'
html_output += """
</ul>
</div>
<div style="flex: 1; min-width: 300px; background-color: white; border-radius: 8px; padding: 15px; border: 1px solid #eaeaea; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
<h3 style="color: #dc3545; margin-bottom: 15px; border-bottom: 1px solid #eaeaea; padding-bottom: 8px;">Areas for Improvement</h3>
<ul style="list-style-type: none; padding-left: 5px; margin-bottom: 0;">
"""
for weakness in weaknesses:
html_output += f'<li style="margin-bottom: 10px; display: flex; align-items: center;"><span style="color: #dc3545; margin-right: 10px; font-size: 18px;">⚠️</span> {weakness}</li>'
html_output += """
</ul>
</div>
</div>
</div>
"""
from IPython.display import HTML, display
display(HTML(html_output))
return None
return (display_platform_evaluation,)
@app.cell
def _(np, plt, sns, task_type_data):
def plot_task_type_performance():
"""Create an enhanced bar chart for task type performance"""
# Set a theme
sns.set_style('whitegrid')
plt.figure(figsize=(12, 6), facecolor='#f8f9fa')
# Customize colors
colors = {'arthur': '#6b5b95', 'anna': '#d64161'}
# Set width of bars
bar_width = 0.35
# Set positions of bars on x-axis
x = np.arange(len(task_type_data))
# Create bars with enhanced styling
plt.bar(
x - bar_width / 2,
task_type_data['arthur'],
bar_width,
label="Arthur's Rating",
color=colors['arthur'],
edgecolor='white',
linewidth=1.5,
alpha=0.9,
)
plt.bar(
x + bar_width / 2,
task_type_data['anna'],
bar_width,
label="Anna's Rating",
color=colors['anna'],
edgecolor='white',
linewidth=1.5,
alpha=0.9,
)
# Add labels and title with enhanced styling
plt.xlabel('Task Type', fontsize=12, fontweight='bold')
plt.ylabel('Average Score (%)', fontsize=12, fontweight='bold')
plt.title('Task Type Performance Analysis', fontsize=16, fontweight='bold')
# Add xticks on the middle of the group bars with better formatting
plt.xticks(x, task_type_data['name'], rotation=30, ha='right', fontsize=11, fontweight='bold')
# Create enhanced legend
legend = plt.legend(
loc='upper center', bbox_to_anchor=(0.5, -0.15), facecolor='white', edgecolor='#dddddd', shadow=True, ncol=2, fontsize=12
)
# Add value labels on top of each bar
for i, v in enumerate(task_type_data['arthur']):
plt.text(i - bar_width / 2, v + 2, str(v), ha='center', fontsize=9, fontweight='bold')
for i, v in enumerate(task_type_data['anna']):
plt.text(i + bar_width / 2, v + 2, str(v), ha='center', fontsize=9, fontweight='bold')
# Add grid
plt.grid(True, linestyle='--', alpha=0.7, axis='y')
# Add a border to the plot
ax = plt.gca()
for spine in ax.spines.values():
spine.set_edgecolor('#dddddd')
spine.set_linewidth(1.5)
# Adjust layout
plt.tight_layout()
return plt.gca()
return (plot_task_type_performance,)
@app.cell
def _(
display_platform_evaluation,
platform_summary,
plot_platform_radar,
plot_task_performance,
):
def analyze_platform(platform_name='DeepSeek'):
"""Create a comprehensive analysis for a single platform"""
# Display the platform name
print(f'# AI Platform In-Depth Analysis: {platform_name}\n')
# Create the radar chart for metrics
print('## Performance Metrics')
plot_platform_radar(platform_name)
# Show task performance
print('\n## Task Performance')
plot_task_performance(platform_name)
# Display strengths and weaknesses
print('\n## Platform Evaluation')
display_platform_evaluation(platform_name)
# Show platform summary
print('\n## Platform Summary')
platform_summary(platform_name)
return None
return (analyze_platform,)
@app.cell
def _(compare_all_platforms):
# Compare all platforms
compare_all_platforms()
return
@app.cell
def _(platforms_data):
def platform_selector():
"""Prints available platforms and prompt for selection"""
print('Available platforms for analysis:')
for i, platform in enumerate(platforms_data.keys(), 1):
print(f'{i}. {platform}')
print('\nTo analyze a platform, run:')
print('analyze_platform("platform_name")')
print('\nTo compare all platforms, run:')
print('compare_all_platforms()')
return None
# Display available platforms
platform_selector()
return (platform_selector,)
@app.cell
def _(compare_all_platforms):
compare_all_platforms()
return
@app.cell
def _():
return
@app.cell
def _(plot_platform_radar_interactive):
# This function appears to be defined but not called
plot_platform_radar_interactive('DeepSeek')
return
@app.cell
def _(plot_platform_radar_interactive):
# This function appears to be defined but not called
plot_platform_radar_interactive('DeepSeek')
return
@app.cell
def _(compare_all_platforms_interactive):
# Execute the compare_all_platforms_interactive function
compare_all_platforms_interactive()
return
@app.cell
def _(platform_selector):
# Call platform_selector to display available platforms
platform_selector()
return
@app.cell
def _():
return
@app.cell
def _(pd):
import json
from IPython.display import HTML, display
# Convert the agreement data into a Python structure
agreement_data = [
{'platform': 'Chat GPT', 'arthurValue': 1.5, 'annaValue': 1.25, 'category': 'Helpfulness'},
{'platform': 'CoPilot', 'arthurValue': 1.0, 'annaValue': 1.33, 'category': 'Helpfulness'},
{'platform': 'DeepSeek', 'arthurValue': 1.33, 'annaValue': 2.0, 'category': 'Helpfulness'},
{'platform': 'GC AI', 'arthurValue': 1.4, 'annaValue': 0.5, 'category': 'Helpfulness'},
{'platform': 'Notebook LM', 'arthurValue': 0.8, 'annaValue': 1.2, 'category': 'Helpfulness'},
{'platform': 'Vecflow', 'arthurValue': 0.6, 'annaValue': 0.6, 'category': 'Helpfulness'},
{'platform': 'Chat GPT', 'arthurValue': 1.75, 'annaValue': 1.25, 'category': 'Adequate Length'},
{'platform': 'CoPilot', 'arthurValue': 1.2, 'annaValue': 1.33, 'category': 'Adequate Length'},
{'platform': 'DeepSeek', 'arthurValue': 2.0, 'annaValue': 1.67, 'category': 'Adequate Length'},
{'platform': 'GC AI', 'arthurValue': 1.8, 'annaValue': 1.0, 'category': 'Adequate Length'},
{'platform': 'Notebook LM', 'arthurValue': 1.6, 'annaValue': 2.0, 'category': 'Adequate Length'},
{'platform': 'Vecflow', 'arthurValue': 1.8, 'annaValue': 1.4, 'category': 'Adequate Length'},
]
# Convert pass/fail agreement data
pass_fail_agreement = [
{'platform': 'Chat GPT', 'arthur': 100, 'anna': 40, 'agreement': 'Disagree'},
{'platform': 'CoPilot', 'arthur': 40, 'anna': 60, 'agreement': 'Disagree'},
{'platform': 'DeepSeek', 'arthur': 75, 'anna': 100, 'agreement': 'Disagree'},
{'platform': 'GC AI', 'arthur': 60, 'anna': 40, 'agreement': 'Disagree'},
{'platform': 'Notebook LM', 'arthur': 60, 'anna': 60, 'agreement': 'Agree'},
{'platform': 'Vecflow', 'arthur': 60, 'anna': 40, 'agreement': 'Disagree'},
]
# Calculate correlations using pandas for accuracy
def calculate_correlations():
helpfulness_data = pd.DataFrame([item for item in agreement_data if item['category'] == 'Helpfulness'])
adequate_length_data = pd.DataFrame([item for item in agreement_data if item['category'] == 'Adequate Length'])
pass_fail_data = pd.DataFrame(pass_fail_agreement)
helpfulness_correlation = helpfulness_data['arthurValue'].corr(helpfulness_data['annaValue'])
adequate_length_correlation = adequate_length_data['arthurValue'].corr(adequate_length_data['annaValue'])
pass_rate_correlation = pass_fail_data['arthur'].corr(pass_fail_data['anna'])
return {
'helpfulness': round(helpfulness_correlation, 2),
'adequate_length': round(adequate_length_correlation, 2),
'pass_rate': round(pass_rate_correlation, 2),
}
correlations = calculate_correlations()
return (
HTML,
agreement_data,
calculate_correlations,
correlations,
display,
json,
pass_fail_agreement,
)
@app.cell
def _(correlations):
correlations
return
@app.cell
def _(
agree_count,
agreement_data,
calculate_average_metrics,
correlations,
disagree_count,
np,
pass_fail_agreement,
pd,
plt,
):
def _():
def _():
def interactive_evaluator_dashboard():
"""Display an interactive dashboard for evaluator analysis"""
from IPython.display import display, Markdown, HTML
# Display header
display(
HTML("""
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 10px; text-align: center; margin-bottom: 20px;">
<h1 style="color: #333; margin-bottom: 10px;">Evaluator Comparison Analysis</h1>
<p style="font-style: italic; color: #666;">Analyzing differences between Arthur's and Anna's evaluations</p>
</div>
""")
)
# Display Agreement Section
display(Markdown('## Agreement Overview'))
# Create side-by-side visualizations
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(18, 7))
# Agreement Pie Chart
labels = ['Agreement', 'Disagreement']
sizes = [agree_count, disagree_count]
colors = ['#4CAF50', '#F44336']
explode = (0.1, 0)
ax1.pie(
sizes,
explode=explode,
labels=labels,
colors=colors,
autopct='%1.1f%%',
shadow=True,
startangle=140,
textprops={'fontsize': 12, 'fontweight': 'bold'},
)
ax1.set_title('Evaluator Pass/Fail Agreement', fontsize=16, fontweight='bold')
# Average Scores Bar Chart
avg_df = calculate_average_metrics()
# Set width of bars
bar_width = 0.35
x = np.arange(len(avg_df))
# Create bars
ax2.bar(
x - bar_width / 2,
avg_df['Arthur'],
width=bar_width,
label="Arthur's Avg",
color='#8884d8',
edgecolor='white',
linewidth=1.5,
)
ax2.bar(
x + bar_width / 2, avg_df['Anna'], width=bar_width, label="Anna's Avg", color='#82ca9d', edgecolor='white', linewidth=1.5
)
# Add data labels
for i in range(len(x)):
ax2.text(
x[i] - bar_width / 2,
avg_df['Arthur'][i] + 0.05,
f'{avg_df["Arthur"][i]:.2f}',
ha='center',
va='bottom',
fontweight='bold',
fontsize=10,
)
ax2.text(
x[i] + bar_width / 2,
avg_df['Anna'][i] + 0.05,
f'{avg_df["Anna"][i]:.2f}',
ha='center',
va='bottom',
fontweight='bold',
fontsize=10,
)
# Customize plot
ax2.set_xlabel('Category', fontsize=12, fontweight='bold')
ax2.set_ylabel('Average Score', fontsize=12, fontweight='bold')
ax2.set_title('Average Scores by Evaluator', fontsize=16, fontweight='bold')
ax2.set_xticks(x)
ax2.set_xticklabels(avg_df['Category'], fontsize=12)
ax2.set_ylim(0, 2.2)
ax2.grid(axis='y', linestyle='--', alpha=0.7)
ax2.legend(loc='lower center', bbox_to_anchor=(0.5, -0.25), ncol=2, fontsize=12)
plt.tight_layout()
display(plt.gcf())
plt.close()
# Now show correlation analysis
display(Markdown('## Correlation Analysis'))
# Create correlations chart
fig, ax = plt.subplots(figsize=(10, 6))
metrics = ['Helpfulness', 'Adequate Length', 'Pass Rate']
corr_values = [correlations['helpfulness'], correlations['adequate_length'], correlations['pass_rate']]
bars = ax.bar(metrics, corr_values)
# Colorize bars based on correlation (positive or negative)
for i, bar in enumerate(bars):
if corr_values[i] < 0:
bar.set_color('#F44336') # red for negative correlation
else:
bar.set_color('#4CAF50') # green for positive correlation
# Add correlation values above/below bars
for i, v in enumerate(corr_values):
if v >= 0:
ax.text(i, v + 0.05, f'{v:.2f}', ha='center', fontweight='bold')
else:
ax.text(i, v - 0.1, f'{v:.2f}', ha='center', fontweight='bold')
# Add reference line at y=0
ax.axhline(y=0, color='black', linestyle='-', alpha=0.3)
# Set y-axis limits to show the full range -1 to 1
ax.set_ylim(-1.1, 1.1)
ax.set_title('Evaluator Correlation Analysis', fontsize=14, fontweight='bold')
ax.set_ylabel('Correlation Coefficient', fontsize=12)
ax.text(
1,
-0.9,
'Range: -1 to 1, where 1 is perfect positive correlation,\n-1 is perfect negative correlation, and 0 is no correlation',
fontsize=8,
ha='center',
style='italic',
)
plt.tight_layout()
display(plt.gcf())
plt.close()
# Display scatter plots
display(Markdown('## Score Comparison Scatter Plots'))
# Create a 1x2 grid for helpfulness and adequate length scatter plots
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(18, 7))
# Helpfulness Scatter Plot
helpfulness_data = [item for item in agreement_data if item['category'] == 'Helpfulness']
x1 = [item['arthurValue'] for item in helpfulness_data]
y1 = [item['annaValue'] for item in helpfulness_data]
platforms1 = [item['platform'] for item in helpfulness_data]
scatter1 = ax1.scatter(x1, y1, c='#8884d8', s=100, alpha=0.7)
# Add platform labels
for i, platform in enumerate(platforms1):
ax1.annotate(platform, (x1[i], y1[i]), textcoords='offset points', xytext=(0, 10), ha='center')
# Add axis labels
ax1.set_xlabel("Arthur's Rating", fontsize=12)
ax1.set_ylabel("Anna's Rating", fontsize=12)
ax1.set_title('Helpfulness Correlation', fontsize=14, fontweight='bold')
# Set axis limits
ax1.set_xlim(0, 2)
ax1.set_ylim(0, 2)
# Add perfect correlation line
ax1.plot([0, 2], [0, 2], 'k--', alpha=0.3)
# Add correlation value text
ax1.text(0.1, 1.8, f'Correlation: {correlations["helpfulness"]}', fontsize=12, bbox=dict(facecolor='white', alpha=0.5))
ax1.grid(True, linestyle='--', alpha=0.3)
# Adequate Length Scatter Plot
adequate_length_data = [item for item in agreement_data if item['category'] == 'Adequate Length']
x2 = [item['arthurValue'] for item in adequate_length_data]
y2 = [item['annaValue'] for item in adequate_length_data]
platforms2 = [item['platform'] for item in adequate_length_data]
scatter2 = ax2.scatter(x2, y2, c='#82ca9d', s=100, alpha=0.7)
# Add platform labels
for i, platform in enumerate(platforms2):
ax2.annotate(platform, (x2[i], y2[i]), textcoords='offset points', xytext=(0, 10), ha='center')
# Add axis labels
ax2.set_xlabel("Arthur's Rating", fontsize=12)
ax2.set_ylabel("Anna's Rating", fontsize=12)
ax2.set_title('Adequate Length Correlation', fontsize=14, fontweight='bold')
# Set axis limits
ax2.set_xlim(0, 2)
ax2.set_ylim(0, 2)
# Add perfect correlation line
ax2.plot([0, 2], [0, 2], 'k--', alpha=0.3)
# Add correlation value text
ax2.text(0.1, 1.8, f'Correlation: {correlations["adequate_length"]}', fontsize=12, bbox=dict(facecolor='white', alpha=0.5))
ax2.grid(True, linestyle='--', alpha=0.3)
plt.tight_layout()
display(plt.gcf())
plt.close()
# Pass Rate Correlation Scatter Plot
display(Markdown('## Pass Rate Comparison'))
plt.figure(figsize=(10, 6))
x = [item['arthur'] for item in pass_fail_agreement]
y = [item['anna'] for item in pass_fail_agreement]
platforms = [item['platform'] for item in pass_fail_agreement]
colors = ['#4CAF50' if item['agreement'] == 'Agree' else '#F44336' for item in pass_fail_agreement]
scatter = plt.scatter(x, y, c=colors, s=100, alpha=0.7)
# Add platform labels
for i, platform in enumerate(platforms):
plt.annotate(platform, (x[i], y[i]), textcoords='offset points', xytext=(0, 10), ha='center')
# Add axis labels
plt.xlabel("Arthur's Pass Rate (%)", fontsize=12)
plt.ylabel("Anna's Pass Rate (%)", fontsize=12)
plt.title('Pass Rate Correlation', fontsize=14, fontweight='bold')
# Set axis limits
plt.xlim(30, 105)
plt.ylim(30, 105)
# Add perfect correlation line
plt.plot([30, 105], [30, 105], 'k--', alpha=0.3)
# Add correlation value text
plt.text(35, 95, f'Correlation: {correlations["pass_rate"]}', fontsize=12, bbox=dict(facecolor='white', alpha=0.5))
# Add legend
from matplotlib.lines import Line2D
legend_elements = [
Line2D([0], [0], marker='o', color='w', markerfacecolor='#4CAF50', markersize=10, label='Agreement'),
Line2D([0], [0], marker='o', color='w', markerfacecolor='#F44336', markersize=10, label='Disagreement'),
]
plt.legend(handles=legend_elements, loc='upper left')
plt.grid(True, linestyle='--', alpha=0.3)
plt.tight_layout()
display(plt.gcf())
plt.close()
# Platform-specific differences
display(Markdown('## Platform-specific Evaluator Differences'))
# Calculate platform differences if not already done
if not 'display_df' in globals():
platform_differences = []
for platform in set(item['platform'] for item in agreement_data):
helpfulness = next(
(item for item in agreement_data if item['platform'] == platform and item['category'] == 'Helpfulness'), None
)
adequate_length = next(
(item for item in agreement_data if item['platform'] == platform and item['category'] == 'Adequate Length'), None
)
pass_fail = next((item for item in pass_fail_agreement if item['platform'] == platform), None)
if helpfulness and adequate_length and pass_fail:
helpfulness_diff = helpfulness['arthurValue'] - helpfulness['annaValue']
adequate_length_diff = adequate_length['arthurValue'] - adequate_length['annaValue']
pass_rate_diff = pass_fail['arthur'] - pass_fail['anna']
return platform_differences.append(
{
'Platform': platform,
'Helpfulness Diff': helpfulness_diff,
'Adequate Length Diff': adequate_length_diff,
'Pass Rate Diff': pass_rate_diff,
'Agreement': pass_fail['agreement'],
}
)
platform_differences = []
for platform in set(item['platform'] for item in agreement_data):
helpfulness = next((item for item in agreement_data if item['platform'] == platform and item['category'] == 'Helpfulness'), None)
adequate_length = next(
(item for item in agreement_data if item['platform'] == platform and item['category'] == 'Adequate Length'), None
)
pass_fail = next((item for item in pass_fail_agreement if item['platform'] == platform), None)
if helpfulness and adequate_length and pass_fail:
helpfulness_diff = helpfulness['arthurValue'] - helpfulness['annaValue']
adequate_length_diff = adequate_length['arthurValue'] - adequate_length['annaValue']
pass_rate_diff = pass_fail['arthur'] - pass_fail['anna']
return platform_differences.append(
{
'Platform': platform,
'Helpfulness Diff': helpfulness_diff,
'Adequate Length Diff': adequate_length_diff,
'Pass Rate Diff': pass_rate_diff,
'Agreement': pass_fail['agreement'],
}
)
platform_diff_df = pd.DataFrame(platform_differences)
_()
return
@app.cell
def _(correlations, plt):
# Creating Correlation Analysis Chart
fig, ax = plt.subplots(figsize=(10, 6))
metrics = ['Helpfulness', 'Adequate Length', 'Pass Rate']
corr_values = [correlations['helpfulness'], correlations['adequate_length'], correlations['pass_rate']]
bars = ax.bar(metrics, corr_values, color=['#8884d8', '#82ca9d', '#ff7300'])
# Colorize bars based on correlation (positive or negative)
for i, bar in enumerate(bars):
if corr_values[i] < 0:
bar.set_color('#F44336') # red for negative correlation
else:
bar.set_color('#4CAF50') # green for positive correlation
# Add correlation values above/below bars
for i, v in enumerate(corr_values):
if v >= 0:
ax.text(i, v + 0.05, f'{v:.2f}', ha='center', fontweight='bold')
else:
ax.text(i, v - 0.1, f'{v:.2f}', ha='center', fontweight='bold')
# Add reference line at y=0
ax.axhline(y=0, color='black', linestyle='-', alpha=0.3)
# Set y-axis limits to show the full range -1 to 1
ax.set_ylim(-1.1, 1.1)
# Add labels and title
ax.set_title('Evaluator Correlation Analysis', fontsize=14, fontweight='bold')
ax.set_ylabel('Correlation Coefficient', fontsize=12)
ax.text(
1,
-0.9,
'Range: -1 to 1, where 1 is perfect positive correlation,\n-1 is perfect negative correlation, and 0 is no correlation',
fontsize=8,
ha='center',
style='italic',
)
plt.tight_layout()
return ax, bar, bars, corr_values, fig, i, metrics, v
@app.cell
def _(agreement_data, correlations, plt):
def _():
# Create Helpfulness Correlation Scatter Plot
helpfulness_data = [item for item in agreement_data if item['category'] == 'Helpfulness']
fig, ax = plt.subplots(figsize=(8, 6))
x = [item['arthurValue'] for item in helpfulness_data]
y = [item['annaValue'] for item in helpfulness_data]
platforms = [item['platform'] for item in helpfulness_data]
scatter = ax.scatter(x, y, c='#8884d8', s=100, alpha=0.7)
# Add platform labels
for i, platform in enumerate(platforms):
ax.annotate(platform, (x[i], y[i]), textcoords='offset points', xytext=(0, 10), ha='center')
# Add axis labels
ax.set_xlabel("Arthur's Rating", fontsize=12)
ax.set_ylabel("Anna's Rating", fontsize=12)
ax.set_title('Helpfulness Correlation', fontsize=14, fontweight='bold')
# Set axis limits
ax.set_xlim(0, 2)
ax.set_ylim(0, 2)
# Add perfect correlation line
ax.plot([0, 2], [0, 2], 'k--', alpha=0.3)
# Add correlation value text
ax.text(0.1, 1.8, f'Correlation: {correlations["helpfulness"]}', fontsize=12, bbox=dict(facecolor='white', alpha=0.5))
plt.grid(True, linestyle='--', alpha=0.3)
return plt.tight_layout()
_()
return
@app.cell
def _(agreement_data, pass_fail_agreement, pd):
def _():
# Create a DataFrame to show platform-specific differences
platform_differences = []
for platform in set(item['platform'] for item in agreement_data):
helpfulness = next((item for item in agreement_data if item['platform'] == platform and item['category'] == 'Helpfulness'), None)
adequate_length = next(
(item for item in agreement_data if item['platform'] == platform and item['category'] == 'Adequate Length'), None
)
pass_fail = next((item for item in pass_fail_agreement if item['platform'] == platform), None)
if helpfulness and adequate_length and pass_fail:
helpfulness_diff = helpfulness['arthurValue'] - helpfulness['annaValue']
adequate_length_diff = adequate_length['arthurValue'] - adequate_length['annaValue']
pass_rate_diff = pass_fail['arthur'] - pass_fail['anna']
return platform_differences.append(
{
'Platform': platform,
'Helpfulness Diff': helpfulness_diff,
'Adequate Length Diff': adequate_length_diff,
'Pass Rate Diff': pass_rate_diff,
'Agreement': pass_fail['agreement'],
}
)
platform_diff_df = pd.DataFrame(platform_differences)
# Display platform differences
platform_diff_df['Helpfulness Diff'] = platform_diff_df['Helpfulness Diff'].round(1)
platform_diff_df['Adequate Length Diff'] = platform_diff_df['Adequate Length Diff'].round(1)
platform_diff_df['Pass Rate Diff'] = platform_diff_df['Pass Rate Diff'].astype(int)
def style_diff(val):
if val > 0:
return f'Arthur +{abs(val)}'
elif val < 0:
return f'Anna +{abs(val)}'
else:
return 'Equal'
# Apply styling and display the data
styled_platform_diff = platform_diff_df.copy()
styled_platform_diff['Helpfulness'] = styled_platform_diff['Helpfulness Diff'].apply(style_diff)
styled_platform_diff['Adequate Length'] = styled_platform_diff['Adequate Length Diff'].apply(style_diff)
styled_platform_diff['Pass Rate'] = styled_platform_diff['Pass Rate Diff'].apply(style_diff)
display_cols = ['Platform', 'Helpfulness', 'Adequate Length', 'Pass Rate', 'Agreement']
display_df = styled_platform_diff[display_cols]
_()
return
@app.cell
def _(calculate_average_metrics, np, plt):
def plot_average_scores():
"""Plot the average scores for each category by evaluator"""
# Get average data
avg_df = calculate_average_metrics()
# Set up plot
plt.figure(figsize=(10, 6))
# Set width of bars
bar_width = 0.35
x = np.arange(len(avg_df))
# Create bars
plt.bar(
x - bar_width / 2,
avg_df['Arthur'],
width=bar_width,
label="Arthur's Avg. Score",
color='#8884d8',
alpha=0.8,
edgecolor='white',
linewidth=1.5,
)
plt.bar(
x + bar_width / 2,
avg_df['Anna'],
width=bar_width,
label="Anna's Avg. Score",
color='#82ca9d',
alpha=0.8,
edgecolor='white',
linewidth=1.5,
)
# Add data labels
for i in range(len(x)):
plt.text(
x[i] - bar_width / 2,
avg_df['Arthur'][i] + 0.05,
f'{avg_df["Arthur"][i]:.2f}',
ha='center',
va='bottom',
color='#333',
fontweight='bold',
)
plt.text(
x[i] + bar_width / 2,
avg_df['Anna'][i] + 0.05,
f'{avg_df["Anna"][i]:.2f}',
ha='center',
va='bottom',
color='#333',
fontweight='bold',
)
# Customize plot
plt.xlabel('Evaluation Category', fontsize=12, fontweight='bold')
plt.ylabel('Average Score (0-2 scale)', fontsize=12, fontweight='bold')
plt.title('Average Scores by Evaluator', fontsize=14, fontweight='bold')
plt.xticks(x, avg_df['Category'], fontsize=11)
plt.ylim(0, 2.2) # Set reasonable y-axis limit
plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), shadow=True, ncol=2)
plt.grid(axis='y', linestyle='--', alpha=0.7)
# Add a border to the plot
ax = plt.gca()
for spine in ax.spines.values():
spine.set_edgecolor('#dddddd')
spine.set_linewidth(1.5)
plt.tight_layout()
return plt.gca()
return (plot_average_scores,)
@app.cell
def _(agreement_data, pass_fail_agreement, pd):
def calculate_average_metrics():
"""Calculate average metrics for each evaluator and category"""
# Process helpfulness data
helpfulness_data = [item for item in agreement_data if item['category'] == 'Helpfulness']
arthur_helpfulness = sum(item['arthurValue'] for item in helpfulness_data) / len(helpfulness_data)
anna_helpfulness = sum(item['annaValue'] for item in helpfulness_data) / len(helpfulness_data)
# Process adequate length data
adequate_length_data = [item for item in agreement_data if item['category'] == 'Adequate Length']
arthur_adequate = sum(item['arthurValue'] for item in adequate_length_data) / len(adequate_length_data)
anna_adequate = sum(item['annaValue'] for item in adequate_length_data) / len(adequate_length_data)
# Create DataFrame with results
avg_df = pd.DataFrame(
{
'Category': ['Helpfulness', 'Adequate Length'],
'Arthur': [arthur_helpfulness, arthur_adequate],
'Anna': [anna_helpfulness, anna_adequate],
}
)
return avg_df
# Count agreement vs disagreement
agree_count = sum(1 for item in pass_fail_agreement if item['agreement'] == 'Agree')
disagree_count = sum(1 for item in pass_fail_agreement if item['agreement'] == 'Disagree')
return agree_count, calculate_average_metrics, disagree_count
@app.cell
def _(plot_average_scores):
plot_average_scores()
return
@app.cell
def _(agree_count, ax, calculate_average_metrics, disagree_count, np, plt):
def interactive_evaluator_dashboard():
"""Display an interactive dashboard for evaluator analysis"""
from IPython.display import display, Markdown, HTML
# Display header
display(
HTML("""
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 10px; text-align: center; margin-bottom: 20px;">
<h1 style="color: #333; margin-bottom: 10px;">Evaluator Comparison Analysis</h1>
<p style="font-style: italic; color: #666;">Analyzing differences between Arthur's and Anna's evaluations</p>
</div>
""")
)
# Display Agreement Section
display(Markdown('## Agreement Overview'))
# Create side-by-side visualizations
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(18, 7))
# Agreement Pie Chart
labels = ['Agreement', 'Disagreement']
sizes = [agree_count, disagree_count]
colors = ['#4CAF50', '#F44336']
explode = (0.1, 0)
ax1.pie(
sizes,
explode=explode,
labels=labels,
colors=colors,
autopct='%1.1f%%',
shadow=True,
startangle=140,
textprops={'fontsize': 12, 'fontweight': 'bold'},
)
ax1.set_title('Evaluator Pass/Fail Agreement', fontsize=16, fontweight='bold')
# Average Scores Bar Chart
avg_df = calculate_average_metrics()
# Set width of bars
bar_width = 0.35
x = np.arange(len(avg_df))
# Create bars
ax2.bar(x - bar_width / 2, avg_df['Arthur'], width=bar_width, label="Arthur's Avg", color='#8884d8', edgecolor='white', linewidth=1.5)
ax2.bar(x + bar_width / 2, avg_df['Anna'], width=bar_width, label="Anna's Avg", color='#82ca9d', edgecolor='white', linewidth=1.5)
# Add data labels
for i in range(len(x)):
ax2.text(
x[i] - bar_width / 2,
avg_df['Arthur'][i] + 0.05,
f'{avg_df["Arthur"][i]:.2f}',
ha='center',
va='bottom',
fontweight='bold',
fontsize=10,
)
ax2.text(
x[i] + bar_width / 2,
avg_df['Anna'][i] + 0.05,
f'{avg_df["Anna"][i]:.2f}',
ha='center',
va='bottom',
fontweight='bold',
fontsize=10,
)
# Customize plot
ax2.set_xlabel('Category', fontsize=12, fontweight='bold')
ax2.set_ylabel('Average Score', fontsize=12, fontweight='bold')
ax
return (interactive_evaluator_dashboard,)
@app.cell
def _(interactive_evaluator_dashboard):
interactive_evaluator_dashboard()
return
if __name__ == "__main__":
app.run()
|