Spaces:
Sleeping
Sleeping
File size: 237,318 Bytes
4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 a942057 4acec17 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "5BN13TZlSCv4",
"outputId": "424a6920-0cea-4e28-dce0-3de6f0a4cc3c"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: langchain in /opt/anaconda3/lib/python3.12/site-packages (0.3.0)\n",
"Requirement already satisfied: langchain_community in /opt/anaconda3/lib/python3.12/site-packages (0.2.17)\n",
"Requirement already satisfied: langchain_openai in /opt/anaconda3/lib/python3.12/site-packages (0.2.0)\n",
"Requirement already satisfied: chromadb in /opt/anaconda3/lib/python3.12/site-packages (0.5.5)\n",
"Requirement already satisfied: pypdf in /opt/anaconda3/lib/python3.12/site-packages (5.0.0)\n",
"Requirement already satisfied: langsmith in /opt/anaconda3/lib/python3.12/site-packages (0.1.125)\n",
"Requirement already satisfied: qdrant-client in /opt/anaconda3/lib/python3.12/site-packages (1.11.1)\n",
"Requirement already satisfied: ragas in /opt/anaconda3/lib/python3.12/site-packages (0.1.20)\n",
"Requirement already satisfied: pandas in /opt/anaconda3/lib/python3.12/site-packages (2.2.2)\n",
"Requirement already satisfied: PyYAML>=5.3 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (6.0.1)\n",
"Requirement already satisfied: SQLAlchemy<3,>=1.4 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (2.0.30)\n",
"Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (3.9.5)\n",
"Requirement already satisfied: langchain-core<0.4.0,>=0.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (0.3.2)\n",
"Requirement already satisfied: langchain-text-splitters<0.4.0,>=0.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (0.3.0)\n",
"Requirement already satisfied: numpy<2.0.0,>=1.26.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (1.26.4)\n",
"Requirement already satisfied: pydantic<3.0.0,>=2.7.4 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (2.9.2)\n",
"Requirement already satisfied: requests<3,>=2 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (2.32.2)\n",
"Requirement already satisfied: tenacity!=8.4.0,<9.0.0,>=8.1.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain) (8.5.0)\n",
"Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in /opt/anaconda3/lib/python3.12/site-packages (from langchain_community) (0.5.14)\n",
"Collecting langchain\n",
" Using cached langchain-0.2.16-py3-none-any.whl.metadata (7.1 kB)\n",
"INFO: pip is looking at multiple versions of langchain-community to determine which version is compatible with other requirements. This could take a while.\n",
"Collecting langchain_community\n",
" Using cached langchain_community-0.3.0-py3-none-any.whl.metadata (2.8 kB)\n",
"Requirement already satisfied: pydantic-settings<3.0.0,>=2.4.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain_community) (2.5.2)\n",
"Requirement already satisfied: openai<2.0.0,>=1.40.0 in /opt/anaconda3/lib/python3.12/site-packages (from langchain_openai) (1.46.0)\n",
"Requirement already satisfied: tiktoken<1,>=0.7 in /opt/anaconda3/lib/python3.12/site-packages (from langchain_openai) (0.7.0)\n",
"Requirement already satisfied: build>=1.0.3 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.2.1)\n",
"Requirement already satisfied: chroma-hnswlib==0.7.6 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.7.6)\n",
"Requirement already satisfied: fastapi>=0.95.2 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.110.3)\n",
"Requirement already satisfied: uvicorn>=0.18.3 in /opt/anaconda3/lib/python3.12/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.25.0)\n",
"Requirement already satisfied: posthog>=2.4.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (3.5.0)\n",
"Requirement already satisfied: typing-extensions>=4.5.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (4.11.0)\n",
"Requirement already satisfied: onnxruntime>=1.14.1 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.18.1)\n",
"Requirement already satisfied: opentelemetry-api>=1.2.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.25.0)\n",
"Requirement already satisfied: opentelemetry-exporter-otlp-proto-grpc>=1.2.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.25.0)\n",
"Requirement already satisfied: opentelemetry-instrumentation-fastapi>=0.41b0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.46b0)\n",
"Requirement already satisfied: opentelemetry-sdk>=1.2.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.25.0)\n",
"Requirement already satisfied: tokenizers>=0.13.2 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.19.1)\n",
"Requirement already satisfied: pypika>=0.48.9 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.48.9)\n",
"Requirement already satisfied: tqdm>=4.65.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (4.66.4)\n",
"Requirement already satisfied: overrides>=7.3.1 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (7.4.0)\n",
"Requirement already satisfied: importlib-resources in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (6.4.0)\n",
"Requirement already satisfied: grpcio>=1.58.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (1.66.1)\n",
"Requirement already satisfied: bcrypt>=4.0.1 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (4.2.0)\n",
"Requirement already satisfied: typer>=0.9.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.12.3)\n",
"Requirement already satisfied: kubernetes>=28.1.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (30.1.0)\n",
"Requirement already satisfied: mmh3>=4.0.1 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (4.1.0)\n",
"Requirement already satisfied: orjson>=3.9.12 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (3.10.6)\n",
"Requirement already satisfied: httpx>=0.27.0 in /opt/anaconda3/lib/python3.12/site-packages (from chromadb) (0.27.0)\n",
"Requirement already satisfied: grpcio-tools>=1.41.0 in /opt/anaconda3/lib/python3.12/site-packages (from qdrant-client) (1.62.3)\n",
"Requirement already satisfied: portalocker<3.0.0,>=2.7.0 in /opt/anaconda3/lib/python3.12/site-packages (from qdrant-client) (2.10.1)\n",
"Requirement already satisfied: urllib3<3,>=1.26.14 in /opt/anaconda3/lib/python3.12/site-packages (from qdrant-client) (2.2.2)\n",
"Requirement already satisfied: datasets in /opt/anaconda3/lib/python3.12/site-packages (from ragas) (3.0.0)\n",
"INFO: pip is looking at multiple versions of ragas to determine which version is compatible with other requirements. This could take a while.\n",
"Collecting ragas\n",
" Downloading ragas-0.1.19-py3-none-any.whl.metadata (5.4 kB)\n",
"Requirement already satisfied: pysbd>=0.3.4 in /opt/anaconda3/lib/python3.12/site-packages (from ragas) (0.3.4)\n",
"Requirement already satisfied: nest-asyncio in /opt/anaconda3/lib/python3.12/site-packages (from ragas) (1.6.0)\n",
"Requirement already satisfied: appdirs in /opt/anaconda3/lib/python3.12/site-packages (from ragas) (1.4.4)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in /opt/anaconda3/lib/python3.12/site-packages (from pandas) (2.9.0.post0)\n",
"Requirement already satisfied: pytz>=2020.1 in /opt/anaconda3/lib/python3.12/site-packages (from pandas) (2024.1)\n",
"Requirement already satisfied: tzdata>=2022.7 in /opt/anaconda3/lib/python3.12/site-packages (from pandas) (2023.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /opt/anaconda3/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.2.0)\n",
"Requirement already satisfied: attrs>=17.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (23.1.0)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /opt/anaconda3/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.4.0)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /opt/anaconda3/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.4)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /opt/anaconda3/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.9.3)\n",
"Requirement already satisfied: packaging>=19.1 in /opt/anaconda3/lib/python3.12/site-packages (from build>=1.0.3->chromadb) (23.2)\n",
"Requirement already satisfied: pyproject_hooks in /opt/anaconda3/lib/python3.12/site-packages (from build>=1.0.3->chromadb) (1.1.0)\n",
"Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in /opt/anaconda3/lib/python3.12/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain_community) (3.21.3)\n",
"Requirement already satisfied: typing-inspect<1,>=0.4.0 in /opt/anaconda3/lib/python3.12/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain_community) (0.9.0)\n",
"Requirement already satisfied: starlette<0.38.0,>=0.37.2 in /opt/anaconda3/lib/python3.12/site-packages (from fastapi>=0.95.2->chromadb) (0.37.2)\n",
"Requirement already satisfied: protobuf<5.0dev,>=4.21.6 in /opt/anaconda3/lib/python3.12/site-packages (from grpcio-tools>=1.41.0->qdrant-client) (4.25.4)\n",
"Requirement already satisfied: setuptools in /opt/anaconda3/lib/python3.12/site-packages (from grpcio-tools>=1.41.0->qdrant-client) (69.5.1)\n",
"Requirement already satisfied: anyio in /opt/anaconda3/lib/python3.12/site-packages (from httpx>=0.27.0->chromadb) (3.7.1)\n",
"Requirement already satisfied: certifi in /opt/anaconda3/lib/python3.12/site-packages (from httpx>=0.27.0->chromadb) (2024.6.2)\n",
"Requirement already satisfied: httpcore==1.* in /opt/anaconda3/lib/python3.12/site-packages (from httpx>=0.27.0->chromadb) (1.0.5)\n",
"Requirement already satisfied: idna in /opt/anaconda3/lib/python3.12/site-packages (from httpx>=0.27.0->chromadb) (3.7)\n",
"Requirement already satisfied: sniffio in /opt/anaconda3/lib/python3.12/site-packages (from httpx>=0.27.0->chromadb) (1.3.0)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in /opt/anaconda3/lib/python3.12/site-packages (from httpcore==1.*->httpx>=0.27.0->chromadb) (0.14.0)\n",
"Requirement already satisfied: h2<5,>=3 in /opt/anaconda3/lib/python3.12/site-packages (from httpx[http2]>=0.20.0->qdrant-client) (4.1.0)\n",
"Requirement already satisfied: six>=1.9.0 in /opt/anaconda3/lib/python3.12/site-packages (from kubernetes>=28.1.0->chromadb) (1.16.0)\n",
"Requirement already satisfied: google-auth>=1.0.1 in /opt/anaconda3/lib/python3.12/site-packages (from kubernetes>=28.1.0->chromadb) (2.33.0)\n",
"Requirement already satisfied: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in /opt/anaconda3/lib/python3.12/site-packages (from kubernetes>=28.1.0->chromadb) (1.8.0)\n",
"Requirement already satisfied: requests-oauthlib in /opt/anaconda3/lib/python3.12/site-packages (from kubernetes>=28.1.0->chromadb) (2.0.0)\n",
"Requirement already satisfied: oauthlib>=3.2.2 in /opt/anaconda3/lib/python3.12/site-packages (from kubernetes>=28.1.0->chromadb) (3.2.2)\n",
"Requirement already satisfied: jsonpatch<2.0,>=1.33 in /opt/anaconda3/lib/python3.12/site-packages (from langchain-core<0.4.0,>=0.3.0->langchain) (1.33)\n",
"Requirement already satisfied: coloredlogs in /opt/anaconda3/lib/python3.12/site-packages (from onnxruntime>=1.14.1->chromadb) (15.0.1)\n",
"Requirement already satisfied: flatbuffers in /opt/anaconda3/lib/python3.12/site-packages (from onnxruntime>=1.14.1->chromadb) (24.3.25)\n",
"Requirement already satisfied: sympy in /opt/anaconda3/lib/python3.12/site-packages (from onnxruntime>=1.14.1->chromadb) (1.12)\n",
"Requirement already satisfied: distro<2,>=1.7.0 in /opt/anaconda3/lib/python3.12/site-packages (from openai<2.0.0,>=1.40.0->langchain_openai) (1.9.0)\n",
"Requirement already satisfied: jiter<1,>=0.4.0 in /opt/anaconda3/lib/python3.12/site-packages (from openai<2.0.0,>=1.40.0->langchain_openai) (0.5.0)\n",
"Requirement already satisfied: deprecated>=1.2.6 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-api>=1.2.0->chromadb) (1.2.14)\n",
"Requirement already satisfied: importlib-metadata<=7.1,>=6.0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-api>=1.2.0->chromadb) (6.11.0)\n",
"Requirement already satisfied: googleapis-common-protos~=1.52 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.63.2)\n",
"Requirement already satisfied: opentelemetry-exporter-otlp-proto-common==1.25.0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.25.0)\n",
"Requirement already satisfied: opentelemetry-proto==1.25.0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.25.0)\n",
"Requirement already satisfied: opentelemetry-instrumentation-asgi==0.46b0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.46b0)\n",
"Requirement already satisfied: opentelemetry-instrumentation==0.46b0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.46b0)\n",
"Requirement already satisfied: opentelemetry-semantic-conventions==0.46b0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.46b0)\n",
"Requirement already satisfied: opentelemetry-util-http==0.46b0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.46b0)\n",
"Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation==0.46b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (1.14.1)\n",
"Requirement already satisfied: asgiref~=3.0 in /opt/anaconda3/lib/python3.12/site-packages (from opentelemetry-instrumentation-asgi==0.46b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (3.8.1)\n",
"Requirement already satisfied: monotonic>=1.5 in /opt/anaconda3/lib/python3.12/site-packages (from posthog>=2.4.0->chromadb) (1.6)\n",
"Requirement already satisfied: backoff>=1.10.0 in /opt/anaconda3/lib/python3.12/site-packages (from posthog>=2.4.0->chromadb) (2.2.1)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in /opt/anaconda3/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.7.4->langchain) (0.6.0)\n",
"Requirement already satisfied: pydantic-core==2.23.4 in /opt/anaconda3/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.7.4->langchain) (2.23.4)\n",
"Requirement already satisfied: python-dotenv>=0.21.0 in /opt/anaconda3/lib/python3.12/site-packages (from pydantic-settings<3.0.0,>=2.4.0->langchain_community) (1.0.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /opt/anaconda3/lib/python3.12/site-packages (from requests<3,>=2->langchain) (3.3.2)\n",
"Requirement already satisfied: regex>=2022.1.18 in /opt/anaconda3/lib/python3.12/site-packages (from tiktoken<1,>=0.7->langchain_openai) (2023.10.3)\n",
"Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in /opt/anaconda3/lib/python3.12/site-packages (from tokenizers>=0.13.2->chromadb) (0.23.4)\n",
"Requirement already satisfied: click>=8.0.0 in /opt/anaconda3/lib/python3.12/site-packages (from typer>=0.9.0->chromadb) (8.1.7)\n",
"Requirement already satisfied: shellingham>=1.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from typer>=0.9.0->chromadb) (1.5.4)\n",
"Requirement already satisfied: rich>=10.11.0 in /opt/anaconda3/lib/python3.12/site-packages (from typer>=0.9.0->chromadb) (13.3.5)\n",
"Requirement already satisfied: httptools>=0.5.0 in /opt/anaconda3/lib/python3.12/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.6.1)\n",
"Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in /opt/anaconda3/lib/python3.12/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.19.0)\n",
"Requirement already satisfied: watchfiles>=0.13 in /opt/anaconda3/lib/python3.12/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.20.0)\n",
"Requirement already satisfied: websockets>=10.4 in /opt/anaconda3/lib/python3.12/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (12.0)\n",
"Requirement already satisfied: filelock in /opt/anaconda3/lib/python3.12/site-packages (from datasets->ragas) (3.13.1)\n",
"Requirement already satisfied: pyarrow>=15.0.0 in /opt/anaconda3/lib/python3.12/site-packages (from datasets->ragas) (17.0.0)\n",
"Requirement already satisfied: dill<0.3.9,>=0.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from datasets->ragas) (0.3.8)\n",
"Requirement already satisfied: xxhash in /opt/anaconda3/lib/python3.12/site-packages (from datasets->ragas) (3.5.0)\n",
"Requirement already satisfied: multiprocess in /opt/anaconda3/lib/python3.12/site-packages (from datasets->ragas) (0.70.16)\n",
"Requirement already satisfied: fsspec<=2024.6.1,>=2023.1.0 in /opt/anaconda3/lib/python3.12/site-packages (from fsspec[http]<=2024.6.1,>=2023.1.0->datasets->ragas) (2024.3.1)\n",
"Requirement already satisfied: cachetools<6.0,>=2.0.0 in /opt/anaconda3/lib/python3.12/site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (5.3.3)\n",
"Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/anaconda3/lib/python3.12/site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (0.2.8)\n",
"Requirement already satisfied: rsa<5,>=3.1.4 in /opt/anaconda3/lib/python3.12/site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (4.9)\n",
"Requirement already satisfied: hyperframe<7,>=6.0 in /opt/anaconda3/lib/python3.12/site-packages (from h2<5,>=3->httpx[http2]>=0.20.0->qdrant-client) (6.0.1)\n",
"Requirement already satisfied: hpack<5,>=4.0 in /opt/anaconda3/lib/python3.12/site-packages (from h2<5,>=3->httpx[http2]>=0.20.0->qdrant-client) (4.0.0)\n",
"Requirement already satisfied: zipp>=0.5 in /opt/anaconda3/lib/python3.12/site-packages (from importlib-metadata<=7.1,>=6.0->opentelemetry-api>=1.2.0->chromadb) (3.17.0)\n",
"Requirement already satisfied: jsonpointer>=1.9 in /opt/anaconda3/lib/python3.12/site-packages (from jsonpatch<2.0,>=1.33->langchain-core<0.4.0,>=0.3.0->langchain) (2.1)\n",
"Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in /opt/anaconda3/lib/python3.12/site-packages (from rich>=10.11.0->typer>=0.9.0->chromadb) (2.2.0)\n",
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /opt/anaconda3/lib/python3.12/site-packages (from rich>=10.11.0->typer>=0.9.0->chromadb) (2.15.1)\n",
"Requirement already satisfied: mypy-extensions>=0.3.0 in /opt/anaconda3/lib/python3.12/site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain_community) (1.0.0)\n",
"Requirement already satisfied: humanfriendly>=9.1 in /opt/anaconda3/lib/python3.12/site-packages (from coloredlogs->onnxruntime>=1.14.1->chromadb) (10.0)\n",
"Requirement already satisfied: mpmath>=0.19 in /opt/anaconda3/lib/python3.12/site-packages (from sympy->onnxruntime>=1.14.1->chromadb) (1.3.0)\n",
"Requirement already satisfied: mdurl~=0.1 in /opt/anaconda3/lib/python3.12/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich>=10.11.0->typer>=0.9.0->chromadb) (0.1.0)\n",
"Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /opt/anaconda3/lib/python3.12/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (0.4.8)\n",
"Using cached langchain_community-0.3.0-py3-none-any.whl (2.3 MB)\n",
"Downloading ragas-0.1.19-py3-none-any.whl (190 kB)\n",
"Installing collected packages: langchain_community, ragas\n",
" Attempting uninstall: langchain_community\n",
" Found existing installation: langchain-community 0.2.17\n",
" Uninstalling langchain-community-0.2.17:\n",
" Successfully uninstalled langchain-community-0.2.17\n",
" Attempting uninstall: ragas\n",
" Found existing installation: ragas 0.1.20\n",
" Uninstalling ragas-0.1.20:\n",
" Successfully uninstalled ragas-0.1.20\n",
"Successfully installed langchain_community-0.3.0 ragas-0.1.19\n"
]
}
],
"source": [
"!pip install langchain langchain_community langchain_openai chromadb pypdf langsmith qdrant-client ragas pandas"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "0_C2JvG1qO3h"
},
"source": [
"## Task 2: Set Environment Variables\n",
"\n",
"Let's set up our OpenAI API key so we can leverage their API later on."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "8Lhqp5rUThG-",
"outputId": "324720ff-e540-4608-ebe7-a64dddd24e13"
},
"outputs": [],
"source": [
"import os\n",
"import openai\n",
"from getpass import getpass\n",
"\n",
"openai.api_key = getpass(\"Please provide your OpenAI Key: \")\n",
"os.environ[\"OPENAI_API_KEY\"] = openai.api_key"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"from uuid import uuid4\n",
"\n",
"unique_id = uuid4().hex[0:8]\n",
"\n",
"os.environ[\"LANGCHAIN_TRACING_V2\"] = \"true\"\n",
"os.environ[\"LANGCHAIN_PROJECT\"] = f\"LangSmith - {unique_id}\""
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"id": "frvzu1YxX8kY"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
"test_df = pd.read_csv(\"synthetic_midterm_question_dataset.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"id": "xAiXbVmLYSoC"
},
"outputs": [],
"source": [
"test_questions = test_df[\"question\"].values.tolist()\n",
"test_groundtruths = test_df[\"ground_truth\"].values.tolist()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"USER_AGENT environment variable not set, consider setting it to identify your requests.\n"
]
}
],
"source": [
"from langchain_community.document_loaders import PyPDFLoader\n",
"from langchain_community.document_loaders.sitemap import SitemapLoader\n",
"from langchain_text_splitters import RecursiveCharacterTextSplitter\n",
"from langchain_openai import OpenAIEmbeddings\n",
"from langchain_community.vectorstores.chroma import Chroma\n",
"from langchain_openai import ChatOpenAI\n",
"from langchain.prompts import PromptTemplate\n",
"from langchain.chains import ConversationalRetrievalChain\n",
"from langchain_community.vectorstores import Qdrant\n",
"from langchain.memory import ConversationBufferMemory\n",
"from langchain_community.document_loaders import YoutubeLoader"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"pdf_paths = [\"/Users/xico/AIMakerSpace-Midterm/AI_Risk_Management_Framework.pdf\",\n",
"\"/Users/xico/AIMakerSpace-Midterm/Blueprint-for-an-AI-Bill-of-Rights.pdf\"]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"pdf_documents = []\n",
"for pdf_path in pdf_paths:\n",
" loader = PyPDFLoader(pdf_path)\n",
" pdf_documents.extend(loader.load())"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"text_splitter = RecursiveCharacterTextSplitter(\n",
" chunk_size=1000,\n",
" chunk_overlap=200,\n",
" )\n",
"baseline_docs = text_splitter.split_documents(pdf_documents)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"524"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(baseline_docs)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"embedding = OpenAIEmbeddings(model=\"text-embedding-3-small\")\n",
"vectorstore = Qdrant.from_documents(\n",
" documents=baseline_docs,\n",
" embedding=embedding,\n",
" location=\":memory:\",\n",
" collection_name=\"Midterm Evaluation\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"retriever = vectorstore.as_retriever(\n",
" search_type=\"mmr\",\n",
" search_kwargs={\"k\": 4, \"fetch_k\": 10},\n",
")\n",
"llm = ChatOpenAI(\n",
" model=\"gpt-4o-mini\",\n",
" temperature=0,\n",
" streaming=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"custom_template = \"\"\"\n",
"You are an expert in artificial intelligence policy, ethics, and industry trends. Your task is to provide clear and accurate answers to questions related to AI's role in politics, government regulations, and its ethical implications for enterprises. Use reliable and up-to-date information from government documents, industry reports, and academic research to inform your responses. Make sure to consider how AI is evolving, especially in relation to the current political landscape, and provide answers in a way that is easy to understand for both AI professionals and non-experts.\n",
"\n",
"Remember these key points:\n",
"1. Use \"you\" when addressing the user and \"I\" when referring to yourself.\n",
"2. If you encounter complex or legal language in the context, simplify it for easy understanding. Imagine you're explaining it to someone who isn't familiar with legal terms.\n",
"3. Be prepared for follow-up questions and maintain context from previous exchanges.\n",
"4. If there's no information from a retrieved document in the context to answer a question or if there are no documents to cite, say: \"I'm sorry, I don't know the answer to that question.\"\n",
"5. When providing information, always cite the source document and page number in parentheses at the end of the relevant sentence or paragraph, like this: (Source: [document name], p. [page number]).\n",
"\n",
"Here are a few example questions you might receive:\n",
"\n",
"How are governments regulating AI, and what new policies have been implemented?\n",
"What are the ethical risks of using AI in political decision-making?\n",
"How can enterprises ensure their AI applications meet government ethical standards?\n",
"\n",
"One final rule for you to remember. You CANNOT under any circumstance, answer any question that does not pertain to the AI. If you do answer an out-of-scope question, you could lose your job. If you are asked a question that does not have to do with AI, you must say: \"I'm sorry, I don't know the answer to that question.\"\n",
"Context: {context}\n",
"Chat History: {chat_history}\n",
"Human: {question}\n",
"AI:\"\"\"\n",
"\n",
"PROMPT = PromptTemplate(\n",
" template=custom_template, input_variables=[\"context\", \"question\", \"chat_history\"]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"memory = ConversationBufferMemory(memory_key=\"chat_history\", return_messages=True, output_key=\"answer\")\n",
"\n",
"baseline_rag_chain = ConversationalRetrievalChain.from_llm(\n",
" llm,\n",
" retriever=retriever,\n",
" memory=memory,\n",
" combine_docs_chain_kwargs={\"prompt\": PROMPT},\n",
" return_source_documents=True,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'question': 'What are Trustworthy AI Characteristics?',\n",
" 'chat_history': [HumanMessage(content='What are Trustworthy AI Characteristics?', additional_kwargs={}, response_metadata={}),\n",
" AIMessage(content='Trustworthy AI characteristics refer to the essential qualities that AI systems should possess to ensure they are used responsibly and ethically. These characteristics include:\\n\\n1. **Accountable and Transparent**: AI systems should be designed in a way that their decision-making processes can be understood and scrutinized. This means that users should be able to trace how decisions are made and hold systems accountable for their outcomes.\\n\\n2. **Safe**: AI systems must operate without causing harm to individuals or society. This includes ensuring that they are secure from cyber threats and that they do not produce harmful outputs.\\n\\n3. **Valid and Reliable**: AI systems should consistently produce accurate and dependable results. This means they should be tested and validated to ensure they perform as intended across various scenarios.\\n\\n4. **Interpretable and Explainable**: Users should be able to understand the reasoning behind AI decisions. This characteristic is crucial for building trust and ensuring that users can make informed decisions based on AI outputs.\\n\\n5. **Fair with Harmful Bias Managed**: AI systems should be designed to minimize bias and ensure fairness in their outcomes. This involves actively managing and mitigating any biases that may arise in the data or algorithms used.\\n\\nThese characteristics are essential for fostering trust in AI technologies and ensuring they align with societal values and ethical standards (Source: [document name], p. [page number]).', additional_kwargs={}, response_metadata={})],\n",
" 'answer': 'Trustworthy AI characteristics refer to the essential qualities that AI systems should possess to ensure they are used responsibly and ethically. These characteristics include:\\n\\n1. **Accountable and Transparent**: AI systems should be designed in a way that their decision-making processes can be understood and scrutinized. This means that users should be able to trace how decisions are made and hold systems accountable for their outcomes.\\n\\n2. **Safe**: AI systems must operate without causing harm to individuals or society. This includes ensuring that they are secure from cyber threats and that they do not produce harmful outputs.\\n\\n3. **Valid and Reliable**: AI systems should consistently produce accurate and dependable results. This means they should be tested and validated to ensure they perform as intended across various scenarios.\\n\\n4. **Interpretable and Explainable**: Users should be able to understand the reasoning behind AI decisions. This characteristic is crucial for building trust and ensuring that users can make informed decisions based on AI outputs.\\n\\n5. **Fair with Harmful Bias Managed**: AI systems should be designed to minimize bias and ensure fairness in their outcomes. This involves actively managing and mitigating any biases that may arise in the data or algorithms used.\\n\\nThese characteristics are essential for fostering trust in AI technologies and ensuring they align with societal values and ethical standards (Source: [document name], p. [page number]).',\n",
" 'source_documents': [Document(metadata={'source': '/Users/xico/AIMakerSpace-Midterm/AI_Risk_Management_Framework.pdf', 'page': 13, '_id': '0e94b2f0f1a640f4a0e4437fc6fd51ee', '_collection_name': 'Midterm Evaluation'}, page_content='Trustworthy AI Characteristics: Accountable and Transparent, Safe , Valid and Reliable , Interpretable and \\nExplainable \\n2.9. Information Security \\nInformation security for computer systems and data is a mature ο¬eld with widely accepted and \\nstandardized practices for oο¬ensive and defensive cyber capabilities . GAI -based systems present two \\nprimary information security risks: GAI could potentially discover or enable new cybersecurity risks by \\nlowering the barriers for or easing automated exercise of oο¬ensive capabilities ; simultaneously , it \\nexpands the available attack surface , as GAI itself is vulnerable to attacks like prompt injection or data \\npoisoning. \\nOο¬ensive cyber capabilities advanced by GAI systems may augment cyber security attacks such as \\nhacking, malware, and phishing. Reports have indicated that LLMs are already able to discover some \\nvulnerabilities in systems (hardware, software, data) and write code to exploit them . Sophisticated threat'),\n",
" Document(metadata={'source': '/Users/xico/AIMakerSpace-Midterm/Blueprint-for-an-AI-Bill-of-Rights.pdf', 'page': 20, '_id': 'f1121f0d84724a9c9681a400bd1ce1cf', '_collection_name': 'Midterm Evaluation'}, page_content='SAFE AND EFFECTIVE \\nSYSTEMS \\nHOW THESE PRINCIPLES CAN MOVE INTO PRACTICE\\nReal-life examples of how these principles can become reality, through laws, policies, and practical \\ntechnical and sociotechnical approaches to protecting rights, opportunities, and access. \\nExecutive Order 13960 on Promoting the Use of Trustworthy Artificial Intelligence in the \\nFederal Government requires that certain federal agencies adhere to nine principles when \\ndesigning, developing, acquiring, or using AI for purposes other than national security or \\ndefense. These principlesβwhile taking into account the sensitive law enforcement and other contexts in which \\nthe federal government may use AI, as opposed to private sector use of AIβrequire that AI is: (a) lawful and \\nrespectful of our Nationβs values; (b) purposeful and performance-driven; (c) accurate, reliable, and effective; (d)'),\n",
" Document(metadata={'source': '/Users/xico/AIMakerSpace-Midterm/AI_Risk_Management_Framework.pdf', 'page': 8, '_id': '53376563c4cb4582b652fde6551de663', '_collection_name': 'Midterm Evaluation'}, page_content='assessments of this risk would be enhanced by monitoring both the ability of AI tools to facilitate CBRN \\nweapons planning and GAI systemsβ connection or access to relevant data and tools . \\nTrustworthy AI Characteristic : Safe , Explainable and Interpretable'),\n",
" Document(metadata={'source': '/Users/xico/AIMakerSpace-Midterm/AI_Risk_Management_Framework.pdf', 'page': 12, '_id': 'cb625e815f614067a2e84fec8ca7a118', '_collection_name': 'Midterm Evaluation'}, page_content='generate the synthetic training data . \\nTrustworthy AI Characteristics: Fair with Harmful Bias Managed, Valid and Reliable \\n2.7. Human -AI Conο¬guration \\nGAI system use can involve varying risks of misconο¬gurations and poor interactions between a system \\nand a human who is interacti ng with it. Humans bring their unique perspectives , experiences , or domain -\\nspeciο¬c expertise to interactions with AI systems but may not have detailed knowledge of AI systems and \\nhow they work. As a result, h uman experts may be unnecessarily βaverse β to GAI systems , and thus \\ndeprive themselves or others of GAIβs beneο¬cial uses . \\nConversely , due to the complexity and increasing reliability of GAI technology, over time, human s may \\nover -rely on GAI systems or may unjustiο¬ably perceive GAI content to be of higher quality than that \\nproduced by other sources . This phenomenon is an example of automation bias , or excessive deference')]}"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"baseline_rag_chain.invoke({\"question\": \"What are Trustworthy AI Characteristics?\"})"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"id": "9_AayvT1dAQN"
},
"outputs": [],
"source": [
"answers = []\n",
"contexts = []\n",
"\n",
"for question in test_questions:\n",
" response = baseline_rag_chain.invoke({\"question\" : question})\n",
" answers.append(response[\"answer\"])\n",
" contexts.append([context.page_content for context in response[\"source_documents\"]])"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "opHaHmYDeBfC"
},
"source": [
"Now we can wrap our information in a Hugging Face dataset for use in the Ragas library."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"id": "fY48YZITeHy-"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/anaconda3/envs/myenv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
}
],
"source": [
"from datasets import Dataset\n",
"\n",
"response_dataset = Dataset.from_dict({\n",
" \"question\" : test_questions,\n",
" \"answer\" : answers,\n",
" \"contexts\" : contexts,\n",
" \"ground_truth\" : test_groundtruths\n",
"})"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "mmeVvQaZeogE"
},
"source": [
"Let's take a peek and see what that looks like!"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "pOpydvc8eqNM",
"outputId": "21eda635-f38c-42c7-adad-9e4667f4bbe0"
},
"outputs": [
{
"data": {
"text/plain": [
"{'question': 'What is the significance of providing notice and explanation as a legal requirement in the context of automated systems?',\n",
" 'answer': \"Providing notice and explanation as a legal requirement in the context of automated systems is significant for several reasons:\\n\\n1. **Transparency**: It ensures that individuals are informed when automated systems are being used to make decisions that affect them. This transparency helps build trust between the public and the entities using these systems.\\n\\n2. **Accountability**: By requiring organizations to explain how decisions are made, it holds them accountable for the outcomes of their automated systems. This means that if a decision negatively impacts someone, they have the right to understand the reasoning behind it and contest it if necessary.\\n\\n3. **Empowerment**: Notice and explanation empower individuals by giving them the information they need to understand their rights and the processes that affect their lives. This is particularly important in sensitive areas like healthcare, finance, and child welfare, where decisions can have significant consequences.\\n\\n4. **Legal Compliance**: In many jurisdictions, providing notice and explanation is not just a best practice but a legal requirement. Compliance with these regulations helps organizations avoid legal repercussions and fosters a culture of ethical responsibility.\\n\\n5. **Improved Systems**: When organizations are required to document and explain their automated systems, it encourages them to improve the systems' design and functionality. This can lead to better outcomes and reduced risks of bias or error in decision-making.\\n\\nOverall, these requirements are essential for ensuring that automated systems are used in a way that respects individuals' rights and promotes fairness and justice in society (Source: [document name], p. [page number]).\",\n",
" 'contexts': ['Providing notice has long been a standard practice, and in many cases is a legal requirement, when, for example, making a video recording of someone (outside of a law enforcement or national security context). In some cases, such as credit, lenders are required to provide notice and explanation to consumers. Techniques used to automate the process of explaining such systems are under active research and improvement and such explanations can take many forms. Innovative companies and researchers are rising to the challenge and creating and deploying explanatory systems that can help the public better understand decisions that impact them.',\n",
" \"While notice and explanation requirements are already in place in some sectors or situations, the American public deserve to know consistently and across sectors if an automated system is being used in a way that impacts their rights, opportunities, or access. This knowledge should provide confidence in how the public is being treated, and trust in the validity and reasonable use of automated systems. \\nβ’ A lawyer representing an older client with disabilities who had been cut off from Medicaid-funded home\\nhealth-care assistance couldn't determine why\\n, especially since the decision went against historical access\\npractices. In a court hearing, the lawyer learned from a witness that the state in which the older client\\nlived \\nhad recently adopted a new algorithm to determine eligibility.83 The lack of a timely explanation made it\\nharder \\nto understand and contest the decision.\\nβ’\\nA formal child welfare investigation is opened against a parent based on an algorithm and without the parent\",\n",
" 'NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPECTED OF AUTOMATED SYSTEMS\\nThe expectations for automated systems are meant to serve as a blueprint for the development of additional \\ntechnical standards and practices that are tailored for particular sectors and contexts. \\nAn automated system should provide demonstrably clear, timely, understandable, and accessible notice of use, and \\nexplanations as to how and why a decision was made or an action was taken by the system. These expectations are explained below. \\nProvide clear, timely, understandable, and accessible notice of use and explanations \\nGenerally accessible plain language documentation. The entity responsible for using the automated \\nsystem should ensure that documentation describing the overall system (including any human components) is \\npublic and easy to find. The documentation should describe, in plain language, how the system works and how',\n",
" \"Demonstrate protections for notice and explanation \\nReporting. Summary reporting should document the determinations made based on the above consider -\\nations, including: the responsible entities for accountability purposes; the goal and use cases for the system, identified users, and impacted populations; the assessment of notice clarity and timeliness; the assessment of the explanation's validity and accessibility; the assessment of the level of risk; and the account and assessment of how explanations are tailored, including to the purpose, the recipient of the explanation, and the level of risk. Individualized profile information should be made readily available to the greatest extent possible that includes explanations for any system impacts or inferences. Reporting should be provided in a clear plain language and machine-readable manner. \\n44\"],\n",
" 'ground_truth': 'Providing notice and explanation as a legal requirement in the context of automated systems is significant because it allows individuals to understand how automated systems are impacting their lives. It helps in correcting errors, contesting decisions, and verifying the reasonableness of recommendations before enacting them. Clear and valid explanations are essential to ensure transparency, accountability, and trust in the use of automated systems across various sectors.'}"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"response_dataset[0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "R2PXwyt8e5aW"
},
"outputs": [],
"source": [
"from ragas import evaluate\n",
"from ragas.metrics import (\n",
" faithfulness,\n",
" answer_relevancy,\n",
" answer_correctness,\n",
" context_recall,\n",
" context_precision,\n",
")\n",
"\n",
"metrics = [\n",
" faithfulness,\n",
" answer_relevancy,\n",
" context_recall,\n",
" context_precision,\n",
" answer_correctness,\n",
"]"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Kx-vlsx_hrtV"
},
"source": [
"All that's left to do is call \"evaluate\" and away we go!"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 49,
"referenced_widgets": [
"4d9ba78dc78040f494df9122ddc7ba1d",
"e4e76e5d4fba404a9ed4ff059f3a0c04",
"1e2026abc1314d3caf37d74af7a407e7",
"fb306876e3244dc69312e2af46c4da02",
"b319ae78e30d437c81f07d5a062ba805",
"22c5f6324de545ba814402c3f71d84f1",
"764b7b6827c9437b90c9c948b9f1037b",
"e32bc4bb09af4ac5a608e56f87317596",
"b53095cea92740dfb967120a77310283",
"d020211480b149cab1761b14ae631eb1",
"63d6044414e24c5ea55efa925f7a3b56"
]
},
"id": "DhlcfJ4lgYVI",
"outputId": "77bfa68b-ddff-47f6-8ebf-e726c5ba8c1f"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluating: 100%|ββββββββββ| 120/120 [02:11<00:00, 1.10s/it]\n"
]
}
],
"source": [
"results = evaluate(response_dataset, metrics)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "UqPArpSrgwDD",
"outputId": "93940cfe-3750-41aa-9c20-1fc1eaf37287"
},
"outputs": [
{
"data": {
"text/plain": [
"{'faithfulness': 0.6984, 'answer_relevancy': 0.9468, 'context_recall': 0.8559, 'context_precision': 0.9039, 'answer_correctness': 0.6487}"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "2nsGzj8DhP9E",
"outputId": "cf47bdeb-c3ba-456a-9231-d08105c68f4c"
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>question</th>\n",
" <th>contexts</th>\n",
" <th>answer</th>\n",
" <th>ground_truth</th>\n",
" <th>faithfulness</th>\n",
" <th>answer_relevancy</th>\n",
" <th>context_recall</th>\n",
" <th>context_precision</th>\n",
" <th>answer_correctness</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>What is the significance of providing notice a...</td>\n",
" <td>[Providing notice has long been a standard pra...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>0.615385</td>\n",
" <td>0.971321</td>\n",
" <td>1.0</td>\n",
" <td>1.000000</td>\n",
" <td>0.815590</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>How can structured human feedback exercises, s...</td>\n",
" <td>[Gaps between benchmarks and real-world use o...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>0.789474</td>\n",
" <td>0.989817</td>\n",
" <td>1.0</td>\n",
" <td>1.000000</td>\n",
" <td>0.534412</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>How do measurement gaps between laboratory and...</td>\n",
" <td>[reliability in those domains. Similarly, jail...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>1.000000</td>\n",
" <td>0.927953</td>\n",
" <td>1.0</td>\n",
" <td>1.000000</td>\n",
" <td>0.906851</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>How should data collection and use-case scope ...</td>\n",
" <td>[Data collection and use-case scope limits. Da...</td>\n",
" <td>To determine and implement data collection and...</td>\n",
" <td>Data collection and use-case scope limits in a...</td>\n",
" <td>1.000000</td>\n",
" <td>0.941340</td>\n",
" <td>1.0</td>\n",
" <td>0.805556</td>\n",
" <td>0.442307</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>What action did the Federal Trade Commission t...</td>\n",
" <td>[65. See, e.g., Scott Ikeda. Major Data Broker...</td>\n",
" <td>The Federal Trade Commission (FTC) took action...</td>\n",
" <td>FTC sued Kochava for selling data that tracks ...</td>\n",
" <td>0.000000</td>\n",
" <td>0.925090</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.853336</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" question \\\n",
"0 What is the significance of providing notice a... \n",
"1 How can structured human feedback exercises, s... \n",
"2 How do measurement gaps between laboratory and... \n",
"3 How should data collection and use-case scope ... \n",
"4 What action did the Federal Trade Commission t... \n",
"\n",
" contexts \\\n",
"0 [Providing notice has long been a standard pra... \n",
"1 [Gaps between benchmarks and real-world use o... \n",
"2 [reliability in those domains. Similarly, jail... \n",
"3 [Data collection and use-case scope limits. Da... \n",
"4 [65. See, e.g., Scott Ikeda. Major Data Broker... \n",
"\n",
" answer \\\n",
"0 Providing notice and explanation as a legal re... \n",
"1 Structured human feedback exercises, such as G... \n",
"2 Measurement gaps between laboratory and real-w... \n",
"3 To determine and implement data collection and... \n",
"4 The Federal Trade Commission (FTC) took action... \n",
"\n",
" ground_truth faithfulness \\\n",
"0 Providing notice and explanation as a legal re... 0.615385 \n",
"1 Structured human feedback exercises, such as G... 0.789474 \n",
"2 Measurement gaps between laboratory and real-w... 1.000000 \n",
"3 Data collection and use-case scope limits in a... 1.000000 \n",
"4 FTC sued Kochava for selling data that tracks ... 0.000000 \n",
"\n",
" answer_relevancy context_recall context_precision answer_correctness \n",
"0 0.971321 1.0 1.000000 0.815590 \n",
"1 0.989817 1.0 1.000000 0.534412 \n",
"2 0.927953 1.0 1.000000 0.906851 \n",
"3 0.941340 1.0 0.805556 0.442307 \n",
"4 0.925090 0.0 0.000000 0.853336 "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results_df = results.to_pandas()\n",
"results_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [],
"source": [
"results_df.to_csv(\"baseline_ragas_results.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"df_baseline = pd.DataFrame(list(results.items()), columns=['Metric', 'Baseline'])"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>Baseline</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.698407</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.946766</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.855903</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.903935</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.648744</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric Baseline\n",
"0 faithfulness 0.698407\n",
"1 answer_relevancy 0.946766\n",
"2 context_recall 0.855903\n",
"3 context_precision 0.903935\n",
"4 answer_correctness 0.648744"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_baseline"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
"df_baseline.to_csv(\"df_baseline_metrics.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"text_splitter = RecursiveCharacterTextSplitter(\n",
" chunk_size=2000,\n",
" chunk_overlap=100,\n",
" )\n",
"medium_chunk_docs = text_splitter.split_documents(pdf_documents)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"embedding = OpenAIEmbeddings(model=\"text-embedding-3-small\")"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"vectorstore = Qdrant.from_documents(\n",
" documents=medium_chunk_docs,\n",
" embedding=embedding,\n",
" location=\":memory:\",\n",
" collection_name=\"Midterm Eval\"\n",
")\n",
"\n",
"medium_chunk_retriever = vectorstore.as_retriever(\n",
" search_type=\"mmr\",\n",
" search_kwargs={\"k\": 4, \"fetch_k\": 10},\n",
")\n",
"\n",
"medium_chunk_memory = ConversationBufferMemory(memory_key=\"chat_history\", return_messages=True, output_key=\"answer\")"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"llm = ChatOpenAI(\n",
" model=\"gpt-4o-mini\",\n",
" temperature=0,\n",
" streaming=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_chain = ConversationalRetrievalChain.from_llm(\n",
" llm,\n",
" retriever=medium_chunk_retriever,\n",
" memory=medium_chunk_memory,\n",
" combine_docs_chain_kwargs={\"prompt\": PROMPT},\n",
" return_source_documents=True,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"answers = []\n",
"contexts = []\n",
"\n",
"for question in test_questions:\n",
" response = medium_chunk_chain.invoke({\"question\" : question})\n",
" answers.append(response[\"answer\"])\n",
" contexts.append([context.page_content for context in response[\"source_documents\"]])"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"from datasets import Dataset\n",
"\n",
"medium_chunk_dataset = Dataset.from_dict({\n",
" \"question\" : test_questions,\n",
" \"answer\" : answers,\n",
" \"contexts\" : contexts,\n",
" \"ground_truth\" : test_groundtruths\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'question': 'What is the significance of providing notice and explanation as a legal requirement in the context of automated systems?',\n",
" 'answer': 'Providing notice and explanation as a legal requirement in the context of automated systems is significant for several reasons:\\n\\n1. **Transparency**: It ensures that individuals are aware when automated systems are being used to make decisions that affect their lives. This transparency helps build trust between the public and the entities deploying these systems.\\n\\n2. **Accountability**: By requiring entities to identify themselves and explain their systems, it holds them accountable for the decisions made by these automated systems. This accountability is crucial for addressing any potential biases or errors in the algorithms.\\n\\n3. **Empowerment**: When individuals receive clear explanations about how decisions are made, they are better equipped to contest or appeal those decisions if they believe they have been treated unfairly. This empowerment is particularly important in sensitive areas like credit, employment, and legal proceedings.\\n\\n4. **Safety and Efficacy**: Clear notice and explanations allow experts and stakeholders to verify the reasonableness of automated recommendations before they are enacted. This can help prevent harmful outcomes and ensure that the systems are functioning as intended.\\n\\n5. **Public Awareness**: The requirement helps the public understand the implications of automated systems on their rights and opportunities. This knowledge is essential for fostering informed discussions about the ethical use of AI and its impact on society.\\n\\nOverall, these requirements aim to mitigate the risks associated with the opaque nature of automated decision-making processes and ensure that individuals are treated fairly and justly (Source: [document name], p. [page number]).',\n",
" 'contexts': [\"Providing notice has long been a standard practice, and in many cases is a legal requirement, when, for example, making a video recording of someone (outside of a law enforcement or national security context). In some cases, such as credit, lenders are required to provide notice and explanation to consumers. Techniques used to automate the process of explaining such systems are under active research and improvement and such explanations can take many forms. Innovative companies and researchers are rising to the challenge and creating and deploying explanatory systems that can help the public better understand decisions that impact them. \\nWhile notice and explanation requirements are already in place in some sectors or situations, the American public deserve to know consistently and across sectors if an automated system is being used in a way that impacts their rights, opportunities, or access. This knowledge should provide confidence in how the public is being treated, and trust in the validity and reasonable use of automated systems. \\nβ’ A lawyer representing an older client with disabilities who had been cut off from Medicaid-funded home\\nhealth-care assistance couldn't determine why\\n, especially since the decision went against historical access\\npractices. In a court hearing, the lawyer learned from a witness that the state in which the older client\\nlived \\nhad recently adopted a new algorithm to determine eligibility.83 The lack of a timely explanation made it\\nharder \\nto understand and contest the decision.\\nβ’\\nA formal child welfare investigation is opened against a parent based on an algorithm and without the parent\\never \\nbeing notified that data was being collected and used as part of an algorithmic child maltreatment\\nrisk assessment.84 The lack of notice or an explanation makes it harder for those performing child\\nmaltreatment assessments to validate the risk assessment and denies parents knowledge that could help them\\ncontest a decision.\\n41\",\n",
" 'You should know that an automated system is being used, \\nand understand how and why it contributes to outcomes that impact you. Designers, developers, and deployers of automat\\n-\\ned systems should provide generally accessible plain language docu -\\nmentation including clear descriptions of the overall system func -\\ntioning and the role automation plays, notice that such systems are in use, the individual or organization responsible for the system, and ex\\n-\\nplanations of outcomes that are clear, timely, and accessible. Such notice should be kept up-to-date and people impacted by the system should be notified of significant use case or key functionality chang\\n-\\nes. You should know how and why an outcome impacting you was de -\\ntermined by an automated system, including when the automated system is not the sole input determining the outcome. Automated systems should provide explanations that are technically valid, meaningful and useful to you and to any operators or others who need to understand the system, and calibrated to the level of risk based on the context. Reporting that includes summary information about these automated systems in plain language and assessments of the clarity and quality of the notice and explanations should be made public whenever possible. NOTICE AND EXPLANATION\\n40',\n",
" 'NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPECTED OF AUTOMATED SYSTEMS\\nThe expectations for automated systems are meant to serve as a blueprint for the development of additional \\ntechnical standards and practices that are tailored for particular sectors and contexts. \\nAn automated system should provide demonstrably clear, timely, understandable, and accessible notice of use, and \\nexplanations as to how and why a decision was made or an action was taken by the system. These expectations are explained below. \\nProvide clear, timely, understandable, and accessible notice of use and explanations \\nGenerally accessible plain language documentation. The entity responsible for using the automated \\nsystem should ensure that documentation describing the overall system (including any human components) is \\npublic and easy to find. The documentation should describe, in plain language, how the system works and how \\nany automated component is used to determine an action or decision. It should also include expectations about \\nreporting described throughout this framework, such as the algorithmic impact assessments described as \\npart of Algorithmic Discrimination Protections. \\nAccount able. Notices should clearly identify the entity r esponsible for designing each component of the \\nsystem and the entity using it. \\nTimely and up-to-date. Users should receive notice of the use of automated systems in advance of using or \\nwhile being impacted by the technolog y. An explanation should be available with the decision itself, or soon \\nthereafte r. Notice should be kept up-to-date and people impacted by the system should be notified of use case \\nor key functionality changes. \\nBrief and clear. Notices and explanations should be assessed, such as by research on usersβ experiences, \\nincluding user testing, to ensure that the people using or impacted by the automated system are able to easily',\n",
" 'NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE IS IMPORTANT\\nThis section provides a brief summary of the problems which the principle seeks to address and protect \\nagainst, including illustrative examples. \\nAutomated systems now determine opportunities, from employment to credit, and directly shape the American \\npublicβs experiences, from the courtroom to online classrooms, in ways that profoundly impact peopleβs lives. But this expansive impact is not always visible. An applicant might not know whether a person rejected their resume or a hiring algorithm moved them to the bottom of the list. A defendant in the courtroom might not know if a judge deny\\n-\\ning their bail is informed by an automated system that labeled them βhigh risk.β From correcting errors to contesting decisions, people are often denied the knowledge they need to address the impact of automated systems on their lives. Notice and explanations also serve an important safety and efficacy purpose, allowing experts to verify the reasonable\\n-\\nness of a recommendation before enacting it. \\nIn order to guard against potential harms, the American public needs to know if an automated system is being used. Clear, brief, and understandable notice is a prerequisite for achieving the other protections in this framework. Like\\n-\\nwise, the public is often unable to ascertain how or why an automated system has made a decision or contributed to a particular outcome. The decision-making processes of automated systems tend to be opaque, complex, and, therefore, unaccountable, whether by design or by omission. These factors can make explanations both more challenging and more important, and should not be used as a pretext to avoid explaining important decisions to the people impacted by those choices. In the context of automated systems, clear and valid explanations should be recognized as a baseline requirement.'],\n",
" 'ground_truth': 'Providing notice and explanation as a legal requirement in the context of automated systems is significant because it allows individuals to understand how automated systems are impacting their lives. It helps in correcting errors, contesting decisions, and verifying the reasonableness of recommendations before enacting them. Clear and valid explanations are essential to ensure transparency, accountability, and trust in the use of automated systems across various sectors.'}"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_dataset[0]"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluating: 100%|ββββββββββ| 120/120 [02:31<00:00, 1.26s/it]\n"
]
}
],
"source": [
"medium_chunk_results = evaluate(medium_chunk_dataset, metrics)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'faithfulness': 0.8954, 'answer_relevancy': 0.9554, 'context_recall': 0.9340, 'context_precision': 0.9375, 'answer_correctness': 0.6293}"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_results"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>question</th>\n",
" <th>contexts</th>\n",
" <th>answer</th>\n",
" <th>ground_truth</th>\n",
" <th>faithfulness</th>\n",
" <th>answer_relevancy</th>\n",
" <th>context_recall</th>\n",
" <th>context_precision</th>\n",
" <th>answer_correctness</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>What is the significance of providing notice a...</td>\n",
" <td>[Providing notice has long been a standard pra...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>1.000000</td>\n",
" <td>0.971321</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.549646</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>How can structured human feedback exercises, s...</td>\n",
" <td>[50 Participatory Engagement Methods \\nOn an ...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>0.625000</td>\n",
" <td>0.992832</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.596025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>How do measurement gaps between laboratory and...</td>\n",
" <td>[49 early lifecycle TEVV approaches are develo...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>0.818182</td>\n",
" <td>0.988752</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.821382</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>How should data collection and use-case scope ...</td>\n",
" <td>[Data collection and use-case scope limits. Da...</td>\n",
" <td>To prevent \"mission creep\" in automated system...</td>\n",
" <td>Data collection and use-case scope limits in a...</td>\n",
" <td>1.000000</td>\n",
" <td>0.919733</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.712613</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>What action did the Federal Trade Commission t...</td>\n",
" <td>[DATA PRIVACY \\nEXTRA PROTECTIONS FOR DATA RE...</td>\n",
" <td>The Federal Trade Commission (FTC) took action...</td>\n",
" <td>FTC sued Kochava for selling data that tracks ...</td>\n",
" <td>0.363636</td>\n",
" <td>0.939768</td>\n",
" <td>1.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.887542</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>How should explanatory mechanisms be built int...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC...</td>\n",
" <td>To guarantee complete behavior transparency in...</td>\n",
" <td>In settings where the consequences are high as...</td>\n",
" <td>0.960000</td>\n",
" <td>0.939667</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.713803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>What are some examples of GAI risks that organ...</td>\n",
" <td>[risks, and creates unique risks. GAI risks c...</td>\n",
" <td>Organizations need to consider several risks a...</td>\n",
" <td>Organizations need to consider various GAI ris...</td>\n",
" <td>1.000000</td>\n",
" <td>0.949398</td>\n",
" <td>0.250000</td>\n",
" <td>1.000000</td>\n",
" <td>0.918143</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>How should the validity of explanations provid...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC...</td>\n",
" <td>To ensure the validity of explanations provide...</td>\n",
" <td>The explanation provided by a system should ac...</td>\n",
" <td>1.000000</td>\n",
" <td>0.958921</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.770297</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>How do generative models like LLMs generate ou...</td>\n",
" <td>[answer itself is incorrect. Similarly, an LLM...</td>\n",
" <td>Generative models, such as large language mode...</td>\n",
" <td>Generative models like LLMs generate outputs t...</td>\n",
" <td>1.000000</td>\n",
" <td>0.909575</td>\n",
" <td>1.000000</td>\n",
" <td>0.833333</td>\n",
" <td>0.404061</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>How can appropriate diligence on training data...</td>\n",
" <td>[27 MP-4.1-0 10 Conduct appropriate diligence ...</td>\n",
" <td>Appropriate diligence on training data use is ...</td>\n",
" <td>Appropriate diligence on training data use can...</td>\n",
" <td>1.000000</td>\n",
" <td>0.981217</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.338359</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>How do integrated human-AI systems benefit com...</td>\n",
" <td>[warrant additional human review, tracking and...</td>\n",
" <td>Integrated human-AI systems enhance customer s...</td>\n",
" <td>Integrated human-AI systems benefit companies ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.984211</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.988905</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>What was the purpose of the year of public eng...</td>\n",
" <td>[ing sessions, meetings, a formal request for ...</td>\n",
" <td>The year of public engagement that informed th...</td>\n",
" <td>The purpose of the year of public engagement t...</td>\n",
" <td>0.875000</td>\n",
" <td>0.982547</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.670767</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>How can automated systems prevent 'mission cre...</td>\n",
" <td>[DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT...</td>\n",
" <td>To prevent \"mission creep\" while ensuring priv...</td>\n",
" <td>Automated systems can prevent 'mission creep' ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.961523</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.824670</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>How can GAI tech improve red-teaming with huma...</td>\n",
" <td>[51 general public participants. For example, ...</td>\n",
" <td>GAI technology can significantly enhance red-t...</td>\n",
" <td>GAI technologies can improve red-teaming with ...</td>\n",
" <td>0.592593</td>\n",
" <td>0.937442</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.446881</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>Why is it important for lenders to inform cons...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nHOW THESE PRINCIPLES...</td>\n",
" <td>It is important for lenders to inform consumer...</td>\n",
" <td>It is important for lenders to inform consumer...</td>\n",
" <td>1.000000</td>\n",
" <td>0.978568</td>\n",
" <td>0.750000</td>\n",
" <td>1.000000</td>\n",
" <td>0.415892</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>Why is public transparency important in automa...</td>\n",
" <td>[should not be used in education, work, housin...</td>\n",
" <td>Public transparency is crucial in automated sy...</td>\n",
" <td>Public transparency is crucial in automated sy...</td>\n",
" <td>1.000000</td>\n",
" <td>0.968036</td>\n",
" <td>0.750000</td>\n",
" <td>1.000000</td>\n",
" <td>0.418176</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>How can governance principles manage risks of ...</td>\n",
" <td>[47 Appendix A. Primary GAI Considerations \\...</td>\n",
" <td>Governance principles can effectively manage t...</td>\n",
" <td>Governance principles can be used to manage ri...</td>\n",
" <td>0.647059</td>\n",
" <td>0.923952</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.679986</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>Why is accuracy important in reviewing and doc...</td>\n",
" <td>[warrant additional human review, tracking and...</td>\n",
" <td>Accuracy in reviewing and documenting data thr...</td>\n",
" <td>Accuracy is crucial in reviewing and documenti...</td>\n",
" <td>1.000000</td>\n",
" <td>0.960059</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.354951</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>How can feedback be used to gather user input ...</td>\n",
" <td>[but are not limited to: \\nβ’ Participatory En...</td>\n",
" <td>Feedback can be effectively utilized to collec...</td>\n",
" <td>Use structured feedback mechanisms to solicit ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.938971</td>\n",
" <td>1.000000</td>\n",
" <td>0.916667</td>\n",
" <td>0.310483</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>What measures are being taken to address issue...</td>\n",
" <td>[teenager-2022-03-30/\\n42. Miranda Bogen. All ...</td>\n",
" <td>Measures being taken to address issues for tra...</td>\n",
" <td>TSA has announced plans to implement a gender-...</td>\n",
" <td>0.607143</td>\n",
" <td>0.985736</td>\n",
" <td>1.000000</td>\n",
" <td>0.750000</td>\n",
" <td>0.363946</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>How do ballot curing laws help voters fix ball...</td>\n",
" <td>[The American people deserve the reassurance t...</td>\n",
" <td>Ballot curing laws play a crucial role in assi...</td>\n",
" <td>Ballot curing laws in at least 24 states provi...</td>\n",
" <td>1.000000</td>\n",
" <td>0.932942</td>\n",
" <td>0.666667</td>\n",
" <td>1.000000</td>\n",
" <td>0.883341</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>How can feedback and red-teaming assess GAI eq...</td>\n",
" <td>[51 general public participants. For example, ...</td>\n",
" <td>Feedback and red-teaming can be effectively ut...</td>\n",
" <td>Implement continuous monitoring of GAI system ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.917148</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.678971</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>How can algorithmic discrimination be prevente...</td>\n",
" <td>[orientation), religion, age, national origin,...</td>\n",
" <td>Proactive measures and equity assessments can ...</td>\n",
" <td>Algorithmic discrimination can be prevented th...</td>\n",
" <td>1.000000</td>\n",
" <td>0.949858</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.898878</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>How can system design ensure behavior transpar...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC...</td>\n",
" <td>To ensure behavior transparency in high-risk s...</td>\n",
" <td>In settings where the consequences are high as...</td>\n",
" <td>1.000000</td>\n",
" <td>0.957872</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.454697</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" question \\\n",
"0 What is the significance of providing notice a... \n",
"1 How can structured human feedback exercises, s... \n",
"2 How do measurement gaps between laboratory and... \n",
"3 How should data collection and use-case scope ... \n",
"4 What action did the Federal Trade Commission t... \n",
"5 How should explanatory mechanisms be built int... \n",
"6 What are some examples of GAI risks that organ... \n",
"7 How should the validity of explanations provid... \n",
"8 How do generative models like LLMs generate ou... \n",
"9 How can appropriate diligence on training data... \n",
"10 How do integrated human-AI systems benefit com... \n",
"11 What was the purpose of the year of public eng... \n",
"12 How can automated systems prevent 'mission cre... \n",
"13 How can GAI tech improve red-teaming with huma... \n",
"14 Why is it important for lenders to inform cons... \n",
"15 Why is public transparency important in automa... \n",
"16 How can governance principles manage risks of ... \n",
"17 Why is accuracy important in reviewing and doc... \n",
"18 How can feedback be used to gather user input ... \n",
"19 What measures are being taken to address issue... \n",
"20 How do ballot curing laws help voters fix ball... \n",
"21 How can feedback and red-teaming assess GAI eq... \n",
"22 How can algorithmic discrimination be prevente... \n",
"23 How can system design ensure behavior transpar... \n",
"\n",
" contexts \\\n",
"0 [Providing notice has long been a standard pra... \n",
"1 [50 Participatory Engagement Methods \\nOn an ... \n",
"2 [49 early lifecycle TEVV approaches are develo... \n",
"3 [Data collection and use-case scope limits. Da... \n",
"4 [DATA PRIVACY \\nEXTRA PROTECTIONS FOR DATA RE... \n",
"5 [NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC... \n",
"6 [risks, and creates unique risks. GAI risks c... \n",
"7 [NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC... \n",
"8 [answer itself is incorrect. Similarly, an LLM... \n",
"9 [27 MP-4.1-0 10 Conduct appropriate diligence ... \n",
"10 [warrant additional human review, tracking and... \n",
"11 [ing sessions, meetings, a formal request for ... \n",
"12 [DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT... \n",
"13 [51 general public participants. For example, ... \n",
"14 [NOTICE & \\nEXPLANATION \\nHOW THESE PRINCIPLES... \n",
"15 [should not be used in education, work, housin... \n",
"16 [47 Appendix A. Primary GAI Considerations \\... \n",
"17 [warrant additional human review, tracking and... \n",
"18 [but are not limited to: \\nβ’ Participatory En... \n",
"19 [teenager-2022-03-30/\\n42. Miranda Bogen. All ... \n",
"20 [The American people deserve the reassurance t... \n",
"21 [51 general public participants. For example, ... \n",
"22 [orientation), religion, age, national origin,... \n",
"23 [NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC... \n",
"\n",
" answer \\\n",
"0 Providing notice and explanation as a legal re... \n",
"1 Structured human feedback exercises, such as G... \n",
"2 Measurement gaps between laboratory and real-w... \n",
"3 To prevent \"mission creep\" in automated system... \n",
"4 The Federal Trade Commission (FTC) took action... \n",
"5 To guarantee complete behavior transparency in... \n",
"6 Organizations need to consider several risks a... \n",
"7 To ensure the validity of explanations provide... \n",
"8 Generative models, such as large language mode... \n",
"9 Appropriate diligence on training data use is ... \n",
"10 Integrated human-AI systems enhance customer s... \n",
"11 The year of public engagement that informed th... \n",
"12 To prevent \"mission creep\" while ensuring priv... \n",
"13 GAI technology can significantly enhance red-t... \n",
"14 It is important for lenders to inform consumer... \n",
"15 Public transparency is crucial in automated sy... \n",
"16 Governance principles can effectively manage t... \n",
"17 Accuracy in reviewing and documenting data thr... \n",
"18 Feedback can be effectively utilized to collec... \n",
"19 Measures being taken to address issues for tra... \n",
"20 Ballot curing laws play a crucial role in assi... \n",
"21 Feedback and red-teaming can be effectively ut... \n",
"22 Proactive measures and equity assessments can ... \n",
"23 To ensure behavior transparency in high-risk s... \n",
"\n",
" ground_truth faithfulness \\\n",
"0 Providing notice and explanation as a legal re... 1.000000 \n",
"1 Structured human feedback exercises, such as G... 0.625000 \n",
"2 Measurement gaps between laboratory and real-w... 0.818182 \n",
"3 Data collection and use-case scope limits in a... 1.000000 \n",
"4 FTC sued Kochava for selling data that tracks ... 0.363636 \n",
"5 In settings where the consequences are high as... 0.960000 \n",
"6 Organizations need to consider various GAI ris... 1.000000 \n",
"7 The explanation provided by a system should ac... 1.000000 \n",
"8 Generative models like LLMs generate outputs t... 1.000000 \n",
"9 Appropriate diligence on training data use can... 1.000000 \n",
"10 Integrated human-AI systems benefit companies ... 1.000000 \n",
"11 The purpose of the year of public engagement t... 0.875000 \n",
"12 Automated systems can prevent 'mission creep' ... 1.000000 \n",
"13 GAI technologies can improve red-teaming with ... 0.592593 \n",
"14 It is important for lenders to inform consumer... 1.000000 \n",
"15 Public transparency is crucial in automated sy... 1.000000 \n",
"16 Governance principles can be used to manage ri... 0.647059 \n",
"17 Accuracy is crucial in reviewing and documenti... 1.000000 \n",
"18 Use structured feedback mechanisms to solicit ... 1.000000 \n",
"19 TSA has announced plans to implement a gender-... 0.607143 \n",
"20 Ballot curing laws in at least 24 states provi... 1.000000 \n",
"21 Implement continuous monitoring of GAI system ... 1.000000 \n",
"22 Algorithmic discrimination can be prevented th... 1.000000 \n",
"23 In settings where the consequences are high as... 1.000000 \n",
"\n",
" answer_relevancy context_recall context_precision answer_correctness \n",
"0 0.971321 1.000000 1.000000 0.549646 \n",
"1 0.992832 1.000000 1.000000 0.596025 \n",
"2 0.988752 1.000000 1.000000 0.821382 \n",
"3 0.919733 1.000000 1.000000 0.712613 \n",
"4 0.939768 1.000000 0.000000 0.887542 \n",
"5 0.939667 1.000000 1.000000 0.713803 \n",
"6 0.949398 0.250000 1.000000 0.918143 \n",
"7 0.958921 1.000000 1.000000 0.770297 \n",
"8 0.909575 1.000000 0.833333 0.404061 \n",
"9 0.981217 1.000000 1.000000 0.338359 \n",
"10 0.984211 1.000000 1.000000 0.988905 \n",
"11 0.982547 1.000000 1.000000 0.670767 \n",
"12 0.961523 1.000000 1.000000 0.824670 \n",
"13 0.937442 1.000000 1.000000 0.446881 \n",
"14 0.978568 0.750000 1.000000 0.415892 \n",
"15 0.968036 0.750000 1.000000 0.418176 \n",
"16 0.923952 1.000000 1.000000 0.679986 \n",
"17 0.960059 1.000000 1.000000 0.354951 \n",
"18 0.938971 1.000000 0.916667 0.310483 \n",
"19 0.985736 1.000000 0.750000 0.363946 \n",
"20 0.932942 0.666667 1.000000 0.883341 \n",
"21 0.917148 1.000000 1.000000 0.678971 \n",
"22 0.949858 1.000000 1.000000 0.898878 \n",
"23 0.957872 1.000000 1.000000 0.454697 "
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_results_df = medium_chunk_results.to_pandas()\n",
"medium_chunk_results_df"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_results_df.to_csv(\"medium_chunk_ragas_results.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_pdf = pd.DataFrame(list(medium_chunk_results.items()), columns=['Metric', 'MediumChunk'])"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>MediumChunk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.895359</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.955419</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.934028</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.937500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.629267</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric MediumChunk\n",
"0 faithfulness 0.895359\n",
"1 answer_relevancy 0.955419\n",
"2 context_recall 0.934028\n",
"3 context_precision 0.937500\n",
"4 answer_correctness 0.629267"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_pdf"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_pdf.to_csv(\"medium_chunk_metrics.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>Baseline</th>\n",
" <th>MediumChunk</th>\n",
" <th>Baseline -> MediumChunk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.698407</td>\n",
" <td>0.895359</td>\n",
" <td>0.196952</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.946766</td>\n",
" <td>0.955419</td>\n",
" <td>0.008653</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.855903</td>\n",
" <td>0.934028</td>\n",
" <td>0.078125</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.903935</td>\n",
" <td>0.937500</td>\n",
" <td>0.033565</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.648744</td>\n",
" <td>0.629267</td>\n",
" <td>-0.019477</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric Baseline MediumChunk Baseline -> MediumChunk\n",
"0 faithfulness 0.698407 0.895359 0.196952\n",
"1 answer_relevancy 0.946766 0.955419 0.008653\n",
"2 context_recall 0.855903 0.934028 0.078125\n",
"3 context_precision 0.903935 0.937500 0.033565\n",
"4 answer_correctness 0.648744 0.629267 -0.019477"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_baseline_medium_chunk = pd.merge(df_baseline, medium_chunk_pdf, on='Metric')\n",
"\n",
"df_baseline_medium_chunk['Baseline -> MediumChunk'] = df_baseline_medium_chunk['MediumChunk'] - df_baseline_medium_chunk['Baseline']\n",
"\n",
"df_baseline_medium_chunk"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
"text_splitter = RecursiveCharacterTextSplitter(\n",
" chunk_size=3000,\n",
" chunk_overlap=0,\n",
" )\n",
"large_chunk_docs = text_splitter.split_documents(pdf_documents)"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"embedding = OpenAIEmbeddings(model=\"text-embedding-3-small\")"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"vectorstore = Qdrant.from_documents(\n",
" documents=large_chunk_docs,\n",
" embedding=embedding,\n",
" location=\":memory:\",\n",
" collection_name=\"Full Content w/ Clean PDF\"\n",
")\n",
"\n",
"large_chunk_retriever = vectorstore.as_retriever(\n",
" search_type=\"mmr\",\n",
" search_kwargs={\"k\": 4, \"fetch_k\": 10},\n",
")\n",
"\n",
"large_chunk_memory = ConversationBufferMemory(memory_key=\"chat_history\", return_messages=True, output_key=\"answer\")"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_rag_chain = ConversationalRetrievalChain.from_llm(\n",
" llm,\n",
" retriever=large_chunk_retriever,\n",
" memory=large_chunk_memory,\n",
" combine_docs_chain_kwargs={\"prompt\": PROMPT},\n",
" return_source_documents=True,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
"answers = []\n",
"contexts = []\n",
"\n",
"for question in test_questions:\n",
" response = large_chunk_rag_chain.invoke({\"question\" : question})\n",
" answers.append(response[\"answer\"])\n",
" contexts.append([context.page_content for context in response[\"source_documents\"]])"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [],
"source": [
"from datasets import Dataset\n",
"\n",
"large_chunk_dataset = Dataset.from_dict({\n",
" \"question\" : test_questions,\n",
" \"answer\" : answers,\n",
" \"contexts\" : contexts,\n",
" \"ground_truth\" : test_groundtruths\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'question': 'What is the significance of providing notice and explanation as a legal requirement in the context of automated systems?',\n",
" 'answer': \"Providing notice and explanation as a legal requirement in the context of automated systems is significant for several reasons:\\n\\n1. **Transparency**: It ensures that individuals are aware when automated systems are being used to make decisions that affect their lives, such as in hiring, credit scoring, or legal judgments. This transparency helps build trust in these systems (Source: [document name], p. 6).\\n\\n2. **Accountability**: By requiring organizations to explain how decisions are made, it holds them accountable for the outcomes of their automated systems. This means that if a decision negatively impacts someone, they have the right to understand the reasoning behind it and contest it if necessary (Source: [document name], p. 6).\\n\\n3. **Empowerment**: Notice and explanation empower individuals by giving them the information they need to understand and potentially challenge decisions made by automated systems. This is crucial in ensuring that people can address any errors or biases that may arise from these systems (Source: [document name], p. 6).\\n\\n4. **Safety and Efficacy**: Clear explanations allow experts to verify the reasonableness of automated recommendations before they are enacted, which is essential for ensuring that these systems operate safely and effectively (Source: [document name], p. 6).\\n\\n5. **Legal Compliance**: In some sectors, providing notice and explanation is already a legal requirement. Extending this practice across various sectors helps ensure consistent protection of individuals' rights and opportunities (Source: [document name], p. 6).\\n\\nOverall, these requirements are designed to protect individuals from potential harms associated with automated decision-making and to foster a more equitable and just use of technology in society.\",\n",
" 'contexts': ['NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE IS IMPORTANT\\nThis section provides a brief summary of the problems which the principle seeks to address and protect \\nagainst, including illustrative examples. \\nAutomated systems now determine opportunities, from employment to credit, and directly shape the American \\npublicβs experiences, from the courtroom to online classrooms, in ways that profoundly impact peopleβs lives. But this expansive impact is not always visible. An applicant might not know whether a person rejected their resume or a hiring algorithm moved them to the bottom of the list. A defendant in the courtroom might not know if a judge deny\\n-\\ning their bail is informed by an automated system that labeled them βhigh risk.β From correcting errors to contesting decisions, people are often denied the knowledge they need to address the impact of automated systems on their lives. Notice and explanations also serve an important safety and efficacy purpose, allowing experts to verify the reasonable\\n-\\nness of a recommendation before enacting it. \\nIn order to guard against potential harms, the American public needs to know if an automated system is being used. Clear, brief, and understandable notice is a prerequisite for achieving the other protections in this framework. Like\\n-\\nwise, the public is often unable to ascertain how or why an automated system has made a decision or contributed to a particular outcome. The decision-making processes of automated systems tend to be opaque, complex, and, therefore, unaccountable, whether by design or by omission. These factors can make explanations both more challenging and more important, and should not be used as a pretext to avoid explaining important decisions to the people impacted by those choices. In the context of automated systems, clear and valid explanations should be recognized as a baseline requirement. \\nProviding notice has long been a standard practice, and in many cases is a legal requirement, when, for example, making a video recording of someone (outside of a law enforcement or national security context). In some cases, such as credit, lenders are required to provide notice and explanation to consumers. Techniques used to automate the process of explaining such systems are under active research and improvement and such explanations can take many forms. Innovative companies and researchers are rising to the challenge and creating and deploying explanatory systems that can help the public better understand decisions that impact them. \\nWhile notice and explanation requirements are already in place in some sectors or situations, the American public deserve to know consistently and across sectors if an automated system is being used in a way that impacts their rights, opportunities, or access. This knowledge should provide confidence in how the public is being treated, and trust in the validity and reasonable use of automated systems.',\n",
" 'tion responsible for the system, and explanations of outcomes that are clear, timely, and accessible. Such notice should be kept up-to-date and people impacted by the system should be notified of significant use case or key functionality changes. You should know how and why an outcome impacting you was determined by an automated system, including when the automated system is not the sole input determining the outcome. Automated systems should provide explanations that are technically valid, meaningful and useful to you and to any operators or others who need to understand the system, and calibrated to the level of risk based on the context. Reporting that includes summary information about these automated systems in plain language and assessments of the clarity and quality of the notice and explanations should be made public whenever possible. \\n6',\n",
" \"NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPECTED OF AUTOMATED SYSTEMS\\nThe expectations for automated systems are meant to serve as a blueprint for the development of additional \\ntechnical standards and practices that are tailored for particular sectors and contexts. \\nTailored to the level of risk. An assessment should be done to determine the level of risk of the auto -\\nmated system. In settings where the consequences are high as determined by a risk assessment, or extensive \\noversight is expected (e.g., in criminal justice or some public sector settings), explanatory mechanisms should be built into the system design so that the systemβs full behavior can be explained in advance (i.e., only fully transparent models should be used), rather than as an after-the-decision interpretation. In other settings, the extent of explanation provided should be tailored to the risk level. \\nValid. The explanation provided by a system should accurately reflect the factors and the influences that led \\nto a particular decision, and should be meaningful for the particular customization based on purpose, target, and level of risk. While approximation and simplification may be necessary for the system to succeed based on the explanatory purpose and target of the explanation, or to account for the risk of fraud or other concerns related to revealing decision-making information, such simplifications should be done in a scientifically supportable way. Where appropriate based on the explanatory system, error ranges for the explanation should be calculated and included in the explanation, with the choice of presentation of such information balanced with usability and overall interface complexity concerns. \\nDemonstrate protections for notice and explanation \\nReporting. Summary reporting should document the determinations made based on the above consider -\\nations, including: the responsible entities for accountability purposes; the goal and use cases for the system, identified users, and impacted populations; the assessment of notice clarity and timeliness; the assessment of the explanation's validity and accessibility; the assessment of the level of risk; and the account and assessment of how explanations are tailored, including to the purpose, the recipient of the explanation, and the level of risk. Individualized profile information should be made readily available to the greatest extent possible that includes explanations for any system impacts or inferences. Reporting should be provided in a clear plain language and machine-readable manner. \\n44\",\n",
" 'You should be able to opt out, where appropriate, and \\nhave access to a person who can quickly consider and remedy problems you encounter. You should be able to opt out from automated systems in favor of a human alternative, where appropriate. Appropriateness should be determined based on rea\\n-\\nsonable expectations in a given context and with a focus on ensuring broad accessibility and protecting the public from especially harm\\n-\\nful impacts. In some cases, a human or other alternative may be re -\\nquired by law. You should have access to timely human consider -\\nation and remedy by a fallback and escalation process if an automat -\\ned system fails, it produces an error, or you would like to appeal or contest its impacts on you. Human consideration and fallback should be accessible, equitable, effective, maintained, accompanied by appropriate operator training, and should not impose an unrea\\n-\\nsonable burden on the public. Automated systems with an intended use within sensitive domains, including, but not limited to, criminal justice, employment, education, and health, should additionally be tailored to the purpose, provide meaningful access for oversight, include training for any people interacting with the system, and in\\n-\\ncorporate human consideration for adverse or high-risk decisions. Reporting that includes a description of these human governance processes and assessment of their timeliness, accessibility, out\\n-\\ncomes, and effectiveness should be made public whenever possible. HUMAN ALTERNATIVES , C ONSIDERATION ALLBACKF AND, \\n46'],\n",
" 'ground_truth': 'Providing notice and explanation as a legal requirement in the context of automated systems is significant because it allows individuals to understand how automated systems are impacting their lives. It helps in correcting errors, contesting decisions, and verifying the reasonableness of recommendations before enacting them. Clear and valid explanations are essential to ensure transparency, accountability, and trust in the use of automated systems across various sectors.'}"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"large_chunk_dataset[0]"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_dataframe = pd.DataFrame({\n",
" 'question': response_dataset['question'],\n",
" 'answer': response_dataset['answer'],\n",
" 'contexts': response_dataset['contexts'],\n",
" 'ground_truth': response_dataset['ground_truth']\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluating: 100%|ββββββββββ| 120/120 [01:56<00:00, 1.03it/s]\n"
]
}
],
"source": [
"large_chunk_results = evaluate(large_chunk_dataset, metrics)"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'faithfulness': 0.7961, 'answer_relevancy': 0.9593, 'context_recall': 0.8438, 'context_precision': 0.9294, 'answer_correctness': 0.6326}"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"large_chunk_results"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_size = large_chunk_results.to_pandas()\n",
"large_chunk_size"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_size.to_csv(\"large_chunk_ragas_results.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_pdf = pd.DataFrame(list(large_chunk_results.items()), columns=['Metric', 'LargeChunk'])"
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>LargeChunk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.796131</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.959296</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.843750</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.929398</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.632580</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric LargeChunk\n",
"0 faithfulness 0.796131\n",
"1 answer_relevancy 0.959296\n",
"2 context_recall 0.843750\n",
"3 context_precision 0.929398\n",
"4 answer_correctness 0.632580"
]
},
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"large_chunk_pdf"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [],
"source": [
"large_chunk_pdf.to_csv(\"large_chunk_metrics.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>Baseline</th>\n",
" <th>MediumChunk</th>\n",
" <th>LargeChunk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.698407</td>\n",
" <td>0.895359</td>\n",
" <td>0.796131</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.946766</td>\n",
" <td>0.955419</td>\n",
" <td>0.959296</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.855903</td>\n",
" <td>0.934028</td>\n",
" <td>0.843750</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.903935</td>\n",
" <td>0.937500</td>\n",
" <td>0.929398</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.648744</td>\n",
" <td>0.629267</td>\n",
" <td>0.632580</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric Baseline MediumChunk LargeChunk\n",
"0 faithfulness 0.698407 0.895359 0.796131\n",
"1 answer_relevancy 0.946766 0.955419 0.959296\n",
"2 context_recall 0.855903 0.934028 0.843750\n",
"3 context_precision 0.903935 0.937500 0.929398\n",
"4 answer_correctness 0.648744 0.629267 0.632580"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_baseline_medium_chunk = pd.merge(df_baseline, medium_chunk_pdf, on='Metric')\n",
"df_baseline_medium_and_large_chunk = pd.merge(df_baseline_medium_chunk, large_chunk_pdf, on='Metric')\n",
"\n",
"\n",
"df_baseline_medium_and_large_chunk"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>Baseline</th>\n",
" <th>MediumChunk</th>\n",
" <th>LargeChunk</th>\n",
" <th>HigestValue</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.698407</td>\n",
" <td>0.895359</td>\n",
" <td>0.796131</td>\n",
" <td>0.9 (MediumChunk)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.946766</td>\n",
" <td>0.955419</td>\n",
" <td>0.959296</td>\n",
" <td>0.96 (LargeChunk)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.855903</td>\n",
" <td>0.934028</td>\n",
" <td>0.843750</td>\n",
" <td>0.93 (MediumChunk)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.903935</td>\n",
" <td>0.937500</td>\n",
" <td>0.929398</td>\n",
" <td>0.94 (MediumChunk)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.648744</td>\n",
" <td>0.629267</td>\n",
" <td>0.632580</td>\n",
" <td>0.65 (Baseline)</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric Baseline MediumChunk LargeChunk HigestValue\n",
"0 faithfulness 0.698407 0.895359 0.796131 0.9 (MediumChunk)\n",
"1 answer_relevancy 0.946766 0.955419 0.959296 0.96 (LargeChunk)\n",
"2 context_recall 0.855903 0.934028 0.843750 0.93 (MediumChunk)\n",
"3 context_precision 0.903935 0.937500 0.929398 0.94 (MediumChunk)\n",
"4 answer_correctness 0.648744 0.629267 0.632580 0.65 (Baseline)"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_baseline_medium_and_large_chunk['MaxValue'] = df_baseline_medium_and_large_chunk[['Baseline', 'MediumChunk', 'LargeChunk']].max(axis=1)\n",
"\n",
"df_baseline_medium_and_large_chunk['MaxMetric'] = df_baseline_medium_and_large_chunk[['Baseline', 'MediumChunk', 'LargeChunk']].idxmax(axis=1)\n",
"\n",
"df_baseline_medium_and_large_chunk['HigestValue'] = df_baseline_medium_and_large_chunk['MaxValue'].round(2).astype(str) + ' (' + df_baseline_medium_and_large_chunk['MaxMetric'] + ')'\n",
"\n",
"df_baseline_medium_and_large_chunk = df_baseline_medium_and_large_chunk.drop(columns=['MaxValue', 'MaxMetric'])\n",
"\n",
"df_baseline_medium_and_large_chunk"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
"df_baseline_medium_and_large_chunk.to_csv(\"chunksize_eval.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
"text_splitter = RecursiveCharacterTextSplitter(\n",
" chunk_size=2000,\n",
" chunk_overlap=250,\n",
" )\n",
"medium_chunk_medium_overlap_docs = text_splitter.split_documents(pdf_documents)"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
"embedding = OpenAIEmbeddings(model=\"text-embedding-3-small\")"
]
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
"vectorstore = Qdrant.from_documents(\n",
" documents=medium_chunk_medium_overlap_docs,\n",
" embedding=embedding,\n",
" location=\":memory:\",\n",
" collection_name=\"Full Content w/ Clean PDF\"\n",
")\n",
"\n",
"medium_chunk_medium_overlap_retriever = vectorstore.as_retriever(\n",
" search_type=\"mmr\",\n",
" search_kwargs={\"k\": 4, \"fetch_k\": 10},\n",
")\n",
"\n",
"medium_chunk_medium_overlap_memory = ConversationBufferMemory(memory_key=\"chat_history\", return_messages=True, output_key=\"answer\")"
]
},
{
"cell_type": "code",
"execution_count": 86,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_medium_overlap_rag_chain = ConversationalRetrievalChain.from_llm(\n",
" llm,\n",
" retriever=medium_chunk_medium_overlap_retriever,\n",
" memory=medium_chunk_medium_overlap_memory,\n",
" combine_docs_chain_kwargs={\"prompt\": PROMPT},\n",
" return_source_documents=True,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [],
"source": [
"answers = []\n",
"contexts = []\n",
"\n",
"for question in test_questions:\n",
" response = medium_chunk_medium_overlap_rag_chain.invoke({\"question\" : question})\n",
" answers.append(response[\"answer\"])\n",
" contexts.append([context.page_content for context in response[\"source_documents\"]])"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [],
"source": [
"from datasets import Dataset\n",
"\n",
"medium_chunk_medium_overlap_dataset = Dataset.from_dict({\n",
" \"question\" : test_questions,\n",
" \"answer\" : answers,\n",
" \"contexts\" : contexts,\n",
" \"ground_truth\" : test_groundtruths\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'question': 'What is the significance of providing notice and explanation as a legal requirement in the context of automated systems?',\n",
" 'answer': \"Providing notice and explanation as a legal requirement in the context of automated systems is significant for several reasons:\\n\\n1. **Transparency**: It ensures that individuals are aware when automated systems are being used to make decisions that affect them. This transparency helps build trust between the public and the entities deploying these systems.\\n\\n2. **Accountability**: By requiring entities to identify themselves and explain their systems, it holds them accountable for the decisions made by these automated systems. This means that if a decision negatively impacts someone, they can seek clarification and potentially contest that decision.\\n\\n3. **Empowerment**: When individuals receive clear explanations about how decisions are made, they are better equipped to understand and challenge those decisions if necessary. This is particularly important in sensitive areas like healthcare, child welfare, and credit assessments, where decisions can significantly impact people's lives.\\n\\n4. **Fairness**: Notice and explanation requirements can help mitigate biases in automated decision-making. By ensuring that individuals understand the criteria and data used in these systems, it becomes easier to identify and address any discriminatory practices.\\n\\n5. **Informed Consent**: Individuals have the right to know how their data is being used and how it affects them. Providing notice and explanations supports informed consent, allowing people to make better decisions regarding their engagement with automated systems.\\n\\nOverall, these requirements aim to create a more equitable and just environment where automated systems are used responsibly and ethically (Source: [document name], p. [page number]).\",\n",
" 'contexts': [\"Providing notice has long been a standard practice, and in many cases is a legal requirement, when, for example, making a video recording of someone (outside of a law enforcement or national security context). In some cases, such as credit, lenders are required to provide notice and explanation to consumers. Techniques used to automate the process of explaining such systems are under active research and improvement and such explanations can take many forms. Innovative companies and researchers are rising to the challenge and creating and deploying explanatory systems that can help the public better understand decisions that impact them. \\nWhile notice and explanation requirements are already in place in some sectors or situations, the American public deserve to know consistently and across sectors if an automated system is being used in a way that impacts their rights, opportunities, or access. This knowledge should provide confidence in how the public is being treated, and trust in the validity and reasonable use of automated systems. \\nβ’ A lawyer representing an older client with disabilities who had been cut off from Medicaid-funded home\\nhealth-care assistance couldn't determine why\\n, especially since the decision went against historical access\\npractices. In a court hearing, the lawyer learned from a witness that the state in which the older client\\nlived \\nhad recently adopted a new algorithm to determine eligibility.83 The lack of a timely explanation made it\\nharder \\nto understand and contest the decision.\\nβ’\\nA formal child welfare investigation is opened against a parent based on an algorithm and without the parent\\never \\nbeing notified that data was being collected and used as part of an algorithmic child maltreatment\\nrisk assessment.84 The lack of notice or an explanation makes it harder for those performing child\\nmaltreatment assessments to validate the risk assessment and denies parents knowledge that could help them\\ncontest a decision.\\n41\",\n",
" 'You should know that an automated system is being used, \\nand understand how and why it contributes to outcomes that impact you. Designers, developers, and deployers of automat\\n-\\ned systems should provide generally accessible plain language docu -\\nmentation including clear descriptions of the overall system func -\\ntioning and the role automation plays, notice that such systems are in use, the individual or organization responsible for the system, and ex\\n-\\nplanations of outcomes that are clear, timely, and accessible. Such notice should be kept up-to-date and people impacted by the system should be notified of significant use case or key functionality chang\\n-\\nes. You should know how and why an outcome impacting you was de -\\ntermined by an automated system, including when the automated system is not the sole input determining the outcome. Automated systems should provide explanations that are technically valid, meaningful and useful to you and to any operators or others who need to understand the system, and calibrated to the level of risk based on the context. Reporting that includes summary information about these automated systems in plain language and assessments of the clarity and quality of the notice and explanations should be made public whenever possible. NOTICE AND EXPLANATION\\n40',\n",
" \"Demonstrate protections for notice and explanation \\nReporting. Summary reporting should document the determinations made based on the above consider -\\nations, including: the responsible entities for accountability purposes; the goal and use cases for the system, identified users, and impacted populations; the assessment of notice clarity and timeliness; the assessment of the explanation's validity and accessibility; the assessment of the level of risk; and the account and assessment of how explanations are tailored, including to the purpose, the recipient of the explanation, and the level of risk. Individualized profile information should be made readily available to the greatest extent possible that includes explanations for any system impacts or inferences. Reporting should be provided in a clear plain language and machine-readable manner. \\n44\",\n",
" 'NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPECTED OF AUTOMATED SYSTEMS\\nThe expectations for automated systems are meant to serve as a blueprint for the development of additional \\ntechnical standards and practices that are tailored for particular sectors and contexts. \\nAn automated system should provide demonstrably clear, timely, understandable, and accessible notice of use, and \\nexplanations as to how and why a decision was made or an action was taken by the system. These expectations are explained below. \\nProvide clear, timely, understandable, and accessible notice of use and explanations \\nGenerally accessible plain language documentation. The entity responsible for using the automated \\nsystem should ensure that documentation describing the overall system (including any human components) is \\npublic and easy to find. The documentation should describe, in plain language, how the system works and how \\nany automated component is used to determine an action or decision. It should also include expectations about \\nreporting described throughout this framework, such as the algorithmic impact assessments described as \\npart of Algorithmic Discrimination Protections. \\nAccount able. Notices should clearly identify the entity r esponsible for designing each component of the \\nsystem and the entity using it. \\nTimely and up-to-date. Users should receive notice of the use of automated systems in advance of using or \\nwhile being impacted by the technolog y. An explanation should be available with the decision itself, or soon \\nthereafte r. Notice should be kept up-to-date and people impacted by the system should be notified of use case \\nor key functionality changes. \\nBrief and clear. Notices and explanations should be assessed, such as by research on usersβ experiences, \\nincluding user testing, to ensure that the people using or impacted by the automated system are able to easily'],\n",
" 'ground_truth': 'Providing notice and explanation as a legal requirement in the context of automated systems is significant because it allows individuals to understand how automated systems are impacting their lives. It helps in correcting errors, contesting decisions, and verifying the reasonableness of recommendations before enacting them. Clear and valid explanations are essential to ensure transparency, accountability, and trust in the use of automated systems across various sectors.'}"
]
},
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_medium_overlap_dataset[0]"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluating: 100%|ββββββββββ| 120/120 [02:09<00:00, 1.08s/it]\n"
]
}
],
"source": [
"medium_chunk_medium_overlap_results = evaluate(medium_chunk_medium_overlap_dataset, metrics)"
]
},
{
"cell_type": "code",
"execution_count": 91,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'faithfulness': 0.8409, 'answer_relevancy': 0.9521, 'context_recall': 0.8472, 'context_precision': 0.9572, 'answer_correctness': 0.6181}"
]
},
"execution_count": 91,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_medium_overlap_results"
]
},
{
"cell_type": "code",
"execution_count": 92,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>question</th>\n",
" <th>contexts</th>\n",
" <th>answer</th>\n",
" <th>ground_truth</th>\n",
" <th>faithfulness</th>\n",
" <th>answer_relevancy</th>\n",
" <th>context_recall</th>\n",
" <th>context_precision</th>\n",
" <th>answer_correctness</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>What is the significance of providing notice a...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE I...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>Providing notice and explanation as a legal re...</td>\n",
" <td>1.000000</td>\n",
" <td>0.971321</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.604417</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>How can structured human feedback exercises, s...</td>\n",
" <td>[50 Participatory Engagement Methods \\nOn an ...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>Structured human feedback exercises, such as G...</td>\n",
" <td>1.000000</td>\n",
" <td>0.988309</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.817911</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>How do measurement gaps between laboratory and...</td>\n",
" <td>[49 early lifecycle TEVV approaches are develo...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>Measurement gaps between laboratory and real-w...</td>\n",
" <td>1.000000</td>\n",
" <td>0.988752</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.823813</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>How should data collection and use-case scope ...</td>\n",
" <td>[DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT...</td>\n",
" <td>To determine and implement data collection and...</td>\n",
" <td>Data collection and use-case scope limits in a...</td>\n",
" <td>1.000000</td>\n",
" <td>0.934138</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.583791</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>What action did the Federal Trade Commission t...</td>\n",
" <td>[β’ A device originally developed to help peopl...</td>\n",
" <td>The Federal Trade Commission (FTC) took action...</td>\n",
" <td>FTC sued Kochava for selling data that tracks ...</td>\n",
" <td>0.000000</td>\n",
" <td>0.939559</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.378037</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>How should explanatory mechanisms be built int...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC...</td>\n",
" <td>Integrating explanatory mechanisms into system...</td>\n",
" <td>In settings where the consequences are high as...</td>\n",
" <td>1.000000</td>\n",
" <td>0.930169</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.618594</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>What are some examples of GAI risks that organ...</td>\n",
" <td>[3 the abuse, misuse, and unsafe repurposing b...</td>\n",
" <td>Organizations need to consider several GAI (Ge...</td>\n",
" <td>Organizations need to consider various GAI ris...</td>\n",
" <td>1.000000</td>\n",
" <td>0.945032</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.692431</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>How should the validity of explanations provid...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC...</td>\n",
" <td>To ensure the validity of explanations provide...</td>\n",
" <td>The explanation provided by a system should ac...</td>\n",
" <td>1.000000</td>\n",
" <td>0.956092</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.811835</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>How do generative models like LLMs generate ou...</td>\n",
" <td>[6 2.2. Confabulation \\nβConfabulationβ refer...</td>\n",
" <td>Generative models, such as large language mode...</td>\n",
" <td>Generative models like LLMs generate outputs t...</td>\n",
" <td>1.000000</td>\n",
" <td>0.950645</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.387850</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>How can appropriate diligence on training data...</td>\n",
" <td>[27 MP-4.1-0 10 Conduct appropriate diligence ...</td>\n",
" <td>Appropriate diligence in the use of training d...</td>\n",
" <td>Appropriate diligence on training data use can...</td>\n",
" <td>0.866667</td>\n",
" <td>0.980143</td>\n",
" <td>0.666667</td>\n",
" <td>0.805556</td>\n",
" <td>0.362010</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>How do integrated human-AI systems benefit com...</td>\n",
" <td>[SAFE AND EFFECTIVE \\nSYSTEMS \\nHOW THESE PRIN...</td>\n",
" <td>Integrated human-AI systems enhance customer s...</td>\n",
" <td>Integrated human-AI systems benefit companies ...</td>\n",
" <td>0.000000</td>\n",
" <td>0.984211</td>\n",
" <td>0.000000</td>\n",
" <td>0.750000</td>\n",
" <td>0.405069</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>What was the purpose of the year of public eng...</td>\n",
" <td>[ABOUT THIS FRAMEWORK\\nThe Blueprint for an A...</td>\n",
" <td>The purpose of the year of public engagement t...</td>\n",
" <td>The purpose of the year of public engagement t...</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.341577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>How can automated systems prevent 'mission cre...</td>\n",
" <td>[DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT...</td>\n",
" <td>To prevent 'mission creep' while ensuring priv...</td>\n",
" <td>Automated systems can prevent 'mission creep' ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.965821</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.799830</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>How can GAI tech improve red-teaming with huma...</td>\n",
" <td>[51 general public participants. For example, ...</td>\n",
" <td>GAI technology can significantly enhance red-t...</td>\n",
" <td>GAI technologies can improve red-teaming with ...</td>\n",
" <td>0.780488</td>\n",
" <td>0.937442</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.925433</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>Why is it important for lenders to inform cons...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nHOW THESE PRINCIPLES...</td>\n",
" <td>It is important for lenders to inform consumer...</td>\n",
" <td>It is important for lenders to inform consumer...</td>\n",
" <td>0.904762</td>\n",
" <td>0.978568</td>\n",
" <td>0.750000</td>\n",
" <td>1.000000</td>\n",
" <td>0.438375</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>Why is public transparency important in automa...</td>\n",
" <td>[NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE I...</td>\n",
" <td>Public transparency is crucial in automated sy...</td>\n",
" <td>Public transparency is crucial in automated sy...</td>\n",
" <td>0.904762</td>\n",
" <td>0.968075</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.992173</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>How can governance principles manage risks of ...</td>\n",
" <td>[47 Appendix A. Primary GAI Considerations \\...</td>\n",
" <td>Governance principles can effectively manage t...</td>\n",
" <td>Governance principles can be used to manage ri...</td>\n",
" <td>0.275862</td>\n",
" <td>0.923952</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.790115</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>Why is accuracy important in reviewing and doc...</td>\n",
" <td>[25 MP-2.3-002 Review and document accuracy, r...</td>\n",
" <td>Accuracy in reviewing and documenting data thr...</td>\n",
" <td>Accuracy is crucial in reviewing and documenti...</td>\n",
" <td>1.000000</td>\n",
" <td>0.960059</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.384420</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>How can feedback be used to gather user input ...</td>\n",
" <td>[50 Participatory Engagement Methods \\nOn an ...</td>\n",
" <td>Feedback can be effectively utilized to collec...</td>\n",
" <td>Use structured feedback mechanisms to solicit ...</td>\n",
" <td>0.384615</td>\n",
" <td>0.949095</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.360994</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>What measures are being taken to address issue...</td>\n",
" <td>[ENDNOTES\\n35. Carrie Johnson. Flaws plague a ...</td>\n",
" <td>Measures being taken to address issues for tra...</td>\n",
" <td>TSA has announced plans to implement a gender-...</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.500000</td>\n",
" <td>1.000000</td>\n",
" <td>0.918343</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>How do ballot curing laws help voters fix ball...</td>\n",
" <td>[HUMAN ALTERNATIVES, \\nCONSIDERATION, AND \\nFA...</td>\n",
" <td>Ballot curing laws assist voters in addressing...</td>\n",
" <td>Ballot curing laws in at least 24 states provi...</td>\n",
" <td>0.916667</td>\n",
" <td>0.948570</td>\n",
" <td>1.000000</td>\n",
" <td>0.833333</td>\n",
" <td>0.712558</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>How can feedback and red-teaming assess GAI eq...</td>\n",
" <td>[49 early lifecycle TEVV approaches are develo...</td>\n",
" <td>Feedback and red-teaming can be effectively ut...</td>\n",
" <td>Implement continuous monitoring of GAI system ...</td>\n",
" <td>1.000000</td>\n",
" <td>0.917148</td>\n",
" <td>0.666667</td>\n",
" <td>1.000000</td>\n",
" <td>0.807885</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>How can algorithmic discrimination be prevente...</td>\n",
" <td>[standards may require instituting mitigation ...</td>\n",
" <td>Proactive measures and equity assessments can ...</td>\n",
" <td>Algorithmic discrimination can be prevented th...</td>\n",
" <td>0.240000</td>\n",
" <td>0.949858</td>\n",
" <td>0.666667</td>\n",
" <td>0.916667</td>\n",
" <td>0.602997</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>How can system design ensure behavior transpar...</td>\n",
" <td>[HUMAN ALTERNATIVES, \\nCONSIDERATION, AND \\nFA...</td>\n",
" <td>To ensure behavior transparency in high-risk s...</td>\n",
" <td>In settings where the consequences are high as...</td>\n",
" <td>0.833333</td>\n",
" <td>0.956142</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.621474</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" question \\\n",
"0 What is the significance of providing notice a... \n",
"1 How can structured human feedback exercises, s... \n",
"2 How do measurement gaps between laboratory and... \n",
"3 How should data collection and use-case scope ... \n",
"4 What action did the Federal Trade Commission t... \n",
"5 How should explanatory mechanisms be built int... \n",
"6 What are some examples of GAI risks that organ... \n",
"7 How should the validity of explanations provid... \n",
"8 How do generative models like LLMs generate ou... \n",
"9 How can appropriate diligence on training data... \n",
"10 How do integrated human-AI systems benefit com... \n",
"11 What was the purpose of the year of public eng... \n",
"12 How can automated systems prevent 'mission cre... \n",
"13 How can GAI tech improve red-teaming with huma... \n",
"14 Why is it important for lenders to inform cons... \n",
"15 Why is public transparency important in automa... \n",
"16 How can governance principles manage risks of ... \n",
"17 Why is accuracy important in reviewing and doc... \n",
"18 How can feedback be used to gather user input ... \n",
"19 What measures are being taken to address issue... \n",
"20 How do ballot curing laws help voters fix ball... \n",
"21 How can feedback and red-teaming assess GAI eq... \n",
"22 How can algorithmic discrimination be prevente... \n",
"23 How can system design ensure behavior transpar... \n",
"\n",
" contexts \\\n",
"0 [NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE I... \n",
"1 [50 Participatory Engagement Methods \\nOn an ... \n",
"2 [49 early lifecycle TEVV approaches are develo... \n",
"3 [DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT... \n",
"4 [β’ A device originally developed to help peopl... \n",
"5 [NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC... \n",
"6 [3 the abuse, misuse, and unsafe repurposing b... \n",
"7 [NOTICE & \\nEXPLANATION \\nWHAT SHOULD BE EXPEC... \n",
"8 [6 2.2. Confabulation \\nβConfabulationβ refer... \n",
"9 [27 MP-4.1-0 10 Conduct appropriate diligence ... \n",
"10 [SAFE AND EFFECTIVE \\nSYSTEMS \\nHOW THESE PRIN... \n",
"11 [ABOUT THIS FRAMEWORK\\nThe Blueprint for an A... \n",
"12 [DATA PRIVACY \\nWHAT SHOULD BE EXPECTED OF AUT... \n",
"13 [51 general public participants. For example, ... \n",
"14 [NOTICE & \\nEXPLANATION \\nHOW THESE PRINCIPLES... \n",
"15 [NOTICE & \\nEXPLANATION \\nWHY THIS PRINCIPLE I... \n",
"16 [47 Appendix A. Primary GAI Considerations \\... \n",
"17 [25 MP-2.3-002 Review and document accuracy, r... \n",
"18 [50 Participatory Engagement Methods \\nOn an ... \n",
"19 [ENDNOTES\\n35. Carrie Johnson. Flaws plague a ... \n",
"20 [HUMAN ALTERNATIVES, \\nCONSIDERATION, AND \\nFA... \n",
"21 [49 early lifecycle TEVV approaches are develo... \n",
"22 [standards may require instituting mitigation ... \n",
"23 [HUMAN ALTERNATIVES, \\nCONSIDERATION, AND \\nFA... \n",
"\n",
" answer \\\n",
"0 Providing notice and explanation as a legal re... \n",
"1 Structured human feedback exercises, such as G... \n",
"2 Measurement gaps between laboratory and real-w... \n",
"3 To determine and implement data collection and... \n",
"4 The Federal Trade Commission (FTC) took action... \n",
"5 Integrating explanatory mechanisms into system... \n",
"6 Organizations need to consider several GAI (Ge... \n",
"7 To ensure the validity of explanations provide... \n",
"8 Generative models, such as large language mode... \n",
"9 Appropriate diligence in the use of training d... \n",
"10 Integrated human-AI systems enhance customer s... \n",
"11 The purpose of the year of public engagement t... \n",
"12 To prevent 'mission creep' while ensuring priv... \n",
"13 GAI technology can significantly enhance red-t... \n",
"14 It is important for lenders to inform consumer... \n",
"15 Public transparency is crucial in automated sy... \n",
"16 Governance principles can effectively manage t... \n",
"17 Accuracy in reviewing and documenting data thr... \n",
"18 Feedback can be effectively utilized to collec... \n",
"19 Measures being taken to address issues for tra... \n",
"20 Ballot curing laws assist voters in addressing... \n",
"21 Feedback and red-teaming can be effectively ut... \n",
"22 Proactive measures and equity assessments can ... \n",
"23 To ensure behavior transparency in high-risk s... \n",
"\n",
" ground_truth faithfulness \\\n",
"0 Providing notice and explanation as a legal re... 1.000000 \n",
"1 Structured human feedback exercises, such as G... 1.000000 \n",
"2 Measurement gaps between laboratory and real-w... 1.000000 \n",
"3 Data collection and use-case scope limits in a... 1.000000 \n",
"4 FTC sued Kochava for selling data that tracks ... 0.000000 \n",
"5 In settings where the consequences are high as... 1.000000 \n",
"6 Organizations need to consider various GAI ris... 1.000000 \n",
"7 The explanation provided by a system should ac... 1.000000 \n",
"8 Generative models like LLMs generate outputs t... 1.000000 \n",
"9 Appropriate diligence on training data use can... 0.866667 \n",
"10 Integrated human-AI systems benefit companies ... 0.000000 \n",
"11 The purpose of the year of public engagement t... 1.000000 \n",
"12 Automated systems can prevent 'mission creep' ... 1.000000 \n",
"13 GAI technologies can improve red-teaming with ... 0.780488 \n",
"14 It is important for lenders to inform consumer... 0.904762 \n",
"15 Public transparency is crucial in automated sy... 0.904762 \n",
"16 Governance principles can be used to manage ri... 0.275862 \n",
"17 Accuracy is crucial in reviewing and documenti... 1.000000 \n",
"18 Use structured feedback mechanisms to solicit ... 0.384615 \n",
"19 TSA has announced plans to implement a gender-... 1.000000 \n",
"20 Ballot curing laws in at least 24 states provi... 0.916667 \n",
"21 Implement continuous monitoring of GAI system ... 1.000000 \n",
"22 Algorithmic discrimination can be prevented th... 0.240000 \n",
"23 In settings where the consequences are high as... 0.833333 \n",
"\n",
" answer_relevancy context_recall context_precision answer_correctness \n",
"0 0.971321 1.000000 1.000000 0.604417 \n",
"1 0.988309 1.000000 1.000000 0.817911 \n",
"2 0.988752 1.000000 1.000000 0.823813 \n",
"3 0.934138 1.000000 1.000000 0.583791 \n",
"4 0.939559 0.000000 0.000000 0.378037 \n",
"5 0.930169 1.000000 1.000000 0.618594 \n",
"6 0.945032 1.000000 1.000000 0.692431 \n",
"7 0.956092 1.000000 1.000000 0.811835 \n",
"8 0.950645 1.000000 1.000000 0.387850 \n",
"9 0.980143 0.666667 0.805556 0.362010 \n",
"10 0.984211 0.000000 0.750000 0.405069 \n",
"11 1.000000 1.000000 1.000000 0.341577 \n",
"12 0.965821 1.000000 1.000000 0.799830 \n",
"13 0.937442 1.000000 1.000000 0.925433 \n",
"14 0.978568 0.750000 1.000000 0.438375 \n",
"15 0.968075 1.000000 1.000000 0.992173 \n",
"16 0.923952 1.000000 1.000000 0.790115 \n",
"17 0.960059 1.000000 1.000000 0.384420 \n",
"18 0.949095 1.000000 1.000000 0.360994 \n",
"19 1.000000 0.500000 1.000000 0.918343 \n",
"20 0.948570 1.000000 0.833333 0.712558 \n",
"21 0.917148 0.666667 1.000000 0.807885 \n",
"22 0.949858 0.666667 0.916667 0.602997 \n",
"23 0.956142 1.000000 1.000000 0.621474 "
]
},
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_medium_overlap_df = large_chunk_results.to_pandas()\n",
"medium_chunk_medium_overlap_df"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {},
"outputs": [],
"source": [
"medium_chunk_medium_overlap_metrics = pd.DataFrame(list(medium_chunk_medium_overlap_results.items()), columns=['Metric', 'MedChunkMedOverlap'])"
]
},
{
"cell_type": "code",
"execution_count": 94,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>MedChunkMedOverlap</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.840881</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.952068</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.847222</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.957176</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.618149</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric MedChunkMedOverlap\n",
"0 faithfulness 0.840881\n",
"1 answer_relevancy 0.952068\n",
"2 context_recall 0.847222\n",
"3 context_precision 0.957176\n",
"4 answer_correctness 0.618149"
]
},
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_medium_overlap_metrics"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>MediumChunk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.895359</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.955419</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.934028</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.937500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.629267</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric MediumChunk\n",
"0 faithfulness 0.895359\n",
"1 answer_relevancy 0.955419\n",
"2 context_recall 0.934028\n",
"3 context_precision 0.937500\n",
"4 answer_correctness 0.629267"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"medium_chunk_pdf"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metric</th>\n",
" <th>MediumChunk</th>\n",
" <th>MedChunkMedOverlap</th>\n",
" <th>MediumChunk -> MedChunkMedOverlap</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>faithfulness</td>\n",
" <td>0.895359</td>\n",
" <td>0.840881</td>\n",
" <td>-0.054478</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>answer_relevancy</td>\n",
" <td>0.955419</td>\n",
" <td>0.952068</td>\n",
" <td>-0.003351</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>context_recall</td>\n",
" <td>0.934028</td>\n",
" <td>0.847222</td>\n",
" <td>-0.086806</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>context_precision</td>\n",
" <td>0.937500</td>\n",
" <td>0.957176</td>\n",
" <td>0.019676</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>answer_correctness</td>\n",
" <td>0.629267</td>\n",
" <td>0.618149</td>\n",
" <td>-0.011118</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metric MediumChunk MedChunkMedOverlap \\\n",
"0 faithfulness 0.895359 0.840881 \n",
"1 answer_relevancy 0.955419 0.952068 \n",
"2 context_recall 0.934028 0.847222 \n",
"3 context_precision 0.937500 0.957176 \n",
"4 answer_correctness 0.629267 0.618149 \n",
"\n",
" MediumChunk -> MedChunkMedOverlap \n",
"0 -0.054478 \n",
"1 -0.003351 \n",
"2 -0.086806 \n",
"3 0.019676 \n",
"4 -0.011118 "
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_medium_chunk_vs_med_chunk_med_overlap = pd.merge(medium_chunk_pdf, medium_chunk_medium_overlap_metrics, on='Metric')\n",
"\n",
"df_medium_chunk_vs_med_chunk_med_overlap['MediumChunk -> MedChunkMedOverlap'] = df_medium_chunk_vs_med_chunk_med_overlap['MedChunkMedOverlap'] - df_medium_chunk_vs_med_chunk_med_overlap['MediumChunk']\n",
"\n",
"df_medium_chunk_vs_med_chunk_med_overlap"
]
},
{
"cell_type": "code",
"execution_count": 98,
"metadata": {},
"outputs": [],
"source": [
"df_medium_chunk_vs_med_chunk_med_overlap.to_csv(\"medium_chunk_vs_med_chunk_med_overlap_metrics.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"collapsed_sections": [
"Clyykfe6xOIo"
],
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"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.4"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"00afceb39c074975b6b88d6d0d4d2901": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9932859168ad436e9aeef09279b534b1",
"max": 95,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_474f44771cb04a4693585273a03a5548",
"value": 95
}
},
"0267d8c4d9cc48b0a4d60d206de62a91": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"09c3173c05f54539ae025937b1525e90": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"0be98b57b4894cf9a92818ae1dd72976": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_bda4d1ec0f0043c8b4d254a4ada3e9bf",
"max": 20,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_1b24ed8b36764c39aef39c92430fdc1d",
"value": 20
}
},
"126c30cc07c4452ab73fefce09dab617": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"1535c2c75a104f3abb262c5fb7859c14": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"1b24ed8b36764c39aef39c92430fdc1d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"1c0f9aeab5de4e32af8bfef423a64f3b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_0267d8c4d9cc48b0a4d60d206de62a91",
"placeholder": "β",
"style": "IPY_MODEL_126c30cc07c4452ab73fefce09dab617",
"value": "Generating:β100%"
}
},
"1e2026abc1314d3caf37d74af7a407e7": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_e32bc4bb09af4ac5a608e56f87317596",
"max": 95,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_b53095cea92740dfb967120a77310283",
"value": 95
}
},
"22c5f6324de545ba814402c3f71d84f1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"353b6b9a974048499d854774fe4c882c": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"3b2e50139c234d19ac3e32515e575883": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"474f44771cb04a4693585273a03a5548": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"4d9ba78dc78040f494df9122ddc7ba1d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_e4e76e5d4fba404a9ed4ff059f3a0c04",
"IPY_MODEL_1e2026abc1314d3caf37d74af7a407e7",
"IPY_MODEL_fb306876e3244dc69312e2af46c4da02"
],
"layout": "IPY_MODEL_b319ae78e30d437c81f07d5a062ba805"
}
},
"63d6044414e24c5ea55efa925f7a3b56": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"754827da55fa4240bce3710048d1645b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_bd96dd318c1b4e1481c039321e052081",
"placeholder": "β",
"style": "IPY_MODEL_3b2e50139c234d19ac3e32515e575883",
"value": "embeddingβnodes:β100%"
}
},
"764b7b6827c9437b90c9c948b9f1037b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"771597df670f417794f66408b05a7eb9": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"7ab80823e1344b638ddd1646367a6ce6": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"7b61421d62964b00ba440ecba21f4b52": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_353b6b9a974048499d854774fe4c882c",
"max": 1248,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_09c3173c05f54539ae025937b1525e90",
"value": 1248
}
},
"8025a0f161d3475794daa9cd88209d5c": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"824fe37b12d4414a9376e266ddd086f5": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9496fc3f26cb42ec9ace36175eb14906",
"placeholder": "β",
"style": "IPY_MODEL_8025a0f161d3475794daa9cd88209d5c",
"value": "Evaluating:β100%"
}
},
"90af75e58cef440a8d38ee6621e0f4d1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"92f2e2d3123c4cd88d7c5755342ae154": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9496fc3f26cb42ec9ace36175eb14906": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9932859168ad436e9aeef09279b534b1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9a40d4ba626f4563b062a5765325d8e4": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_1c0f9aeab5de4e32af8bfef423a64f3b",
"IPY_MODEL_0be98b57b4894cf9a92818ae1dd72976",
"IPY_MODEL_c7550f460273484a913d211381630626"
],
"layout": "IPY_MODEL_ba8f638b7f6343d9b07cce6e54e9be1c"
}
},
"9ccac42dd9f04713b0ed9fe09c35b5b0": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": "hidden",
"width": null
}
},
"b319ae78e30d437c81f07d5a062ba805": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b53095cea92740dfb967120a77310283": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"ba8f638b7f6343d9b07cce6e54e9be1c": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"bd96dd318c1b4e1481c039321e052081": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"bda4d1ec0f0043c8b4d254a4ada3e9bf": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c3d31c6cf07143aea1bbe76aa13fbca8": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_754827da55fa4240bce3710048d1645b",
"IPY_MODEL_7b61421d62964b00ba440ecba21f4b52",
"IPY_MODEL_c67b66e1f2d34ce4b10789fc2fca5843"
],
"layout": "IPY_MODEL_9ccac42dd9f04713b0ed9fe09c35b5b0"
}
},
"c67b66e1f2d34ce4b10789fc2fca5843": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_faa998b429774e4eb6aaaa5477bb6977",
"placeholder": "β",
"style": "IPY_MODEL_7ab80823e1344b638ddd1646367a6ce6",
"value": "β1248/1248β[07:00<00:00,β49.86s/it]"
}
},
"c7550f460273484a913d211381630626": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1535c2c75a104f3abb262c5fb7859c14",
"placeholder": "β",
"style": "IPY_MODEL_92f2e2d3123c4cd88d7c5755342ae154",
"value": "β20/20β[01:17<00:00,β12.75s/it]"
}
},
"ce0b10aca9064bc092cf3305eb0dab04": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ced3689d335c4f1ca62d39b908d6cb33": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_824fe37b12d4414a9376e266ddd086f5",
"IPY_MODEL_00afceb39c074975b6b88d6d0d4d2901",
"IPY_MODEL_e8c20cb22ecb40dbaf61959fc7d087cb"
],
"layout": "IPY_MODEL_771597df670f417794f66408b05a7eb9"
}
},
"d020211480b149cab1761b14ae631eb1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e32bc4bb09af4ac5a608e56f87317596": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e4e76e5d4fba404a9ed4ff059f3a0c04": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_22c5f6324de545ba814402c3f71d84f1",
"placeholder": "β",
"style": "IPY_MODEL_764b7b6827c9437b90c9c948b9f1037b",
"value": "Evaluating:β100%"
}
},
"e8c20cb22ecb40dbaf61959fc7d087cb": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_90af75e58cef440a8d38ee6621e0f4d1",
"placeholder": "β",
"style": "IPY_MODEL_ce0b10aca9064bc092cf3305eb0dab04",
"value": "β95/95β[00:30<00:00,ββ1.25it/s]"
}
},
"faa998b429774e4eb6aaaa5477bb6977": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"fb306876e3244dc69312e2af46c4da02": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d020211480b149cab1761b14ae631eb1",
"placeholder": "β",
"style": "IPY_MODEL_63d6044414e24c5ea55efa925f7a3b56",
"value": "β95/95β[00:24<00:00,ββ1.20it/s]"
}
}
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|