AlaFalaki commited on
Commit
1c9827a
·
1 Parent(s): 13f3498

Created using Colab

Browse files
Files changed (1) hide show
  1. notebooks/06-Evaluate_RAG.ipynb +162 -103
notebooks/06-Evaluate_RAG.ipynb CHANGED
@@ -21,11 +21,61 @@
21
  },
22
  {
23
  "cell_type": "code",
24
- "execution_count": 6,
25
  "metadata": {
26
- "id": "QPJzr-I9XQ7l"
 
 
 
 
27
  },
28
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  "source": [
30
  "!pip install -q llama-index==0.10.37 openai==1.30.1 tiktoken==0.7.0 chromadb==0.5.0 llama-index-vector-stores-chroma==0.1.7"
31
  ]
@@ -41,7 +91,7 @@
41
  "import os\n",
42
  "\n",
43
  "# Set the \"OPENAI_API_KEY\" in the Python environment. Will be used by OpenAI client later.\n",
44
- "os.environ[\"OPENAI_API_KEY\"] = \"[YOUR_OPENAI_KEY]\""
45
  ]
46
  },
47
  {
@@ -86,7 +136,7 @@
86
  },
87
  {
88
  "cell_type": "code",
89
- "execution_count": 7,
90
  "metadata": {
91
  "id": "zAaGcYMJzHAN"
92
  },
@@ -127,21 +177,21 @@
127
  },
128
  {
129
  "cell_type": "code",
130
- "execution_count": 8,
131
  "metadata": {
132
  "colab": {
133
  "base_uri": "https://localhost:8080/"
134
  },
135
  "id": "fQtpDvUzKNzI",
136
- "outputId": "da1c5652-403c-418e-93ba-4749983c1cfa"
137
  },
138
  "outputs": [
139
  {
140
  "output_type": "stream",
141
  "name": "stdout",
142
  "text": [
143
- "--2024-06-11 16:47:13-- https://raw.githubusercontent.com/AlaFalaki/tutorial_notebooks/main/data/mini-llama-articles.csv\n",
144
- "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.111.133, ...\n",
145
  "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
146
  "HTTP request sent, awaiting response... 200 OK\n",
147
  "Length: 173646 (170K) [text/plain]\n",
@@ -149,7 +199,7 @@
149
  "\n",
150
  "mini-llama-articles 100%[===================>] 169.58K --.-KB/s in 0.03s \n",
151
  "\n",
152
- "2024-06-11 16:47:14 (4.95 MB/s) - ‘mini-llama-articles.csv’ saved [173646/173646]\n",
153
  "\n"
154
  ]
155
  }
@@ -169,13 +219,13 @@
169
  },
170
  {
171
  "cell_type": "code",
172
- "execution_count": 9,
173
  "metadata": {
174
  "colab": {
175
  "base_uri": "https://localhost:8080/"
176
  },
177
  "id": "_WER5lt0N7c5",
178
- "outputId": "2e404b1b-a8f8-4b0d-c5ad-b4aef649b3f2"
179
  },
180
  "outputs": [
181
  {
@@ -186,7 +236,7 @@
186
  ]
187
  },
188
  "metadata": {},
189
- "execution_count": 9
190
  }
191
  ],
192
  "source": [
@@ -219,7 +269,7 @@
219
  },
220
  {
221
  "cell_type": "code",
222
- "execution_count": 10,
223
  "metadata": {
224
  "id": "lFvW_886dxKX"
225
  },
@@ -242,7 +292,7 @@
242
  },
243
  {
244
  "cell_type": "code",
245
- "execution_count": 11,
246
  "metadata": {
247
  "colab": {
248
  "base_uri": "https://localhost:8080/"
@@ -278,7 +328,7 @@
278
  },
279
  {
280
  "cell_type": "code",
281
- "execution_count": 12,
282
  "metadata": {
283
  "id": "STACTMUR1z9N"
284
  },
@@ -301,38 +351,38 @@
301
  },
302
  {
303
  "cell_type": "code",
304
- "execution_count": 13,
305
  "metadata": {
306
  "colab": {
307
  "base_uri": "https://localhost:8080/",
308
  "height": 81,
309
  "referenced_widgets": [
310
- "de111a67b56f43c7b8c62f5ae989eaae",
311
- "d43aba64df1741c289de2d04934fc29f",
312
- "0465399af85c4bfa8ee6ac541833ad0e",
313
- "e7dd26ddf6434335bf3dd8d9ad3a1dfb",
314
- "eda4aaa92b6542d5877628e00c9f86b9",
315
- "1d78d8024aa049e99acafcb55a229a6b",
316
- "8c9cd46c635f43d9aa7014fe2caf66d9",
317
- "cd1d4f99e3e441af8a905ed8337c61e2",
318
- "334a92afaf284b09b873f70f632198ce",
319
- "dca0b364c2f14bcf8c4f53ca8ac36d70",
320
- "427b40bae46143e5ba8a79bef1510216",
321
- "767d542c637e4fcb9812bf2a641d7667",
322
- "6f3642aa394449a8946b2c1fe3de03e8",
323
- "6794ed529b9a49d8bd828b8ee942bc5c",
324
- "01df7b933c8f43e2a9135c56f471ebfe",
325
- "11a9b1b3c9964d04968d7e67a1fbc5af",
326
- "f55eeedeb2fa4716a1bec1f4b1392230",
327
- "b1704fd5ed8044e79c752de8d076e4a8",
328
- "12862a5bac05411c93700050e99f379f",
329
- "9a4c8a453357486286343cf5c817dc36",
330
- "92be71ee85654aa8aaf57a385224ea2c",
331
- "b528382dfa984f24a8ea7d762e427c8c"
332
  ]
333
  },
334
  "id": "CtdsIUQ81_hT",
335
- "outputId": "0c6c1c2b-85b4-4afb-a51a-7957bcdc9e95"
336
  },
337
  "outputs": [
338
  {
@@ -344,7 +394,7 @@
344
  "application/vnd.jupyter.widget-view+json": {
345
  "version_major": 2,
346
  "version_minor": 0,
347
- "model_id": "de111a67b56f43c7b8c62f5ae989eaae"
348
  }
349
  },
350
  "metadata": {}
@@ -358,7 +408,7 @@
358
  "application/vnd.jupyter.widget-view+json": {
359
  "version_major": 2,
360
  "version_minor": 0,
361
- "model_id": "767d542c637e4fcb9812bf2a641d7667"
362
  }
363
  },
364
  "metadata": {}
@@ -381,7 +431,7 @@
381
  },
382
  {
383
  "cell_type": "code",
384
- "execution_count": 14,
385
  "metadata": {
386
  "collapsed": true,
387
  "colab": {
@@ -417,7 +467,7 @@
417
  },
418
  {
419
  "cell_type": "code",
420
- "execution_count": 15,
421
  "metadata": {
422
  "id": "HbT3-kRO4Qpt"
423
  },
@@ -431,7 +481,7 @@
431
  },
432
  {
433
  "cell_type": "code",
434
- "execution_count": 16,
435
  "metadata": {
436
  "id": "sb61DWU84bHP"
437
  },
@@ -442,7 +492,7 @@
442
  },
443
  {
444
  "cell_type": "code",
445
- "execution_count": 17,
446
  "metadata": {
447
  "id": "G32W2LMMCmnv"
448
  },
@@ -453,7 +503,7 @@
453
  },
454
  {
455
  "cell_type": "code",
456
- "execution_count": 18,
457
  "metadata": {
458
  "colab": {
459
  "base_uri": "https://localhost:8080/",
@@ -483,7 +533,7 @@
483
  },
484
  {
485
  "cell_type": "code",
486
- "execution_count": 19,
487
  "metadata": {
488
  "colab": {
489
  "base_uri": "https://localhost:8080/"
@@ -566,7 +616,7 @@
566
  },
567
  {
568
  "cell_type": "code",
569
- "execution_count": 20,
570
  "metadata": {
571
  "colab": {
572
  "base_uri": "https://localhost:8080/"
@@ -599,7 +649,7 @@
599
  },
600
  {
601
  "cell_type": "code",
602
- "execution_count": 21,
603
  "metadata": {
604
  "id": "mNDd5i921Hww"
605
  },
@@ -634,7 +684,7 @@
634
  },
635
  {
636
  "cell_type": "code",
637
- "execution_count": 22,
638
  "metadata": {
639
  "id": "eARSzx8I1Hww"
640
  },
@@ -664,7 +714,7 @@
664
  },
665
  {
666
  "cell_type": "code",
667
- "execution_count": 23,
668
  "metadata": {
669
  "colab": {
670
  "base_uri": "https://localhost:8080/"
@@ -727,13 +777,13 @@
727
  },
728
  {
729
  "cell_type": "code",
730
- "execution_count": 24,
731
  "metadata": {
732
  "colab": {
733
  "base_uri": "https://localhost:8080/"
734
  },
735
  "id": "ckjE4fcD1Hwx",
736
- "outputId": "0124b4cb-5629-4041-ac1a-d5863c37e576"
737
  },
738
  "outputs": [
739
  {
@@ -742,32 +792,38 @@
742
  "text": [
743
  "top_2 faithfulness_score: 1.0\n",
744
  "top_2 relevancy_score: 1.0\n",
 
745
  "top_4 faithfulness_score: 1.0\n",
746
  "top_4 relevancy_score: 1.0\n",
 
747
  "top_6 faithfulness_score: 1.0\n",
748
  "top_6 relevancy_score: 1.0\n",
 
749
  "top_8 faithfulness_score: 1.0\n",
750
  "top_8 relevancy_score: 1.0\n",
751
- "top_10 faithfulness_score: 0.95\n",
752
- "top_10 relevancy_score: 0.95\n"
 
 
753
  ]
754
  }
755
  ],
756
  "source": [
757
- "from llama_index.core.evaluation import RelevancyEvaluator, FaithfulnessEvaluator, BatchEvalRunner\n",
758
  "from llama_index.llms.openai import OpenAI\n",
759
  "\n",
760
  "llm_gpt4 = OpenAI(temperature=0, model=\"gpt-4o\")\n",
761
  "\n",
762
  "faithfulness_evaluator = FaithfulnessEvaluator(llm=llm_gpt4)\n",
763
  "relevancy_evaluator = RelevancyEvaluator(llm=llm_gpt4)\n",
 
764
  "\n",
765
  "# Run evaluation\n",
766
  "queries = list(rag_eval_dataset.queries.values())\n",
767
  "batch_eval_queries = queries[:20]\n",
768
  "\n",
769
  "runner = BatchEvalRunner(\n",
770
- "{\"faithfulness\": faithfulness_evaluator, \"relevancy\": relevancy_evaluator},\n",
771
  "workers=32,\n",
772
  ")\n",
773
  "\n",
@@ -782,7 +838,10 @@
782
  " print(f\"top_{i} faithfulness_score: {faithfulness_score}\")\n",
783
  "\n",
784
  " relevancy_score = sum(result.passing for result in eval_results['relevancy']) / len(eval_results['relevancy'])\n",
785
- " print(f\"top_{i} relevancy_score: {relevancy_score}\")\n"
 
 
 
786
  ]
787
  },
788
  {
@@ -818,7 +877,7 @@
818
  },
819
  "widgets": {
820
  "application/vnd.jupyter.widget-state+json": {
821
- "de111a67b56f43c7b8c62f5ae989eaae": {
822
  "model_module": "@jupyter-widgets/controls",
823
  "model_name": "HBoxModel",
824
  "model_module_version": "1.5.0",
@@ -833,14 +892,14 @@
833
  "_view_name": "HBoxView",
834
  "box_style": "",
835
  "children": [
836
- "IPY_MODEL_d43aba64df1741c289de2d04934fc29f",
837
- "IPY_MODEL_0465399af85c4bfa8ee6ac541833ad0e",
838
- "IPY_MODEL_e7dd26ddf6434335bf3dd8d9ad3a1dfb"
839
  ],
840
- "layout": "IPY_MODEL_eda4aaa92b6542d5877628e00c9f86b9"
841
  }
842
  },
843
- "d43aba64df1741c289de2d04934fc29f": {
844
  "model_module": "@jupyter-widgets/controls",
845
  "model_name": "HTMLModel",
846
  "model_module_version": "1.5.0",
@@ -855,13 +914,13 @@
855
  "_view_name": "HTMLView",
856
  "description": "",
857
  "description_tooltip": null,
858
- "layout": "IPY_MODEL_1d78d8024aa049e99acafcb55a229a6b",
859
  "placeholder": "​",
860
- "style": "IPY_MODEL_8c9cd46c635f43d9aa7014fe2caf66d9",
861
  "value": "Parsing nodes: 100%"
862
  }
863
  },
864
- "0465399af85c4bfa8ee6ac541833ad0e": {
865
  "model_module": "@jupyter-widgets/controls",
866
  "model_name": "FloatProgressModel",
867
  "model_module_version": "1.5.0",
@@ -877,15 +936,15 @@
877
  "bar_style": "success",
878
  "description": "",
879
  "description_tooltip": null,
880
- "layout": "IPY_MODEL_cd1d4f99e3e441af8a905ed8337c61e2",
881
  "max": 14,
882
  "min": 0,
883
  "orientation": "horizontal",
884
- "style": "IPY_MODEL_334a92afaf284b09b873f70f632198ce",
885
  "value": 14
886
  }
887
  },
888
- "e7dd26ddf6434335bf3dd8d9ad3a1dfb": {
889
  "model_module": "@jupyter-widgets/controls",
890
  "model_name": "HTMLModel",
891
  "model_module_version": "1.5.0",
@@ -900,13 +959,13 @@
900
  "_view_name": "HTMLView",
901
  "description": "",
902
  "description_tooltip": null,
903
- "layout": "IPY_MODEL_dca0b364c2f14bcf8c4f53ca8ac36d70",
904
  "placeholder": "​",
905
- "style": "IPY_MODEL_427b40bae46143e5ba8a79bef1510216",
906
- "value": " 14/14 [00:00<00:00, 32.13it/s]"
907
  }
908
  },
909
- "eda4aaa92b6542d5877628e00c9f86b9": {
910
  "model_module": "@jupyter-widgets/base",
911
  "model_name": "LayoutModel",
912
  "model_module_version": "1.2.0",
@@ -958,7 +1017,7 @@
958
  "width": null
959
  }
960
  },
961
- "1d78d8024aa049e99acafcb55a229a6b": {
962
  "model_module": "@jupyter-widgets/base",
963
  "model_name": "LayoutModel",
964
  "model_module_version": "1.2.0",
@@ -1010,7 +1069,7 @@
1010
  "width": null
1011
  }
1012
  },
1013
- "8c9cd46c635f43d9aa7014fe2caf66d9": {
1014
  "model_module": "@jupyter-widgets/controls",
1015
  "model_name": "DescriptionStyleModel",
1016
  "model_module_version": "1.5.0",
@@ -1025,7 +1084,7 @@
1025
  "description_width": ""
1026
  }
1027
  },
1028
- "cd1d4f99e3e441af8a905ed8337c61e2": {
1029
  "model_module": "@jupyter-widgets/base",
1030
  "model_name": "LayoutModel",
1031
  "model_module_version": "1.2.0",
@@ -1077,7 +1136,7 @@
1077
  "width": null
1078
  }
1079
  },
1080
- "334a92afaf284b09b873f70f632198ce": {
1081
  "model_module": "@jupyter-widgets/controls",
1082
  "model_name": "ProgressStyleModel",
1083
  "model_module_version": "1.5.0",
@@ -1093,7 +1152,7 @@
1093
  "description_width": ""
1094
  }
1095
  },
1096
- "dca0b364c2f14bcf8c4f53ca8ac36d70": {
1097
  "model_module": "@jupyter-widgets/base",
1098
  "model_name": "LayoutModel",
1099
  "model_module_version": "1.2.0",
@@ -1145,7 +1204,7 @@
1145
  "width": null
1146
  }
1147
  },
1148
- "427b40bae46143e5ba8a79bef1510216": {
1149
  "model_module": "@jupyter-widgets/controls",
1150
  "model_name": "DescriptionStyleModel",
1151
  "model_module_version": "1.5.0",
@@ -1160,7 +1219,7 @@
1160
  "description_width": ""
1161
  }
1162
  },
1163
- "767d542c637e4fcb9812bf2a641d7667": {
1164
  "model_module": "@jupyter-widgets/controls",
1165
  "model_name": "HBoxModel",
1166
  "model_module_version": "1.5.0",
@@ -1175,14 +1234,14 @@
1175
  "_view_name": "HBoxView",
1176
  "box_style": "",
1177
  "children": [
1178
- "IPY_MODEL_6f3642aa394449a8946b2c1fe3de03e8",
1179
- "IPY_MODEL_6794ed529b9a49d8bd828b8ee942bc5c",
1180
- "IPY_MODEL_01df7b933c8f43e2a9135c56f471ebfe"
1181
  ],
1182
- "layout": "IPY_MODEL_11a9b1b3c9964d04968d7e67a1fbc5af"
1183
  }
1184
  },
1185
- "6f3642aa394449a8946b2c1fe3de03e8": {
1186
  "model_module": "@jupyter-widgets/controls",
1187
  "model_name": "HTMLModel",
1188
  "model_module_version": "1.5.0",
@@ -1197,13 +1256,13 @@
1197
  "_view_name": "HTMLView",
1198
  "description": "",
1199
  "description_tooltip": null,
1200
- "layout": "IPY_MODEL_f55eeedeb2fa4716a1bec1f4b1392230",
1201
  "placeholder": "​",
1202
- "style": "IPY_MODEL_b1704fd5ed8044e79c752de8d076e4a8",
1203
  "value": "Generating embeddings: 100%"
1204
  }
1205
  },
1206
- "6794ed529b9a49d8bd828b8ee942bc5c": {
1207
  "model_module": "@jupyter-widgets/controls",
1208
  "model_name": "FloatProgressModel",
1209
  "model_module_version": "1.5.0",
@@ -1219,15 +1278,15 @@
1219
  "bar_style": "success",
1220
  "description": "",
1221
  "description_tooltip": null,
1222
- "layout": "IPY_MODEL_12862a5bac05411c93700050e99f379f",
1223
  "max": 108,
1224
  "min": 0,
1225
  "orientation": "horizontal",
1226
- "style": "IPY_MODEL_9a4c8a453357486286343cf5c817dc36",
1227
  "value": 108
1228
  }
1229
  },
1230
- "01df7b933c8f43e2a9135c56f471ebfe": {
1231
  "model_module": "@jupyter-widgets/controls",
1232
  "model_name": "HTMLModel",
1233
  "model_module_version": "1.5.0",
@@ -1242,13 +1301,13 @@
1242
  "_view_name": "HTMLView",
1243
  "description": "",
1244
  "description_tooltip": null,
1245
- "layout": "IPY_MODEL_92be71ee85654aa8aaf57a385224ea2c",
1246
  "placeholder": "​",
1247
- "style": "IPY_MODEL_b528382dfa984f24a8ea7d762e427c8c",
1248
- "value": " 108/108 [00:01<00:00, 92.16it/s]"
1249
  }
1250
  },
1251
- "11a9b1b3c9964d04968d7e67a1fbc5af": {
1252
  "model_module": "@jupyter-widgets/base",
1253
  "model_name": "LayoutModel",
1254
  "model_module_version": "1.2.0",
@@ -1300,7 +1359,7 @@
1300
  "width": null
1301
  }
1302
  },
1303
- "f55eeedeb2fa4716a1bec1f4b1392230": {
1304
  "model_module": "@jupyter-widgets/base",
1305
  "model_name": "LayoutModel",
1306
  "model_module_version": "1.2.0",
@@ -1352,7 +1411,7 @@
1352
  "width": null
1353
  }
1354
  },
1355
- "b1704fd5ed8044e79c752de8d076e4a8": {
1356
  "model_module": "@jupyter-widgets/controls",
1357
  "model_name": "DescriptionStyleModel",
1358
  "model_module_version": "1.5.0",
@@ -1367,7 +1426,7 @@
1367
  "description_width": ""
1368
  }
1369
  },
1370
- "12862a5bac05411c93700050e99f379f": {
1371
  "model_module": "@jupyter-widgets/base",
1372
  "model_name": "LayoutModel",
1373
  "model_module_version": "1.2.0",
@@ -1419,7 +1478,7 @@
1419
  "width": null
1420
  }
1421
  },
1422
- "9a4c8a453357486286343cf5c817dc36": {
1423
  "model_module": "@jupyter-widgets/controls",
1424
  "model_name": "ProgressStyleModel",
1425
  "model_module_version": "1.5.0",
@@ -1435,7 +1494,7 @@
1435
  "description_width": ""
1436
  }
1437
  },
1438
- "92be71ee85654aa8aaf57a385224ea2c": {
1439
  "model_module": "@jupyter-widgets/base",
1440
  "model_name": "LayoutModel",
1441
  "model_module_version": "1.2.0",
@@ -1487,7 +1546,7 @@
1487
  "width": null
1488
  }
1489
  },
1490
- "b528382dfa984f24a8ea7d762e427c8c": {
1491
  "model_module": "@jupyter-widgets/controls",
1492
  "model_name": "DescriptionStyleModel",
1493
  "model_module_version": "1.5.0",
 
21
  },
22
  {
23
  "cell_type": "code",
24
+ "execution_count": 1,
25
  "metadata": {
26
+ "id": "QPJzr-I9XQ7l",
27
+ "outputId": "71591538-a161-4a0a-e2c4-057bd2de6941",
28
+ "colab": {
29
+ "base_uri": "https://localhost:8080/"
30
+ }
31
  },
32
+ "outputs": [
33
+ {
34
+ "output_type": "stream",
35
+ "name": "stdout",
36
+ "text": [
37
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m320.6/320.6 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
38
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
39
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m526.8/526.8 kB\u001b[0m \u001b[31m12.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
40
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.4/15.4 MB\u001b[0m \u001b[31m28.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
41
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
42
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
43
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.4/2.4 MB\u001b[0m \u001b[31m46.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
44
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.0/92.0 kB\u001b[0m \u001b[31m5.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
45
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.4/62.4 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
46
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.3/41.3 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
47
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.8/6.8 MB\u001b[0m \u001b[31m52.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
48
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.9/59.9 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
49
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.0/107.0 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
50
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.3/67.3 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
51
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
52
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
53
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
54
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m283.7/283.7 kB\u001b[0m \u001b[31m19.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
55
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m64.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
56
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━���━━━\u001b[0m \u001b[32m67.6/67.6 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
57
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m145.0/145.0 kB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
58
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
59
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.6/53.6 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
60
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
61
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
62
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.8/130.8 kB\u001b[0m \u001b[31m13.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
63
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m141.9/141.9 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
64
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m290.4/290.4 kB\u001b[0m \u001b[31m24.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
65
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m4.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
66
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.5/52.5 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
67
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.5/130.5 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
68
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m26.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
69
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m55.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
70
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m42.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
71
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
72
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m20.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
73
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
74
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.2/49.2 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
75
+ "\u001b[?25h Building wheel for pypika (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
76
+ ]
77
+ }
78
+ ],
79
  "source": [
80
  "!pip install -q llama-index==0.10.37 openai==1.30.1 tiktoken==0.7.0 chromadb==0.5.0 llama-index-vector-stores-chroma==0.1.7"
81
  ]
 
91
  "import os\n",
92
  "\n",
93
  "# Set the \"OPENAI_API_KEY\" in the Python environment. Will be used by OpenAI client later.\n",
94
+ "os.environ[\"OPENAI_API_KEY\"] = \"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\""
95
  ]
96
  },
97
  {
 
136
  },
137
  {
138
  "cell_type": "code",
139
+ "execution_count": 5,
140
  "metadata": {
141
  "id": "zAaGcYMJzHAN"
142
  },
 
177
  },
178
  {
179
  "cell_type": "code",
180
+ "execution_count": 6,
181
  "metadata": {
182
  "colab": {
183
  "base_uri": "https://localhost:8080/"
184
  },
185
  "id": "fQtpDvUzKNzI",
186
+ "outputId": "833814c6-f3f7-4812-d030-6e9d10b86566"
187
  },
188
  "outputs": [
189
  {
190
  "output_type": "stream",
191
  "name": "stdout",
192
  "text": [
193
+ "--2024-06-26 15:43:09-- https://raw.githubusercontent.com/AlaFalaki/tutorial_notebooks/main/data/mini-llama-articles.csv\n",
194
+ "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n",
195
  "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
196
  "HTTP request sent, awaiting response... 200 OK\n",
197
  "Length: 173646 (170K) [text/plain]\n",
 
199
  "\n",
200
  "mini-llama-articles 100%[===================>] 169.58K --.-KB/s in 0.03s \n",
201
  "\n",
202
+ "2024-06-26 15:43:09 (4.78 MB/s) - ‘mini-llama-articles.csv’ saved [173646/173646]\n",
203
  "\n"
204
  ]
205
  }
 
219
  },
220
  {
221
  "cell_type": "code",
222
+ "execution_count": 7,
223
  "metadata": {
224
  "colab": {
225
  "base_uri": "https://localhost:8080/"
226
  },
227
  "id": "_WER5lt0N7c5",
228
+ "outputId": "17dbc7d6-9750-4748-93b6-e21c2ec90ce1"
229
  },
230
  "outputs": [
231
  {
 
236
  ]
237
  },
238
  "metadata": {},
239
+ "execution_count": 7
240
  }
241
  ],
242
  "source": [
 
269
  },
270
  {
271
  "cell_type": "code",
272
+ "execution_count": 8,
273
  "metadata": {
274
  "id": "lFvW_886dxKX"
275
  },
 
292
  },
293
  {
294
  "cell_type": "code",
295
+ "execution_count": null,
296
  "metadata": {
297
  "colab": {
298
  "base_uri": "https://localhost:8080/"
 
328
  },
329
  {
330
  "cell_type": "code",
331
+ "execution_count": 9,
332
  "metadata": {
333
  "id": "STACTMUR1z9N"
334
  },
 
351
  },
352
  {
353
  "cell_type": "code",
354
+ "execution_count": 10,
355
  "metadata": {
356
  "colab": {
357
  "base_uri": "https://localhost:8080/",
358
  "height": 81,
359
  "referenced_widgets": [
360
+ "28c1cd3da3e94be4865255c868033798",
361
+ "580a479c2ae34923a59b2b9afd0ea8c9",
362
+ "32dc9fae0d6441cf906d9e45de311f60",
363
+ "8d71e6ced1e349ec88e9ad2feb312065",
364
+ "3c7b98951d114e2595ca7f6c6f464687",
365
+ "1b5e20be590b45c7bb5ddc90276ae493",
366
+ "7d481cc7244448d3953a6c37aee6ed62",
367
+ "2d3b076f01a84775b8944f8944d35c63",
368
+ "ce543bc180524b7e860860b3d0a204f2",
369
+ "9e1b63ba68354443a26a946c3099303c",
370
+ "2ec6143869d14484be1935294ddd3fc0",
371
+ "2b7d77e17cd647759f904291e5840507",
372
+ "fc469c78a6384be59f89ca9d039d3c25",
373
+ "ba569b44a8e74a948fa760f52cc4a5c8",
374
+ "8cfd1d9c93b24ead898b98dd5325377c",
375
+ "afa1f77f0fe140139a01702d5296f9e8",
376
+ "938dc498e428402db86667cddeb2cf07",
377
+ "0ec063511dcb4ebf80908497a6ac7b95",
378
+ "c119965f5f354bfba8e6ecdca2dd1138",
379
+ "425b798a2f9444578d81e991779e3b2d",
380
+ "b27784dfa6144372bcc222cf59e9aa05",
381
+ "37e7cb84cedd4644a0df421dff825faf"
382
  ]
383
  },
384
  "id": "CtdsIUQ81_hT",
385
+ "outputId": "c30bf148-3b0f-4f90-f49c-e97294e81f3f"
386
  },
387
  "outputs": [
388
  {
 
394
  "application/vnd.jupyter.widget-view+json": {
395
  "version_major": 2,
396
  "version_minor": 0,
397
+ "model_id": "28c1cd3da3e94be4865255c868033798"
398
  }
399
  },
400
  "metadata": {}
 
408
  "application/vnd.jupyter.widget-view+json": {
409
  "version_major": 2,
410
  "version_minor": 0,
411
+ "model_id": "2b7d77e17cd647759f904291e5840507"
412
  }
413
  },
414
  "metadata": {}
 
431
  },
432
  {
433
  "cell_type": "code",
434
+ "execution_count": null,
435
  "metadata": {
436
  "collapsed": true,
437
  "colab": {
 
467
  },
468
  {
469
  "cell_type": "code",
470
+ "execution_count": 11,
471
  "metadata": {
472
  "id": "HbT3-kRO4Qpt"
473
  },
 
481
  },
482
  {
483
  "cell_type": "code",
484
+ "execution_count": 12,
485
  "metadata": {
486
  "id": "sb61DWU84bHP"
487
  },
 
492
  },
493
  {
494
  "cell_type": "code",
495
+ "execution_count": 13,
496
  "metadata": {
497
  "id": "G32W2LMMCmnv"
498
  },
 
503
  },
504
  {
505
  "cell_type": "code",
506
+ "execution_count": null,
507
  "metadata": {
508
  "colab": {
509
  "base_uri": "https://localhost:8080/",
 
533
  },
534
  {
535
  "cell_type": "code",
536
+ "execution_count": null,
537
  "metadata": {
538
  "colab": {
539
  "base_uri": "https://localhost:8080/"
 
616
  },
617
  {
618
  "cell_type": "code",
619
+ "execution_count": null,
620
  "metadata": {
621
  "colab": {
622
  "base_uri": "https://localhost:8080/"
 
649
  },
650
  {
651
  "cell_type": "code",
652
+ "execution_count": 14,
653
  "metadata": {
654
  "id": "mNDd5i921Hww"
655
  },
 
684
  },
685
  {
686
  "cell_type": "code",
687
+ "execution_count": null,
688
  "metadata": {
689
  "id": "eARSzx8I1Hww"
690
  },
 
714
  },
715
  {
716
  "cell_type": "code",
717
+ "execution_count": null,
718
  "metadata": {
719
  "colab": {
720
  "base_uri": "https://localhost:8080/"
 
777
  },
778
  {
779
  "cell_type": "code",
780
+ "execution_count": 16,
781
  "metadata": {
782
  "colab": {
783
  "base_uri": "https://localhost:8080/"
784
  },
785
  "id": "ckjE4fcD1Hwx",
786
+ "outputId": "1123434a-180c-48a3-ec0a-f52aa4325026"
787
  },
788
  "outputs": [
789
  {
 
792
  "text": [
793
  "top_2 faithfulness_score: 1.0\n",
794
  "top_2 relevancy_score: 1.0\n",
795
+ "top_2 correctness: 0.75\n",
796
  "top_4 faithfulness_score: 1.0\n",
797
  "top_4 relevancy_score: 1.0\n",
798
+ "top_4 correctness: 0.85\n",
799
  "top_6 faithfulness_score: 1.0\n",
800
  "top_6 relevancy_score: 1.0\n",
801
+ "top_6 correctness: 0.8\n",
802
  "top_8 faithfulness_score: 1.0\n",
803
  "top_8 relevancy_score: 1.0\n",
804
+ "top_8 correctness: 0.85\n",
805
+ "top_10 faithfulness_score: 1.0\n",
806
+ "top_10 relevancy_score: 1.0\n",
807
+ "top_10 correctness: 0.8\n"
808
  ]
809
  }
810
  ],
811
  "source": [
812
+ "from llama_index.core.evaluation import RelevancyEvaluator, FaithfulnessEvaluator, CorrectnessEvaluator, BatchEvalRunner\n",
813
  "from llama_index.llms.openai import OpenAI\n",
814
  "\n",
815
  "llm_gpt4 = OpenAI(temperature=0, model=\"gpt-4o\")\n",
816
  "\n",
817
  "faithfulness_evaluator = FaithfulnessEvaluator(llm=llm_gpt4)\n",
818
  "relevancy_evaluator = RelevancyEvaluator(llm=llm_gpt4)\n",
819
+ "correctness_evaluator = CorrectnessEvaluator(llm=llm_gpt4)\n",
820
  "\n",
821
  "# Run evaluation\n",
822
  "queries = list(rag_eval_dataset.queries.values())\n",
823
  "batch_eval_queries = queries[:20]\n",
824
  "\n",
825
  "runner = BatchEvalRunner(\n",
826
+ "{\"faithfulness\": faithfulness_evaluator, \"relevancy\": relevancy_evaluator, \"correctness\": correctness_evaluator},\n",
827
  "workers=32,\n",
828
  ")\n",
829
  "\n",
 
838
  " print(f\"top_{i} faithfulness_score: {faithfulness_score}\")\n",
839
  "\n",
840
  " relevancy_score = sum(result.passing for result in eval_results['relevancy']) / len(eval_results['relevancy'])\n",
841
+ " print(f\"top_{i} relevancy_score: {relevancy_score}\")\n",
842
+ "\n",
843
+ " correctness = sum(result.passing for result in eval_results['correctness']) / len(eval_results['correctness'])\n",
844
+ " print(f\"top_{i} correctness: {correctness}\")\n"
845
  ]
846
  },
847
  {
 
877
  },
878
  "widgets": {
879
  "application/vnd.jupyter.widget-state+json": {
880
+ "28c1cd3da3e94be4865255c868033798": {
881
  "model_module": "@jupyter-widgets/controls",
882
  "model_name": "HBoxModel",
883
  "model_module_version": "1.5.0",
 
892
  "_view_name": "HBoxView",
893
  "box_style": "",
894
  "children": [
895
+ "IPY_MODEL_580a479c2ae34923a59b2b9afd0ea8c9",
896
+ "IPY_MODEL_32dc9fae0d6441cf906d9e45de311f60",
897
+ "IPY_MODEL_8d71e6ced1e349ec88e9ad2feb312065"
898
  ],
899
+ "layout": "IPY_MODEL_3c7b98951d114e2595ca7f6c6f464687"
900
  }
901
  },
902
+ "580a479c2ae34923a59b2b9afd0ea8c9": {
903
  "model_module": "@jupyter-widgets/controls",
904
  "model_name": "HTMLModel",
905
  "model_module_version": "1.5.0",
 
914
  "_view_name": "HTMLView",
915
  "description": "",
916
  "description_tooltip": null,
917
+ "layout": "IPY_MODEL_1b5e20be590b45c7bb5ddc90276ae493",
918
  "placeholder": "​",
919
+ "style": "IPY_MODEL_7d481cc7244448d3953a6c37aee6ed62",
920
  "value": "Parsing nodes: 100%"
921
  }
922
  },
923
+ "32dc9fae0d6441cf906d9e45de311f60": {
924
  "model_module": "@jupyter-widgets/controls",
925
  "model_name": "FloatProgressModel",
926
  "model_module_version": "1.5.0",
 
936
  "bar_style": "success",
937
  "description": "",
938
  "description_tooltip": null,
939
+ "layout": "IPY_MODEL_2d3b076f01a84775b8944f8944d35c63",
940
  "max": 14,
941
  "min": 0,
942
  "orientation": "horizontal",
943
+ "style": "IPY_MODEL_ce543bc180524b7e860860b3d0a204f2",
944
  "value": 14
945
  }
946
  },
947
+ "8d71e6ced1e349ec88e9ad2feb312065": {
948
  "model_module": "@jupyter-widgets/controls",
949
  "model_name": "HTMLModel",
950
  "model_module_version": "1.5.0",
 
959
  "_view_name": "HTMLView",
960
  "description": "",
961
  "description_tooltip": null,
962
+ "layout": "IPY_MODEL_9e1b63ba68354443a26a946c3099303c",
963
  "placeholder": "​",
964
+ "style": "IPY_MODEL_2ec6143869d14484be1935294ddd3fc0",
965
+ "value": " 14/14 [00:00<00:00, 12.73it/s]"
966
  }
967
  },
968
+ "3c7b98951d114e2595ca7f6c6f464687": {
969
  "model_module": "@jupyter-widgets/base",
970
  "model_name": "LayoutModel",
971
  "model_module_version": "1.2.0",
 
1017
  "width": null
1018
  }
1019
  },
1020
+ "1b5e20be590b45c7bb5ddc90276ae493": {
1021
  "model_module": "@jupyter-widgets/base",
1022
  "model_name": "LayoutModel",
1023
  "model_module_version": "1.2.0",
 
1069
  "width": null
1070
  }
1071
  },
1072
+ "7d481cc7244448d3953a6c37aee6ed62": {
1073
  "model_module": "@jupyter-widgets/controls",
1074
  "model_name": "DescriptionStyleModel",
1075
  "model_module_version": "1.5.0",
 
1084
  "description_width": ""
1085
  }
1086
  },
1087
+ "2d3b076f01a84775b8944f8944d35c63": {
1088
  "model_module": "@jupyter-widgets/base",
1089
  "model_name": "LayoutModel",
1090
  "model_module_version": "1.2.0",
 
1136
  "width": null
1137
  }
1138
  },
1139
+ "ce543bc180524b7e860860b3d0a204f2": {
1140
  "model_module": "@jupyter-widgets/controls",
1141
  "model_name": "ProgressStyleModel",
1142
  "model_module_version": "1.5.0",
 
1152
  "description_width": ""
1153
  }
1154
  },
1155
+ "9e1b63ba68354443a26a946c3099303c": {
1156
  "model_module": "@jupyter-widgets/base",
1157
  "model_name": "LayoutModel",
1158
  "model_module_version": "1.2.0",
 
1204
  "width": null
1205
  }
1206
  },
1207
+ "2ec6143869d14484be1935294ddd3fc0": {
1208
  "model_module": "@jupyter-widgets/controls",
1209
  "model_name": "DescriptionStyleModel",
1210
  "model_module_version": "1.5.0",
 
1219
  "description_width": ""
1220
  }
1221
  },
1222
+ "2b7d77e17cd647759f904291e5840507": {
1223
  "model_module": "@jupyter-widgets/controls",
1224
  "model_name": "HBoxModel",
1225
  "model_module_version": "1.5.0",
 
1234
  "_view_name": "HBoxView",
1235
  "box_style": "",
1236
  "children": [
1237
+ "IPY_MODEL_fc469c78a6384be59f89ca9d039d3c25",
1238
+ "IPY_MODEL_ba569b44a8e74a948fa760f52cc4a5c8",
1239
+ "IPY_MODEL_8cfd1d9c93b24ead898b98dd5325377c"
1240
  ],
1241
+ "layout": "IPY_MODEL_afa1f77f0fe140139a01702d5296f9e8"
1242
  }
1243
  },
1244
+ "fc469c78a6384be59f89ca9d039d3c25": {
1245
  "model_module": "@jupyter-widgets/controls",
1246
  "model_name": "HTMLModel",
1247
  "model_module_version": "1.5.0",
 
1256
  "_view_name": "HTMLView",
1257
  "description": "",
1258
  "description_tooltip": null,
1259
+ "layout": "IPY_MODEL_938dc498e428402db86667cddeb2cf07",
1260
  "placeholder": "​",
1261
+ "style": "IPY_MODEL_0ec063511dcb4ebf80908497a6ac7b95",
1262
  "value": "Generating embeddings: 100%"
1263
  }
1264
  },
1265
+ "ba569b44a8e74a948fa760f52cc4a5c8": {
1266
  "model_module": "@jupyter-widgets/controls",
1267
  "model_name": "FloatProgressModel",
1268
  "model_module_version": "1.5.0",
 
1278
  "bar_style": "success",
1279
  "description": "",
1280
  "description_tooltip": null,
1281
+ "layout": "IPY_MODEL_c119965f5f354bfba8e6ecdca2dd1138",
1282
  "max": 108,
1283
  "min": 0,
1284
  "orientation": "horizontal",
1285
+ "style": "IPY_MODEL_425b798a2f9444578d81e991779e3b2d",
1286
  "value": 108
1287
  }
1288
  },
1289
+ "8cfd1d9c93b24ead898b98dd5325377c": {
1290
  "model_module": "@jupyter-widgets/controls",
1291
  "model_name": "HTMLModel",
1292
  "model_module_version": "1.5.0",
 
1301
  "_view_name": "HTMLView",
1302
  "description": "",
1303
  "description_tooltip": null,
1304
+ "layout": "IPY_MODEL_b27784dfa6144372bcc222cf59e9aa05",
1305
  "placeholder": "​",
1306
+ "style": "IPY_MODEL_37e7cb84cedd4644a0df421dff825faf",
1307
+ "value": " 108/108 [00:03<00:00, 33.40it/s]"
1308
  }
1309
  },
1310
+ "afa1f77f0fe140139a01702d5296f9e8": {
1311
  "model_module": "@jupyter-widgets/base",
1312
  "model_name": "LayoutModel",
1313
  "model_module_version": "1.2.0",
 
1359
  "width": null
1360
  }
1361
  },
1362
+ "938dc498e428402db86667cddeb2cf07": {
1363
  "model_module": "@jupyter-widgets/base",
1364
  "model_name": "LayoutModel",
1365
  "model_module_version": "1.2.0",
 
1411
  "width": null
1412
  }
1413
  },
1414
+ "0ec063511dcb4ebf80908497a6ac7b95": {
1415
  "model_module": "@jupyter-widgets/controls",
1416
  "model_name": "DescriptionStyleModel",
1417
  "model_module_version": "1.5.0",
 
1426
  "description_width": ""
1427
  }
1428
  },
1429
+ "c119965f5f354bfba8e6ecdca2dd1138": {
1430
  "model_module": "@jupyter-widgets/base",
1431
  "model_name": "LayoutModel",
1432
  "model_module_version": "1.2.0",
 
1478
  "width": null
1479
  }
1480
  },
1481
+ "425b798a2f9444578d81e991779e3b2d": {
1482
  "model_module": "@jupyter-widgets/controls",
1483
  "model_name": "ProgressStyleModel",
1484
  "model_module_version": "1.5.0",
 
1494
  "description_width": ""
1495
  }
1496
  },
1497
+ "b27784dfa6144372bcc222cf59e9aa05": {
1498
  "model_module": "@jupyter-widgets/base",
1499
  "model_name": "LayoutModel",
1500
  "model_module_version": "1.2.0",
 
1546
  "width": null
1547
  }
1548
  },
1549
+ "37e7cb84cedd4644a0df421dff825faf": {
1550
  "model_module": "@jupyter-widgets/controls",
1551
  "model_name": "DescriptionStyleModel",
1552
  "model_module_version": "1.5.0",