Spaces:
Running
Running
File size: 162,052 Bytes
1162aae |
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 |
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "2d8737a1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": []
},
{
"name": "stdout",
"output_type": "stream",
"text": []
},
{
"name": "stdout",
"output_type": "stream",
"text": []
}
],
"source": [
"%pip install lighteval==0.6.2\n",
"%pip install great-tables\n",
"%pip install polars"
]
},
{
"cell_type": "markdown",
"id": "3d9ea816",
"metadata": {},
"source": [
"# Comparaison de différentes formulations d'une instruction pour une même tâche\n",
"Dans ce *notebook*, nous allons utiliser un très petit modèle pour une tâche simple. Nous nous concentrerons sur la comparaison de plusieurs formulations pour l'instruction (*prompt* en anglais) donné en entrée afin de voir comment elles affectent les résultats que l'on peut obtenir."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "3684eec7",
"metadata": {},
"outputs": [],
"source": [
"import string\n",
"import os\n",
"from datetime import timedelta\n",
"from types import ModuleType\n",
"from ast import literal_eval"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a241de50",
"metadata": {},
"outputs": [],
"source": [
"# Pour la visualisation des données\n",
"from great_tables import GT\n",
"import polars as pl\n",
"import polars.selectors as cs\n",
"from datasets import load_dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e522341e",
"metadata": {},
"outputs": [],
"source": [
"# Pour l'évaluation\n",
"import lighteval\n",
"from lighteval.logging.evaluation_tracker import EvaluationTracker\n",
"from lighteval.models.model_config import BaseModelConfig, VLLMModelConfig\n",
"from lighteval.pipeline import ParallelismManager, Pipeline, PipelineParameters\n",
"from lighteval.metrics.metrics import Metrics\n",
"from lighteval.tasks.lighteval_task import LightevalTaskConfig, Doc\n",
"from lighteval.utils.utils import as_list, EnvConfig\n",
"from lighteval.utils.imports import is_accelerate_available, is_tgi_available"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "d954ae1b",
"metadata": {},
"outputs": [],
"source": [
"# Définir pour votre cas d'usage\n",
"cache_dir = \"tmp\"\n",
"max_samples = 10"
]
},
{
"cell_type": "markdown",
"id": "a52f8c1b",
"metadata": {},
"source": [
"## Comparer plusieurs formulations pour une même tâche\n",
"\n",
"Comparons :\n",
"- à l'aide d'une évaluation MCQA (question-réponse à choix multiples i.e. un QCM)\n",
"- l'utilisation d'une évaluation générative\n",
"\n",
"et pour les deux, en utilisant des variations des mêmes prompts.\n",
"\n",
"Nous utiliserons le jeu de données ARC d'AI2 pour nos expériences, en utilisant le sous-ensemble « challenge ». Vous pouvez consulter le jeu de données ici : https://huggingface.co/datasets/allenai/ai2_arc?row=0."
]
},
{
"cell_type": "markdown",
"id": "6fc0902b",
"metadata": {},
"source": [
"### Définissons le cœur de notre tâche"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "6e1c0cde",
"metadata": {},
"outputs": [],
"source": [
"class ArcExplorationTask(LightevalTaskConfig):\n",
" def __init__(self, name, prompt_function, metric):\n",
" super().__init__(\n",
" name=name,\n",
" prompt_function=prompt_function,\n",
" metric=as_list(metric),\n",
" # Il s'agit d'une tâche personnalisée\n",
" suite=[\"custom\"],\n",
" # Ceci définit notre jeu de données et ses sous-ensembles\n",
" hf_repo=\"allenai/ai2_arc\",\n",
" hf_subset=\"ARC-Challenge\",\n",
" hf_avail_splits=[\"train\", \"validation\", \"test\"],\n",
" evaluation_splits=[\"test\"],\n",
" # Paramètres des exemples few shot\n",
" few_shots_split=\"validation\",\n",
" few_shots_select=\"random\", \n",
" # Autres paramètres\n",
" stop_sequence=[\".\", \"\\n\"],\n",
" generation_size=100,\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "eaa0a65a",
"metadata": {},
"source": [
"### Définissons nos métriques\n",
"\n",
"Pour une évaluation à choix multiples, , nous voulons la log-vraissemblance de l'*accuracy* normalisée par la longueur (= le choix le plus probable est-il le bon ?).\n",
"\n",
"Pour l'évaluation de générations, nous voulons une correspondance exacte (= le texte généré correspond-il à la référence ?)."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "426c2ef5",
"metadata": {},
"outputs": [],
"source": [
"metric_mcqa = Metrics.loglikelihood_acc_norm\n",
"metric_gen = Metrics.quasi_exact_match"
]
},
{
"cell_type": "markdown",
"id": "aea37f61",
"metadata": {},
"source": [
"### Définissons des fonctions pour les différentes instructions\n",
"\n",
"Une ligne du jeu de données ARC est un dictionnaire, de la forme suivante\n",
"```python\n",
"{\n",
" \"question\": \"la question avec une instruction\",\n",
" \"choices\": {\n",
" \"text\": [\"choix 1\", \"choix 2\", ...],\n",
" \"label\": [\"A\", \"B\", ...]\n",
" },\n",
" \"answerKey\": \"le label gold\"\n",
"}\n",
"```\n",
"\n",
"Notre fonction appliquera un gabarit dans lequel nous associerons toutes ces informations aux clés demandées (`query`, `choices`, `gold_index`, et une `instruction` si nécessaire)."
]
},
{
"cell_type": "markdown",
"id": "7e994698",
"metadata": {},
"source": [
"Premier cas, nous définissons le gabarit le plus basique possible. \n",
"L'instruction ressemble à ceci :\n",
"```\n",
"<la question>\n",
"```\n",
"et nous regardons `<les choix>` directement."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "41bccce4",
"metadata": {},
"outputs": [],
"source": [
"def arc_base(line, task_name: str = None):\n",
" query= f\"{line['question']}\"\n",
" choices=line[\"choices\"][\"text\"]\n",
"\n",
" return Doc(\n",
" task_name=task_name,\n",
" query=query,\n",
" choices=choices,\n",
" gold_index=line[\"choices\"][\"label\"].index(line[\"answerKey\"]),\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "d87631d5",
"metadata": {},
"source": [
"Deuxième cas, nous ajoutons maintenant un peu de contexte. L'instruction ressemble alors à ceci :\n",
"```\n",
"Question: <la question>\n",
"Answer: \n",
"```\n",
"et nous regardons `<les choix>` directement aussi."
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "9865eafe",
"metadata": {},
"outputs": [],
"source": [
"def arc_context(line, task_name: str = None):\n",
" query= f\"Question: {line['question']}\"\n",
" query += \"\\nAnswer: \"\n",
" choices=line[\"choices\"][\"text\"]\n",
" return Doc(\n",
" task_name=task_name,\n",
" query=query,\n",
" choices=choices,\n",
" gold_index=line[\"choices\"][\"label\"].index(line[\"answerKey\"]),\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "132deef3",
"metadata": {},
"source": [
"Troisième cas, nous ajoutons maintenant des choix dans notre instruction. Le *prompt* ressemble alors à ceci :\n",
"```\n",
"Question: <la question>\n",
"Choices:\n",
"A. <choix A>\n",
"B. <choix B>\n",
"...\n",
"Answer: \n",
"```\n",
"et nous regardons `<les choix>` directement à nouveau."
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "698367f7",
"metadata": {},
"outputs": [],
"source": [
"letters = list(string.ascii_uppercase)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "e7073026",
"metadata": {},
"outputs": [],
"source": [
"def arc_context_choices(line, task_name: str = None):\n",
" query = f\"Question: {line['question']}\\n\"\n",
" query += \"\\n\".join([f\"{letters[ix]}. {choice}\" for ix, choice in enumerate(line[\"choices\"][\"text\"])])\n",
" query += \"\\nAnswer: \"\n",
" choices=line[\"choices\"][\"text\"]\n",
" return Doc(\n",
" task_name=task_name,\n",
" query=query,\n",
" choices=choices,\n",
" gold_index=line[\"choices\"][\"label\"].index(line[\"answerKey\"]),\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "b835822d",
"metadata": {},
"source": [
"Dernier cas, nous faisons la même chose, mais nous regardons `<les labels des choix>` à la place."
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "b9453b39",
"metadata": {},
"outputs": [],
"source": [
"def arc_context_labels(line, task_name: str = None):\n",
" query = f\"Question: {line['question']}\\n\"\n",
" query += \"\\n\".join([f\"{letters[ix]}. {choice}\" for ix, choice in enumerate(line[\"choices\"][\"text\"])])\n",
" query += \"\\nAnswer: \"\n",
" choices=[letters[ix] for ix in range(len(line[\"choices\"][\"text\"]))]\n",
" return Doc(\n",
" task_name=task_name,\n",
" query=query,\n",
" choices=choices,\n",
" gold_index=line[\"choices\"][\"label\"].index(line[\"answerKey\"]),\n",
" )\n",
"\n"
]
},
{
"cell_type": "markdown",
"id": "da018e16",
"metadata": {},
"source": [
"### Enchaînons le tout"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "304a74dd",
"metadata": {},
"outputs": [],
"source": [
"task_module = ModuleType(\"task_module\")\n",
"task_module.__file__ = \".\",\n",
"task_module.TASKS_TABLE = [\n",
" ArcExplorationTask(\n",
" name=\"arc_base\", \n",
" prompt_function=arc_base, \n",
" metric=[metric_mcqa, metric_gen]\n",
" ),\n",
" ArcExplorationTask(\n",
" name=\"arc_context\", \n",
" prompt_function=arc_context, \n",
" metric=[metric_mcqa, metric_gen]\n",
" ),\n",
" ArcExplorationTask(\n",
" name=\"arc_context_choice\", \n",
" prompt_function=arc_context_choices, \n",
" metric=[metric_mcqa, metric_gen]\n",
" ),\n",
" ArcExplorationTask(\n",
" name=\"arc_context_labels\", \n",
" prompt_function=arc_context_labels, \n",
" metric=[metric_mcqa, metric_gen]\n",
" )\n",
"]\n",
"\n",
"task_names = [\"arc_base\", \"arc_context\", \"arc_context_choice\", \"arc_context_labels\"]"
]
},
{
"cell_type": "markdown",
"id": "42a131fd",
"metadata": {},
"source": [
"# Lançons notre évaluation !"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "756566ff",
"metadata": {},
"outputs": [],
"source": [
"if is_accelerate_available():\n",
" from accelerate import Accelerator, InitProcessGroupKwargs\n",
" accelerator = Accelerator(kwargs_handlers=[InitProcessGroupKwargs(timeout=timedelta(seconds=3000))])\n",
"else:\n",
" accelerator = None"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "1ee62d6f",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:lighteval.logging.hierarchical_logger:WARNING: --max_samples WAS SET. THESE NUMBERS ARE ONLY PARTIAL AND SHOULD NOT BE USED FOR COMPARISON UNLESS YOU KNOW WHAT YOU ARE DOING.\n",
"WARNING:lighteval.logging.hierarchical_logger:Test all gather {\n",
"WARNING:lighteval.logging.hierarchical_logger: Test gather tensor\n",
"WARNING:lighteval.logging.hierarchical_logger: gathered_tensor tensor([0]), should be [0]\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:00.002244]\n",
"WARNING:lighteval.logging.hierarchical_logger:Model loading {\n",
"WARNING:lighteval.logging.hierarchical_logger: Tokenizer truncation and padding size set to the left side.\n",
"WARNING:lighteval.logging.hierarchical_logger: We are not in a distributed setting. Setting model_parallel to False.\n",
"WARNING:lighteval.logging.hierarchical_logger: Model parallel was set to False, max memory set to None and device map to None\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4e00c4d6763240ed85bde9c5f8f6614e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:lighteval.logging.hierarchical_logger: Using Data Parallelism, putting model on device cpu\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:01.973031]\n",
"WARNING:lighteval.logging.hierarchical_logger:Tasks loading {\n",
"WARNING:lighteval.logging.hierarchical_logger: \u001b[33mIf you want to use extended_tasks, make sure you installed their dependencies using `pip install -e .[extended_tasks]`.\u001b[0m\n",
"WARNING:lighteval.logging.hierarchical_logger: {'custom|arc_base': <class 'lighteval.tasks.registry.create_config_tasks.<locals>.create_task.<locals>.LightevalTaskFromConfig'>, 'custom|arc_context': <class 'lighteval.tasks.registry.create_config_tasks.<locals>.create_task.<locals>.LightevalTaskFromConfig'>, 'custom|arc_context_choice': <class 'lighteval.tasks.registry.create_config_tasks.<locals>.create_task.<locals>.LightevalTaskFromConfig'>, 'custom|arc_context_labels': <class 'lighteval.tasks.registry.create_config_tasks.<locals>.create_task.<locals>.LightevalTaskFromConfig'>}\n",
"WARNING:lighteval.logging.hierarchical_logger: allenai/ai2_arc ARC-Challenge\n",
"WARNING:lighteval.logging.hierarchical_logger: allenai/ai2_arc ARC-Challenge\n",
"WARNING:lighteval.logging.hierarchical_logger: allenai/ai2_arc ARC-Challenge\n",
"WARNING:lighteval.logging.hierarchical_logger: allenai/ai2_arc ARC-Challenge\n",
"WARNING:lighteval.logging.hierarchical_logger: Loading documents, and requests\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:12.300826]\n",
"WARNING:lighteval.logging.hierarchical_logger:Setting seeds and waiting for all processes {\n",
"WARNING:lighteval.logging.hierarchical_logger: setting seed to 1234 for random and numpy\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:00.000334]\n",
"WARNING:lighteval.logging.hierarchical_logger:Evaluation {\n",
"WARNING:lighteval.logging.hierarchical_logger: Evaluate on 4 tasks.\n",
"WARNING:lighteval.logging.hierarchical_logger: Running RequestType.GREEDY_UNTIL requests\n",
"WARNING:lighteval.logging.hierarchical_logger: \u001b[33mYou cannot select the number of dataset splits for a generative evaluation at the moment. Automatically inferring.\u001b[0m\n",
"Greedy generation: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [06:41<00:00, 9.73s/it]\u001b[A\n",
"Splits: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [06:41<00:00, 401.95s/it]\u001b[A\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:lighteval.logging.hierarchical_logger: Running RequestType.LOGLIKELIHOOD requests\n",
"100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [05:26<00:00, 8.17s/it]\u001b[A\n",
"1it [05:26, 326.90s/it]\n",
"100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [04:50<00:00, 7.25s/it]\u001b[A\n",
"2it [10:16, 305.21s/it]\n",
"100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [03:27<00:00, 5.19s/it]\u001b[A\n",
"3it [13:44, 260.60s/it]\n",
"100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 36/36 [02:56<00:00, 4.91s/it]\u001b[A\n",
"4it [16:41, 250.28s/it]\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:23:23.253299]\n",
"WARNING:lighteval.logging.hierarchical_logger:Compiling results {\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:00.000472]\n",
"WARNING:lighteval.logging.hierarchical_logger:Cleaning up {\n",
"WARNING:lighteval.logging.hierarchical_logger:} [0:00:00.000034]\n",
"WARNING:lighteval.logging.hierarchical_logger:Saving experiment tracker\n",
"WARNING:lighteval.logging.hierarchical_logger:Saving results to .../tmp/results/HuggingFaceTB/SmolLM-1.7B/results_2024-10-24T16-24-58.398434.json\n",
"WARNING:lighteval.logging.hierarchical_logger:Saving details to .../tmp/details/HuggingFaceTB/SmolLM-1.7B/2024-10-24T16-24-58.398434\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b1e4e357b68b41f8ac49469cddda318d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Creating parquet from Arrow format: 0%| | 0/1 [00:00<?, ?ba/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "434138b2f5f84ffcae32685dcf71a6c7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Creating parquet from Arrow format: 0%| | 0/1 [00:00<?, ?ba/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9200001cbdc6422197dc65aaacebe6b4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Creating parquet from Arrow format: 0%| | 0/1 [00:00<?, ?ba/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "685264a9da3b4c79b1fef669cec70460",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Creating parquet from Arrow format: 0%| | 0/1 [00:00<?, ?ba/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Paramètres pour sauvegarder les résultats de l'évaluation\n",
"evaluation_tracker = EvaluationTracker(\n",
" output_dir=cache_dir,\n",
" save_details=True,\n",
" # Ces 2 options requièrent que vous soyez connecté avec le CLI de huggingface_hub\n",
" # push_to_hub=True,\n",
" # hub_results_org=\"your username\", \n",
")\n",
"\n",
"\n",
"# Paramètres de l'ensemble du pipeline\n",
"pipeline_params = PipelineParameters(\n",
" launcher_type=ParallelismManager.ACCELERATE,\n",
" env_config=EnvConfig(cache_dir=cache_dir),\n",
" override_batch_size=1,\n",
" max_samples=max_samples, # Nous n'effectuons qu'une petite éxécution ici, à enlever pour obtenir les vrais résultats\n",
" custom_tasks_directory=task_module # Nous pouvons transmettre le chemin d'accès à un module ou le module lui-même\n",
")\n",
"\n",
"# Modèle - nous utilisons ici VLLM, mais nous pourrions utiliser TGI, Accelerate, etc.\n",
"model_config = BaseModelConfig(\n",
" pretrained=\"HuggingFaceTB/SmolLM-1.7B\",\n",
" dtype=\"bfloat16\",\n",
" use_chat_template=False,\n",
")\n",
"\n",
"tasks = \",\".join([f\"custom|{task}|3|0\" for task in task_names])\n",
"# Nous sommes prêts !\n",
"pipeline = Pipeline(\n",
" tasks=tasks,\n",
" pipeline_parameters=pipeline_params,\n",
" evaluation_tracker=evaluation_tracker,\n",
" model_config=model_config,\n",
")\n",
"pipeline.evaluate()\n",
"pipeline.save_and_push_results()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "38b63709",
"metadata": {},
"outputs": [],
"source": [
"#pipeline.show_results()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "8ccb72d2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div id=\"zlaxyprctg\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
"<style>\n",
"#zlaxyprctg table {\n",
" font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
" -webkit-font-smoothing: antialiased;\n",
" -moz-osx-font-smoothing: grayscale;\n",
" }\n",
"\n",
"#zlaxyprctg thead, tbody, tfoot, tr, td, th { border-style: none; }\n",
" tr { background-color: transparent; }\n",
"#zlaxyprctg p { margin: 0; padding: 0; }\n",
" #zlaxyprctg .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_caption { padding-top: 4px; padding-bottom: 4px; }\n",
" #zlaxyprctg .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }\n",
" #zlaxyprctg .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }\n",
" #zlaxyprctg .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }\n",
" #zlaxyprctg .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }\n",
" #zlaxyprctg .gt_column_spanner_outer:first-child { padding-left: 0; }\n",
" #zlaxyprctg .gt_column_spanner_outer:last-child { padding-right: 0; }\n",
" #zlaxyprctg .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }\n",
" #zlaxyprctg .gt_spanner_row { border-bottom-style: hidden; }\n",
" #zlaxyprctg .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }\n",
" #zlaxyprctg .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }\n",
" #zlaxyprctg .gt_from_md> :first-child { margin-top: 0; }\n",
" #zlaxyprctg .gt_from_md> :last-child { margin-bottom: 0; }\n",
" #zlaxyprctg .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }\n",
" #zlaxyprctg .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }\n",
" #zlaxyprctg .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }\n",
" #zlaxyprctg .gt_row_group_first td { border-top-width: 2px; }\n",
" #zlaxyprctg .gt_row_group_first th { border-top-width: 2px; }\n",
" #zlaxyprctg .gt_striped { background-color: rgba(128,128,128,0.05); }\n",
" #zlaxyprctg .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }\n",
" #zlaxyprctg .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }\n",
" #zlaxyprctg .gt_left { text-align: left; }\n",
" #zlaxyprctg .gt_center { text-align: center; }\n",
" #zlaxyprctg .gt_right { text-align: right; font-variant-numeric: tabular-nums; }\n",
" #zlaxyprctg .gt_font_normal { font-weight: normal; }\n",
" #zlaxyprctg .gt_font_bold { font-weight: bold; }\n",
" #zlaxyprctg .gt_font_italic { font-style: italic; }\n",
" #zlaxyprctg .gt_super { font-size: 65%; }\n",
" #zlaxyprctg .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }\n",
" #zlaxyprctg .gt_asterisk { font-size: 100%; vertical-align: 0; }\n",
" \n",
"</style>\n",
"<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
"<thead>\n",
"\n",
" <tr class=\"gt_heading\">\n",
" <td colspan=\"3\" class=\"gt_heading gt_title gt_font_normal\">Results</td>\n",
" </tr>\n",
"<tr class=\"gt_col_headings gt_spanner_row\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"Prompt function\">Prompt function</th>\n",
" <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"2\" scope=\"colgroup\" id=\"Evaluations\">\n",
" <span class=\"gt_column_spanner\">Evaluations</span>\n",
" </th>\n",
"</tr>\n",
"<tr class=\"gt_col_headings\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"Quasi Exact Match\">Quasi Exact Match</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"Normalized Accuracy\">Normalized Accuracy</th>\n",
"</tr>\n",
"</thead>\n",
"<tbody class=\"gt_table_body\">\n",
" <tr>\n",
" <td class=\"gt_row gt_left\">arc base</td>\n",
" <td class=\"gt_row gt_right\">0.0</td>\n",
" <td class=\"gt_row gt_right\">0.3</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"gt_row gt_left\">arc context</td>\n",
" <td class=\"gt_row gt_right\">0.1</td>\n",
" <td class=\"gt_row gt_right\">0.5</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"gt_row gt_left\">arc context choice</td>\n",
" <td class=\"gt_row gt_right\">0.4</td>\n",
" <td class=\"gt_row gt_right\">0.3</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"gt_row gt_left\">arc context labels</td>\n",
" <td class=\"gt_row gt_right\">0.0</td>\n",
" <td class=\"gt_row gt_right\">0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"gt_row gt_left\">all</td>\n",
" <td class=\"gt_row gt_right\">0.125</td>\n",
" <td class=\"gt_row gt_right\">0.275</td>\n",
" </tr>\n",
"</tbody>\n",
"\n",
"\n",
"</table>\n",
"\n",
"</div>\n",
" "
],
"text/plain": [
"GT(_tbl_data=shape: (5, 3)\n",
"┌────────────────────┬───────────────────┬─────────────────────┐\n",
"│ Prompt function ┆ Quasi Exact Match ┆ Normalized Accuracy │\n",
"│ --- ┆ --- ┆ --- │\n",
"│ str ┆ f64 ┆ f64 │\n",
"╞════════════════════╪═══════════════════╪═════════════════════╡\n",
"│ arc base ┆ 0.0 ┆ 0.3 │\n",
"│ arc context ┆ 0.1 ┆ 0.5 │\n",
"│ arc context choice ┆ 0.4 ┆ 0.3 │\n",
"│ arc context labels ┆ 0.0 ┆ 0.0 │\n",
"│ all ┆ 0.125 ┆ 0.275 │\n",
"└────────────────────┴───────────────────┴─────────────────────┘, _body=<great_tables._gt_data.Body object at 0x7f074da27010>, _boxhead=Boxhead([ColInfo(var='Prompt function', type=<ColInfoTypeEnum.default: 1>, column_label='Prompt function', column_align='left', column_width=None), ColInfo(var='Quasi Exact Match', type=<ColInfoTypeEnum.default: 1>, column_label='Quasi Exact Match', column_align='right', column_width=None), ColInfo(var='Normalized Accuracy', type=<ColInfoTypeEnum.default: 1>, column_label='Normalized Accuracy', column_align='right', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x7f074da277c0>, _spanners=Spanners([SpannerInfo(spanner_id='Evaluations', spanner_level=0, spanner_label='Evaluations', spanner_units=None, spanner_pattern=None, vars=['Quasi Exact Match', 'Normalized Accuracy'], built=None)]), _heading=Heading(title='Results', subtitle=None, preheader=None), _stubhead=None, _source_notes=[], _footnotes=[], _styles=[], _locale=<great_tables._gt_data.Locale object at 0x7f074c8b6e30>, _formats=[], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='100%'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='8px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='8px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results = pipeline.get_results()[\"results\"]\n",
"results_processed = []\n",
"for eval_name, eval_results in results.items():\n",
" results_processed.append({\n",
" \"Prompt function\": (eval_name.split(\":\")[1] if \":\" in eval_name else eval_name).replace(\"_\", \" \"), \n",
" \"Quasi Exact Match\": eval_results[\"qem\"], \n",
" \"Normalized Accuracy\": eval_results[\"acc_norm\"]\n",
" })\n",
"results_data = pl.from_dicts(results_processed, strict=False)\n",
"(GT(results_data.head(max_samples*4))\n",
" .tab_header(\"Results\")\n",
" .tab_spanner(label=\"Evaluations\", columns=[\"Quasi Exact Match\", \"Normalized Accuracy\"])\n",
"\n",
")"
]
},
{
"cell_type": "markdown",
"id": "872c4403",
"metadata": {},
"source": [
"# Lire les résultats"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "f4aae325",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2ca65572fde9462ab6c29b6f17974c65",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Generating train split: 0 examples [00:00, ? examples/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "84e8f2c884de4ecb9b9e2d4c158128a2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Generating train split: 0 examples [00:00, ? examples/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6dfe668ee83242fb9b9070b875db3f40",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Generating train split: 0 examples [00:00, ? examples/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "11ff92775dca4ff5aca86c24fccc038b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Generating train split: 0 examples [00:00, ? examples/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"path = f\"{cache_dir}/details/HuggingFaceTB/SmolLM-1.7B/\"\n",
"\n",
"results = {}\n",
"\n",
"for root, _, files in os.walk(path):\n",
" for file in files:\n",
" eval_name = file.split(\"|\")[1]\n",
" results[eval_name] = load_dataset(\"parquet\", data_files=f\"{root}/{file}\")[\"train\"]\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "08165452",
"metadata": {},
"outputs": [],
"source": [
"# créer un nouveau DataFrame pour stocker les données transformées\n",
"transformed_data = []\n",
"keys = [\"example\", \"gold\", \"predictions\", \"metrics\"]\n",
"\n",
"# itérer sur chaque jeu de données et ses échantillons\n",
"for ix in range(max_samples * 2):\n",
" for key in keys:\n",
" cur_sample = {\"Sample\": f\"Sample {ix}\", \"Type\": key.capitalize()}\n",
" for eval_name, df in sorted(results.items()):\n",
" try:\n",
" cur_result = literal_eval(results[eval_name][ix][key])\n",
" if isinstance(cur_result, list):\n",
" if len(cur_result) == 1:\n",
" cur_sample[eval_name] = cur_result[0]\n",
" else:\n",
" cur_sample[eval_name] = \"\\n\".join([str(i) for i in cur_result])\n",
" elif isinstance(cur_result, dict):\n",
" for metric, value in cur_result.items():\n",
" cur_sample[eval_name] = str(value)\n",
" cur_sample[\"Type\"] = f\"{key.capitalize()}: {metric}\"\n",
" except SyntaxError:\n",
" cur_sample[eval_name] = results[eval_name][ix][key]\n",
" \n",
" for k, v in cur_sample.items():\n",
" # Nous remplaçons les \\n de python par des <br /> markdown pour l'affichage du tableau\n",
" if isinstance(v, str):\n",
" cur_sample[k] = v.replace(\"\\n\", \"<br />\")\n",
" transformed_data.append(cur_sample)"
]
},
{
"cell_type": "markdown",
"id": "e2f3d2f2",
"metadata": {},
"source": [
"### Examinons les résultats des générations"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "25cde03f",
"metadata": {},
"outputs": [],
"source": [
"pl_data = pl.from_dicts(transformed_data, strict=False, infer_schema_length=200)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "bcd7288e",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div id=\"auiqqdecam\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
"<style>\n",
"#auiqqdecam table {\n",
" font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
" -webkit-font-smoothing: antialiased;\n",
" -moz-osx-font-smoothing: grayscale;\n",
" }\n",
"\n",
"#auiqqdecam thead, tbody, tfoot, tr, td, th { border-style: none; }\n",
" tr { background-color: transparent; }\n",
"#auiqqdecam p { margin: 0; padding: 0; }\n",
" #auiqqdecam .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }\n",
" #auiqqdecam .gt_caption { padding-top: 4px; padding-bottom: 4px; }\n",
" #auiqqdecam .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }\n",
" #auiqqdecam .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }\n",
" #auiqqdecam .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #auiqqdecam .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #auiqqdecam .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #auiqqdecam .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }\n",
" #auiqqdecam .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }\n",
" #auiqqdecam .gt_column_spanner_outer:first-child { padding-left: 0; }\n",
" #auiqqdecam .gt_column_spanner_outer:last-child { padding-right: 0; }\n",
" #auiqqdecam .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }\n",
" #auiqqdecam .gt_spanner_row { border-bottom-style: hidden; }\n",
" #auiqqdecam .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }\n",
" #auiqqdecam .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }\n",
" #auiqqdecam .gt_from_md> :first-child { margin-top: 0; }\n",
" #auiqqdecam .gt_from_md> :last-child { margin-bottom: 0; }\n",
" #auiqqdecam .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }\n",
" #auiqqdecam .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }\n",
" #auiqqdecam .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }\n",
" #auiqqdecam .gt_row_group_first td { border-top-width: 2px; }\n",
" #auiqqdecam .gt_row_group_first th { border-top-width: 2px; }\n",
" #auiqqdecam .gt_striped { background-color: rgba(128,128,128,0.05); }\n",
" #auiqqdecam .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #auiqqdecam .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }\n",
" #auiqqdecam .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }\n",
" #auiqqdecam .gt_left { text-align: left; }\n",
" #auiqqdecam .gt_center { text-align: center; }\n",
" #auiqqdecam .gt_right { text-align: right; font-variant-numeric: tabular-nums; }\n",
" #auiqqdecam .gt_font_normal { font-weight: normal; }\n",
" #auiqqdecam .gt_font_bold { font-weight: bold; }\n",
" #auiqqdecam .gt_font_italic { font-style: italic; }\n",
" #auiqqdecam .gt_super { font-size: 65%; }\n",
" #auiqqdecam .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }\n",
" #auiqqdecam .gt_asterisk { font-size: 100%; vertical-align: 0; }\n",
" \n",
"</style>\n",
"<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
"<thead>\n",
"\n",
" <tr class=\"gt_heading\">\n",
" <td colspan=\"5\" class=\"gt_heading gt_title gt_font_normal\">Comparing our different prompts' outputs</td>\n",
" </tr>\n",
"<tr class=\"gt_col_headings gt_spanner_row\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"\"></th>\n",
" <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"4\" scope=\"colgroup\" id=\"Samples\">\n",
" <span class=\"gt_column_spanner\">Samples</span>\n",
" </th>\n",
"</tr>\n",
"<tr class=\"gt_col_headings\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_base\">arc_base</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context\">arc_context</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context_choice\">arc_context_choice</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context_labels\">arc_context_labels</th>\n",
"</tr>\n",
"</thead>\n",
"<tbody class=\"gt_table_body\">\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 0</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />A. The air stays cleaner.<br />B. Cars can travel at faster speeds.<br />C. The skills of the drivers improve.<br />D. It becomes safer to drive on the roads.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />A. The air stays cleaner.<br />B. Cars can travel at faster speeds.<br />C. The skills of the drivers improve.<br />D. It becomes safer to drive on the roads.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">It reduces the amount of pollution in the air</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">It becomes safer to drive on the roads</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 1</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Which statement correctly describes a physical characteristic of the Moon?</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />A. The Moon is made of hot gases.<br />B. The Moon is covered with many craters.<br />C. The Moon has many bodies of liquid water.<br />D. The Moon has the ability to give off its own light.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />A. The Moon is made of hot gases.<br />B. The Moon is covered with many craters.<br />C. The Moon has many bodies of liquid water.<br />D. The Moon has the ability to give off its own light.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">a</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">The Moon has the ability to give off its own light</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 2</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Which object in the solar system is orbited by a belt of asteroids?</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />A. Pluto<br />B. Saturn<br />C. the Sun<br />D. the Moon<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />A. Pluto<br />B. Saturn<br />C. the Sun<br />D. the Moon<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\"></td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">The Sun</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 3</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Light waves that cross from an air medium to a water medium will</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />A. be focused into a straight line.<br />B. lose energy and dissipate.<br />C. change length and direction.<br />D. reflect off the water's surface.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />A. be focused into a straight line.<br />B. lose energy and dissipate.<br />C. change length and direction.<br />D. reflect off the water's surface.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">bend toward the normal</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">change length and direction</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 4</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">How many valence electrons does selenium have?</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />A. 3<br />B. 5<br />C. 6<br />D. 8<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />A. 3<br />B. 5<br />C. 6<br />D. 8<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\"></td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">8</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 5</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />A. Thick fog develops.<br />B. Temperatures increase.<br />C. Clouds begin to form.<br />D. Winds die down.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />A. Thick fog develops.<br />B. Temperatures increase.<br />C. Clouds begin to form.<br />D. Winds die down.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">drought</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">Thick fog develops</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 6</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />A. decrease in air temperature<br />B. increase in rainfall amounts<br />C. slow movement of a glacier<br />D. rapid growth of plant roots<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />A. decrease in air temperature<br />B. increase in rainfall amounts<br />C. slow movement of a glacier<br />D. rapid growth of plant roots<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">a</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 7</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />A. slower<br />B. faster<br />C. at the same speed<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />A. slower<br />B. faster<br />C. at the same speed<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">farther</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">at the same speed</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 8</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />A. A southward dip in the jet stream<br />B. A northward movement of the jet stream<br />C. The Coriolis effect creating a low pressure area<br />D. The Coriolis effect creating a high pressure area<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />A. A southward dip in the jet stream<br />B. A northward movement of the jet stream<br />C. The Coriolis effect creating a low pressure area<br />D. The Coriolis effect creating a high pressure area<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">The sun was farther away from the earth</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">The Coriolis effect creating a low pressure area</td>\n",
" <td class=\"gt_row gt_left\">D</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 9</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />A. 0.02 s<br />B. 50 s<br />C. 100 s<br />D. 200 s<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />A. 0.02 s<br />B. 50 s<br />C. 100 s<br />D. 200 s<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\"></td>\n",
" <td class=\"gt_row gt_left\">100 m/2 m/s = 50 s</td>\n",
" <td class=\"gt_row gt_left\">100 s</td>\n",
" <td class=\"gt_row gt_left\">200 s</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: qem</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
"</tbody>\n",
"\n",
"\n",
"</table>\n",
"\n",
"</div>\n",
" "
],
"text/plain": [
"GT(_tbl_data=shape: (40, 6)\n",
"┌──────────┬──────────────┬──────────────────┬─────────────────┬─────────────────┬─────────────────┐\n",
"│ Sample ┆ Type ┆ arc_base ┆ arc_context ┆ arc_context_cho ┆ arc_context_lab │\n",
"│ --- ┆ --- ┆ --- ┆ --- ┆ ice ┆ els │\n",
"│ str ┆ str ┆ str ┆ str ┆ --- ┆ --- │\n",
"│ ┆ ┆ ┆ ┆ str ┆ str │\n",
"╞══════════╪══════════════╪══════════════════╪═════════════════╪═════════════════╪═════════════════╡\n",
"│ Sample 0 ┆ Example ┆ Cities control ┆ Question: ┆ Question: ┆ Question: │\n",
"│ ┆ ┆ the amount of p… ┆ Cities control ┆ Cities control ┆ Cities control │\n",
"│ ┆ ┆ ┆ the a… ┆ the a… ┆ the a… │\n",
"│ Sample 0 ┆ Gold ┆ The air stays ┆ The air stays ┆ The air stays ┆ A │\n",
"│ ┆ ┆ cleaner. ┆ cleaner. ┆ cleaner. ┆ │\n",
"│ Sample 0 ┆ Predictions ┆ It reduces the ┆ 1 ┆ It becomes ┆ D │\n",
"│ ┆ ┆ amount of pollu… ┆ ┆ safer to drive ┆ │\n",
"│ ┆ ┆ ┆ ┆ on … ┆ │\n",
"│ Sample 0 ┆ Metrics: qem ┆ 0 ┆ 0 ┆ 0 ┆ 0 │\n",
"│ Sample 1 ┆ Example ┆ Which statement ┆ Question: Which ┆ Question: Which ┆ Question: Which │\n",
"│ ┆ ┆ correctly desc… ┆ statement corr… ┆ statement corr… ┆ statement corr… │\n",
"│ … ┆ … ┆ … ┆ … ┆ … ┆ … │\n",
"│ Sample 8 ┆ Metrics: qem ┆ 0 ┆ 0 ┆ 0 ┆ 0 │\n",
"│ Sample 9 ┆ Example ┆ How much time is ┆ Question: How ┆ Question: How ┆ Question: How │\n",
"│ ┆ ┆ required for … ┆ much time is ┆ much time is ┆ much time is │\n",
"│ ┆ ┆ ┆ req… ┆ req… ┆ req… │\n",
"│ Sample 9 ┆ Gold ┆ 50 s ┆ 50 s ┆ 50 s ┆ B │\n",
"│ Sample 9 ┆ Predictions ┆ ┆ 100 m/2 m/s = ┆ 100 s ┆ 200 s │\n",
"│ ┆ ┆ ┆ 50 s ┆ ┆ │\n",
"│ Sample 9 ┆ Metrics: qem ┆ 0 ┆ 0 ┆ 0 ┆ 0 │\n",
"└──────────┴──────────────┴──────────────────┴─────────────────┴─────────────────┴─────────────────┘, _body=<great_tables._gt_data.Body object at 0x7f074da26800>, _boxhead=Boxhead([ColInfo(var='Sample', type=<ColInfoTypeEnum.row_group: 3>, column_label='Sample', column_align='left', column_width=None), ColInfo(var='Type', type=<ColInfoTypeEnum.stub: 2>, column_label='Type', column_align='left', column_width=None), ColInfo(var='arc_base', type=<ColInfoTypeEnum.default: 1>, column_label='arc_base', column_align='left', column_width=None), ColInfo(var='arc_context', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context', column_align='left', column_width=None), ColInfo(var='arc_context_choice', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context_choice', column_align='left', column_width=None), ColInfo(var='arc_context_labels', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context_labels', column_align='left', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x7f074c181ea0>, _spanners=Spanners([SpannerInfo(spanner_id='Samples', spanner_level=0, spanner_label='Samples', spanner_units=None, spanner_pattern=None, vars=['arc_base', 'arc_context', 'arc_context_choice', 'arc_context_labels'], built=None)]), _heading=Heading(title=\"Comparing our different prompts' outputs\", subtitle=None, preheader=None), _stubhead=None, _source_notes=[], _footnotes=[], _styles=[], _locale=<great_tables._gt_data.Locale object at 0x7f074c1604f0>, _formats=[<great_tables._gt_data.FormatInfo object at 0x7f074c160e50>], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='100%'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='8px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='8px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(GT(pl_data.head(max_samples*4))\n",
" .tab_header(\"Comparing our different prompts' outputs\")\n",
" .tab_spanner(label=\"Samples\", columns=cs.starts_with(\"arc\"))\n",
" .tab_stub(rowname_col=\"Type\", groupname_col=\"Sample\")\n",
" .fmt_markdown(columns=cs.starts_with(\"arc\"))\n",
")"
]
},
{
"cell_type": "markdown",
"id": "9fda1fd6",
"metadata": {},
"source": [
"Nous pouvons observer que :\n",
"- le format de base est trop rigide en mode génératif : le modèle ne prédit jamais la bonne fin\n",
"- le format de base + balises question/réponse semble inciter le modèle à produire des nombres, ce qui est inadéquat pour un certain nombre de questions\n",
"- cependant (dans les deux derniers cas), l'introduction des choix dans la question aide le modèle à prédire un choix parmi les choix pertinents !\n",
"\n",
"Il est intéressant de noter que dans le dernier cas, lorsque les choix sont présents mais que le modèle doit prédire l'étiquette, il n'y parvient pas systématiquement. \n",
"\n",
"Dans d'autres cas, comme les échantillons 3 et 4, le modèle ne sélectionnera pas le même choix en prédisant l'étiquette ou en prédisant le choix (si les choix étaient présents)."
]
},
{
"cell_type": "markdown",
"id": "8c2fe99d",
"metadata": {},
"source": [
"### Examinons les log-probabilités en sortie"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "1c5b7411",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div id=\"zbompcphoq\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
"<style>\n",
"#zbompcphoq table {\n",
" font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
" -webkit-font-smoothing: antialiased;\n",
" -moz-osx-font-smoothing: grayscale;\n",
" }\n",
"\n",
"#zbompcphoq thead, tbody, tfoot, tr, td, th { border-style: none; }\n",
" tr { background-color: transparent; }\n",
"#zbompcphoq p { margin: 0; padding: 0; }\n",
" #zbompcphoq .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }\n",
" #zbompcphoq .gt_caption { padding-top: 4px; padding-bottom: 4px; }\n",
" #zbompcphoq .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }\n",
" #zbompcphoq .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }\n",
" #zbompcphoq .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #zbompcphoq .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #zbompcphoq .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }\n",
" #zbompcphoq .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }\n",
" #zbompcphoq .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }\n",
" #zbompcphoq .gt_column_spanner_outer:first-child { padding-left: 0; }\n",
" #zbompcphoq .gt_column_spanner_outer:last-child { padding-right: 0; }\n",
" #zbompcphoq .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }\n",
" #zbompcphoq .gt_spanner_row { border-bottom-style: hidden; }\n",
" #zbompcphoq .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }\n",
" #zbompcphoq .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }\n",
" #zbompcphoq .gt_from_md> :first-child { margin-top: 0; }\n",
" #zbompcphoq .gt_from_md> :last-child { margin-bottom: 0; }\n",
" #zbompcphoq .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }\n",
" #zbompcphoq .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }\n",
" #zbompcphoq .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }\n",
" #zbompcphoq .gt_row_group_first td { border-top-width: 2px; }\n",
" #zbompcphoq .gt_row_group_first th { border-top-width: 2px; }\n",
" #zbompcphoq .gt_striped { background-color: rgba(128,128,128,0.05); }\n",
" #zbompcphoq .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }\n",
" #zbompcphoq .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }\n",
" #zbompcphoq .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }\n",
" #zbompcphoq .gt_left { text-align: left; }\n",
" #zbompcphoq .gt_center { text-align: center; }\n",
" #zbompcphoq .gt_right { text-align: right; font-variant-numeric: tabular-nums; }\n",
" #zbompcphoq .gt_font_normal { font-weight: normal; }\n",
" #zbompcphoq .gt_font_bold { font-weight: bold; }\n",
" #zbompcphoq .gt_font_italic { font-style: italic; }\n",
" #zbompcphoq .gt_super { font-size: 65%; }\n",
" #zbompcphoq .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }\n",
" #zbompcphoq .gt_asterisk { font-size: 100%; vertical-align: 0; }\n",
" \n",
"</style>\n",
"<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
"<thead>\n",
"\n",
" <tr class=\"gt_heading\">\n",
" <td colspan=\"5\" class=\"gt_heading gt_title gt_font_normal\">Comparing our different prompts' outputs</td>\n",
" </tr>\n",
"<tr class=\"gt_col_headings gt_spanner_row\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"\"></th>\n",
" <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"4\" scope=\"colgroup\" id=\"Samples\">\n",
" <span class=\"gt_column_spanner\">Samples</span>\n",
" </th>\n",
"</tr>\n",
"<tr class=\"gt_col_headings\">\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_base\">arc_base</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context\">arc_context</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context_choice\">arc_context_choice</th>\n",
" <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"arc_context_labels\">arc_context_labels</th>\n",
"</tr>\n",
"</thead>\n",
"<tbody class=\"gt_table_body\">\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 10</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />A. The air stays cleaner.<br />B. Cars can travel at faster speeds.<br />C. The skills of the drivers improve.<br />D. It becomes safer to drive on the roads.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Cities control the amount of pollution that is allowed to come from cars. How does this most likely help people?<br />A. The air stays cleaner.<br />B. Cars can travel at faster speeds.<br />C. The skills of the drivers improve.<br />D. It becomes safer to drive on the roads.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">The air stays cleaner.</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-10.595719337463379, False)<br />(-17.943925857543945, False)<br />(-25.558387756347656, False)<br />(-19.944787979125977, False)</td>\n",
" <td class=\"gt_row gt_left\">(-9.650793075561523, False)<br />(-18.44221305847168, False)<br />(-28.147789001464844, False)<br />(-21.082042694091797, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.7918881177902222, False)<br />(-3.5758469104766846, False)<br />(-2.042778253555298, False)<br />(-0.5759693384170532, True)</td>\n",
" <td class=\"gt_row gt_left\">(-1.445155382156372, False)<br />(-1.695155382156372, False)<br />(-1.445155382156372, False)<br />(-1.070155382156372, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 11</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Which statement correctly describes a physical characteristic of the Moon?</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />A. The Moon is made of hot gases.<br />B. The Moon is covered with many craters.<br />C. The Moon has many bodies of liquid water.<br />D. The Moon has the ability to give off its own light.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which statement correctly describes a physical characteristic of the Moon?<br />A. The Moon is made of hot gases.<br />B. The Moon is covered with many craters.<br />C. The Moon has many bodies of liquid water.<br />D. The Moon has the ability to give off its own light.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">The Moon is covered with many craters.</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-14.036760330200195, False)<br />(-14.156133651733398, False)<br />(-23.221176147460938, False)<br />(-22.99703598022461, False)</td>\n",
" <td class=\"gt_row gt_left\">(-12.965611457824707, False)<br />(-11.864521026611328, False)<br />(-20.491010665893555, False)<br />(-21.728534698486328, False)</td>\n",
" <td class=\"gt_row gt_left\">(-4.868813514709473, False)<br />(-3.7199177742004395, False)<br />(-3.739739418029785, False)<br />(-0.2140919268131256, True)</td>\n",
" <td class=\"gt_row gt_left\">(-1.5505614280700684, False)<br />(-1.4255614280700684, False)<br />(-1.3005614280700684, True)<br />(-1.3005614280700684, False)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 12</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Which object in the solar system is orbited by a belt of asteroids?</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />A. Pluto<br />B. Saturn<br />C. the Sun<br />D. the Moon<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Which object in the solar system is orbited by a belt of asteroids?<br />A. Pluto<br />B. Saturn<br />C. the Sun<br />D. the Moon<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">the Sun</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-5.751784801483154, False)<br />(-3.7467873096466064, False)<br />(-6.4582719802856445, False)<br />(-7.0832719802856445, False)</td>\n",
" <td class=\"gt_row gt_left\">(-3.279644250869751, False)<br />(-3.654644250869751, False)<br />(-5.170290946960449, False)<br />(-5.920290946960449, False)</td>\n",
" <td class=\"gt_row gt_left\">(-2.128627300262451, False)<br />(-1.8786273002624512, False)<br />(-0.7749634981155396, True)<br />(-2.774963617324829, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.6950974464416504, False)<br />(-1.4450974464416504, False)<br />(-1.3200974464416504, False)<br />(-1.1950974464416504, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 13</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Light waves that cross from an air medium to a water medium will</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />A. be focused into a straight line.<br />B. lose energy and dissipate.<br />C. change length and direction.<br />D. reflect off the water's surface.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Light waves that cross from an air medium to a water medium will<br />A. be focused into a straight line.<br />B. lose energy and dissipate.<br />C. change length and direction.<br />D. reflect off the water's surface.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">change length and direction.</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-25.314556121826172, False)<br />(-22.782466888427734, False)<br />(-22.68366050720215, False)<br />(-21.23833465576172, False)</td>\n",
" <td class=\"gt_row gt_left\">(-17.779306411743164, False)<br />(-15.633138656616211, False)<br />(-14.039811134338379, False)<br />(-11.432372093200684, False)</td>\n",
" <td class=\"gt_row gt_left\">(-4.998326301574707, False)<br />(-1.623903512954712, False)<br />(-0.5861192941665649, True)<br />(-2.0934457778930664, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.625598669052124, False)<br />(-1.500598669052124, False)<br />(-1.375598669052124, False)<br />(-1.125598669052124, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 14</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">How many valence electrons does selenium have?</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />A. 3<br />B. 5<br />C. 6<br />D. 8<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How many valence electrons does selenium have?<br />A. 3<br />B. 5<br />C. 6<br />D. 8<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">6</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-6.6732683181762695, False)<br />(-6.9232683181762695, False)<br />(-7.2357683181762695, False)<br />(-6.7982683181762695, False)</td>\n",
" <td class=\"gt_row gt_left\">(-3.4133384227752686, False)<br />(-4.663338661193848, False)<br />(-1.1633384227752686, True)<br />(-3.7883384227752686, False)</td>\n",
" <td class=\"gt_row gt_left\">(-6.926815986633301, False)<br />(-6.051815986633301, False)<br />(-0.17681613564491272, True)<br />(-1.9268162250518799, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.8513681888580322, False)<br />(-1.6013681888580322, False)<br />(-1.3513681888580322, False)<br />(-0.976368248462677, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 15</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />A. Thick fog develops.<br />B. Temperatures increase.<br />C. Clouds begin to form.<br />D. Winds die down.<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: As a warm moist air mass moving northward collides with a strong cold air mass moving southward, what observations will most likely be made?<br />A. Thick fog develops.<br />B. Temperatures increase.<br />C. Clouds begin to form.<br />D. Winds die down.<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">Clouds begin to form.</td>\n",
" <td class=\"gt_row gt_left\">C</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-16.48362159729004, False)<br />(-12.333986282348633, False)<br />(-10.768516540527344, False)<br />(-14.52383804321289, False)</td>\n",
" <td class=\"gt_row gt_left\">(-15.831233024597168, False)<br />(-11.781991004943848, False)<br />(-10.162830352783203, False)<br />(-15.114853858947754, False)</td>\n",
" <td class=\"gt_row gt_left\">(-0.6979869604110718, True)<br />(-1.7184417247772217, False)<br />(-2.8269424438476562, False)<br />(-2.2389371395111084, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.4881373643875122, False)<br />(-1.4881373643875122, False)<br />(-1.3631373643875122, False)<br />(-1.2381373643875122, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 16</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />A. decrease in air temperature<br />B. increase in rainfall amounts<br />C. slow movement of a glacier<br />D. rapid growth of plant roots<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: Chemical weathering occurs when minerals in rocks are changed chemically. Which of these will most likely change the rate of chemical weathering on a rock?<br />A. decrease in air temperature<br />B. increase in rainfall amounts<br />C. slow movement of a glacier<br />D. rapid growth of plant roots<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">increase in rainfall amounts</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-15.226205825805664, False)<br />(-18.300310134887695, False)<br />(-18.7595272064209, False)<br />(-16.90313148498535, False)</td>\n",
" <td class=\"gt_row gt_left\">(-15.182734489440918, False)<br />(-16.29802131652832, False)<br />(-15.929485321044922, False)<br />(-15.493678092956543, False)</td>\n",
" <td class=\"gt_row gt_left\">(-2.301724433898926, False)<br />(-1.6302365064620972, False)<br />(-1.4298421144485474, False)<br />(-2.3473901748657227, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.734103798866272, False)<br />(-1.609103798866272, False)<br />(-1.234103798866272, False)<br />(-1.109103798866272, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 17</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />A. slower<br />B. faster<br />C. at the same speed<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A toy truck rolls over a smooth surface. If the surface is covered with sand, the truck will most likely roll<br />A. slower<br />B. faster<br />C. at the same speed<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">slower</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-13.275317192077637, False)<br />(-10.096747398376465, False)<br />(-19.148441314697266, False)</td>\n",
" <td class=\"gt_row gt_left\">(-2.1855695247650146, False)<br />(-2.1855695247650146, True)<br />(-7.597217559814453, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.2695996761322021, False)<br />(-0.7695997357368469, True)<br />(-1.6472738981246948, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.2452011108398438, False)<br />(-1.3702011108398438, False)<br />(-0.995201051235199, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">1</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 18</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />A. A southward dip in the jet stream<br />B. A northward movement of the jet stream<br />C. The Coriolis effect creating a low pressure area<br />D. The Coriolis effect creating a high pressure area<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: A town in northern Arkansas experienced colder than normal temperatures during part of the winter. Which change was most likely responsible for this?<br />A. A southward dip in the jet stream<br />B. A northward movement of the jet stream<br />C. The Coriolis effect creating a low pressure area<br />D. The Coriolis effect creating a high pressure area<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A southward dip in the jet stream</td>\n",
" <td class=\"gt_row gt_left\">A</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-14.345656394958496, False)<br />(-16.05936050415039, False)<br />(-28.54291534423828, False)<br />(-28.780471801757812, False)</td>\n",
" <td class=\"gt_row gt_left\">(-14.603858947753906, False)<br />(-16.18315887451172, False)<br />(-27.121496200561523, False)<br />(-27.188758850097656, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.6069732904434204, False)<br />(-3.61207914352417, False)<br />(-0.9148926734924316, True)<br />(-1.2960143089294434, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.4954701662063599, False)<br />(-1.6204701662063599, False)<br />(-1.2454701662063599, True)<br />(-1.2454701662063599, False)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
" <tr class=\"gt_group_heading_row\">\n",
" <th class=\"gt_group_heading\" colspan=\"5\">Sample 19</th>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Example</th>\n",
" <td class=\"gt_row gt_left\">How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />A. 0.02 s<br />B. 50 s<br />C. 100 s<br />D. 200 s<br />Answer:</td>\n",
" <td class=\"gt_row gt_left\">Question: How much time is required for a bicycle to travel a distance of 100 m at an average speed of 2 m/s?<br />A. 0.02 s<br />B. 50 s<br />C. 100 s<br />D. 200 s<br />Answer:</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Gold</th>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">50 s</td>\n",
" <td class=\"gt_row gt_left\">B</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Predictions</th>\n",
" <td class=\"gt_row gt_left\">(-9.211626052856445, False)<br />(-7.683445453643799, False)<br />(-7.148634433746338, False)<br />(-8.429720878601074, False)</td>\n",
" <td class=\"gt_row gt_left\">(-7.6334710121154785, False)<br />(-4.587807655334473, False)<br />(-4.615830421447754, False)<br />(-6.059815883636475, False)</td>\n",
" <td class=\"gt_row gt_left\">(-3.2665140628814697, False)<br />(-1.9924125671386719, False)<br />(-0.8778499960899353, True)<br />(-0.9978684186935425, False)</td>\n",
" <td class=\"gt_row gt_left\">(-1.7351858615875244, False)<br />(-1.6101858615875244, False)<br />(-1.2351858615875244, False)<br />(-1.1101858615875244, True)</td>\n",
" </tr>\n",
" <tr>\n",
" <th class=\"gt_row gt_left gt_stub\">Metrics: acc_norm</th>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" <td class=\"gt_row gt_left\">0</td>\n",
" </tr>\n",
"</tbody>\n",
"\n",
"\n",
"</table>\n",
"\n",
"</div>\n",
" "
],
"text/plain": [
"GT(_tbl_data=shape: (40, 6)\n",
"┌───────────┬─────────────┬──────────────────┬─────────────────┬─────────────────┬─────────────────┐\n",
"│ Sample ┆ Type ┆ arc_base ┆ arc_context ┆ arc_context_cho ┆ arc_context_lab │\n",
"│ --- ┆ --- ┆ --- ┆ --- ┆ ice ┆ els │\n",
"│ str ┆ str ┆ str ┆ str ┆ --- ┆ --- │\n",
"│ ┆ ┆ ┆ ┆ str ┆ str │\n",
"╞═══════════╪═════════════╪══════════════════╪═════════════════╪═════════════════╪═════════════════╡\n",
"│ Sample 10 ┆ Example ┆ Cities control ┆ Question: ┆ Question: ┆ Question: │\n",
"│ ┆ ┆ the amount of p… ┆ Cities control ┆ Cities control ┆ Cities control │\n",
"│ ┆ ┆ ┆ the a… ┆ the a… ┆ the a… │\n",
"│ Sample 10 ┆ Gold ┆ The air stays ┆ The air stays ┆ The air stays ┆ A │\n",
"│ ┆ ┆ cleaner. ┆ cleaner. ┆ cleaner. ┆ │\n",
"│ Sample 10 ┆ Predictions ┆ (-10.59571933746 ┆ (-9.65079307556 ┆ (-1.79188811779 ┆ (-1.44515538215 │\n",
"│ ┆ ┆ 3379, False)<b… ┆ 1523, ┆ 02222, ┆ 6372, │\n",
"│ ┆ ┆ ┆ False)<br… ┆ False)<b… ┆ False)<br… │\n",
"│ Sample 10 ┆ Metrics: ┆ 1 ┆ 1 ┆ 0 ┆ 0 │\n",
"│ ┆ acc_norm ┆ ┆ ┆ ┆ │\n",
"│ Sample 11 ┆ Example ┆ Which statement ┆ Question: Which ┆ Question: Which ┆ Question: Which │\n",
"│ ┆ ┆ correctly desc… ┆ statement corr… ┆ statement corr… ┆ statement corr… │\n",
"│ … ┆ … ┆ … ┆ … ┆ … ┆ … │\n",
"│ Sample 18 ┆ Metrics: ┆ 0 ┆ 0 ┆ 0 ┆ 0 │\n",
"│ ┆ acc_norm ┆ ┆ ┆ ┆ │\n",
"│ Sample 19 ┆ Example ┆ How much time is ┆ Question: How ┆ Question: How ┆ Question: How │\n",
"│ ┆ ┆ required for … ┆ much time is ┆ much time is ┆ much time is │\n",
"│ ┆ ┆ ┆ req… ┆ req… ┆ req… │\n",
"│ Sample 19 ┆ Gold ┆ 50 s ┆ 50 s ┆ 50 s ┆ B │\n",
"│ Sample 19 ┆ Predictions ┆ (-9.211626052856 ┆ (-7.63347101211 ┆ (-3.26651406288 ┆ (-1.73518586158 │\n",
"│ ┆ ┆ 445, False)<br… ┆ 54785, ┆ 14697, ┆ 75244, │\n",
"│ ┆ ┆ ┆ False)<b… ┆ False)<b… ┆ False)<b… │\n",
"│ Sample 19 ┆ Metrics: ┆ 0 ┆ 0 ┆ 0 ┆ 0 │\n",
"│ ┆ acc_norm ┆ ┆ ┆ ┆ │\n",
"└───────────┴─────────────┴──────────────────┴─────────────────┴─────────────────┴─────────────────┘, _body=<great_tables._gt_data.Body object at 0x7f074c8b4a30>, _boxhead=Boxhead([ColInfo(var='Sample', type=<ColInfoTypeEnum.row_group: 3>, column_label='Sample', column_align='left', column_width=None), ColInfo(var='Type', type=<ColInfoTypeEnum.stub: 2>, column_label='Type', column_align='left', column_width=None), ColInfo(var='arc_base', type=<ColInfoTypeEnum.default: 1>, column_label='arc_base', column_align='left', column_width=None), ColInfo(var='arc_context', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context', column_align='left', column_width=None), ColInfo(var='arc_context_choice', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context_choice', column_align='left', column_width=None), ColInfo(var='arc_context_labels', type=<ColInfoTypeEnum.default: 1>, column_label='arc_context_labels', column_align='left', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x7f074c12a890>, _spanners=Spanners([SpannerInfo(spanner_id='Samples', spanner_level=0, spanner_label='Samples', spanner_units=None, spanner_pattern=None, vars=['arc_base', 'arc_context', 'arc_context_choice', 'arc_context_labels'], built=None)]), _heading=Heading(title=\"Comparing our different prompts' outputs\", subtitle=None, preheader=None), _stubhead=None, _source_notes=[], _footnotes=[], _styles=[], _locale=<great_tables._gt_data.Locale object at 0x7f074c8b6170>, _formats=[<great_tables._gt_data.FormatInfo object at 0x7f074c8c7880>], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='100%'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='8px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='2px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='#D3D3D3'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='8px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(GT(pl_data.tail(max_samples * 4))\n",
" .tab_header(\"Comparing our different prompts' outputs\")\n",
" .tab_spanner(label=\"Samples\", columns=cs.starts_with(\"arc\"))\n",
" .tab_stub(rowname_col=\"Type\", groupname_col=\"Sample\")\n",
" .fmt_markdown(columns=cs.starts_with(\"arc\"))\n",
")"
]
},
{
"cell_type": "markdown",
"id": "07a8d041",
"metadata": {},
"source": [
"Lorsque l'on examine les log-vraisemblances des générations, ce qui semble curieusement fonctionner le mieux pour ce modèle est le fait de ne pas avoir indiqué d'exemples dans l'instruction, dans un mécanisme opposé à celui des évaluations de générations."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|