File size: 220,993 Bytes
481f3b1
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
088e816
 
 
 
 
 
 
 
481f3b1
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
088e816
 
 
481f3b1
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
088e816
481f3b1
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
088e816
481f3b1
088e816
 
 
 
 
 
481f3b1
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
088e816
 
 
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
088e816
481f3b1
 
 
 
088e816
 
 
481f3b1
 
088e816
 
481f3b1
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
088e816
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
 
 
088e816
481f3b1
 
 
 
 
 
 
088e816
 
 
481f3b1
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
088e816
 
481f3b1
 
 
 
088e816
481f3b1
 
088e816
481f3b1
 
 
 
088e816
 
481f3b1
 
 
 
 
088e816
 
481f3b1
088e816
 
481f3b1
 
 
 
088e816
 
481f3b1
 
 
 
 
 
 
 
 
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
088e816
 
 
481f3b1
 
 
 
088e816
 
481f3b1
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
 
088e816
481f3b1
 
 
 
088e816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481f3b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
088e816
481f3b1
 
 
 
 
 
 
 
 
 
 
088e816
481f3b1
 
 
 
 
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
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "07f255d7",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd \n",
    "import numpy as np\n",
    "import os\n",
    "\n",
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "\n",
    "import sys\n",
    "sys.path.append(\"C:/git/climate-question-answering\")\n",
    "sys.path.append(\"/mnt/c/git/climate-question-answering\")\n",
    "\n",
    "from dotenv import load_dotenv\n",
    "load_dotenv()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4c9258cc-3800-4485-bdd8-889b299b9133",
   "metadata": {},
   "source": [
    "# Import objects"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6af1a96e",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from climateqa.engine.llm import get_llm\n",
    "llm = get_llm(provider=\"openai\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "a9128bfc-4b24-4b25-b7a7-68423b1124b1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Auto-updated model_name to rerank-english-v3.0 for API provider cohere\n",
      "Loading APIRanker model rerank-english-v3.0\n"
     ]
    }
   ],
   "source": [
    "from climateqa.engine.reranker import get_reranker\n",
    "\n",
    "reranker = get_reranker(\"large\")\n",
    "# from rerankers import Reranker\n",
    "# # Specific flashrank model.\n",
    "# # reranker = Reranker('ms-marco-TinyBERT-L-2-v2', model_type='flashrank')\n",
    "# # reranker = Reranker('ms-marco-MiniLM-L-12-v2', model_type='flashrank')\n",
    "# # reranker = Reranker('cross-encoder/ms-marco-MiniLM-L-4-v2', model_type='cross-encoder')\n",
    "# # reranker = Reranker(\"mixedbread-ai/mxbai-rerank-xsmall-v1\", model_type='cross-encoder')\n",
    "# # reranker = Reranker(\"mixedbread-ai/mxbai-rerank-xsmall-v1\", model_type='cross-encoder')\n",
    "# reranker = Reranker(\"cohere\", lang='en', api_key = \"XXX\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "942d2705-22dd-46cf-8c31-6daa127e4743",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: BAAI/bge-base-en-v1.5\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading embeddings model:  BAAI/bge-base-en-v1.5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:sentence_transformers.SentenceTransformer:Use pytorch device_name: cuda\n"
     ]
    }
   ],
   "source": [
    "from climateqa.engine.vectorstore import get_pinecone_vectorstore\n",
    "from climateqa.engine.embeddings import get_embeddings_function\n",
    "from climateqa.engine.retriever import ClimateQARetriever\n",
    "\n",
    "embeddings_function = get_embeddings_function()\n",
    "vectorstore = get_pinecone_vectorstore(embeddings_function)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "882811c8-5890-4048-8630-d052c5179d7d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "51aed81d-860b-409a-bae0-f0e1eeb0f120",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "torch.cuda.is_available()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "16eb91cb-3bfb-4c0c-b29e-753c954c2399",
   "metadata": {
    "jp-MarkdownHeadingCollapsed": true
   },
   "source": [
    "# Semantic Routing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "1e769371-1f8c-4f34-89c5-c0f9914d47a0",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from climateqa.engine.chains.intent_routing import make_intent_router_chain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "480ad611-33c7-49ea-b02c-94d6ce1f1d1a",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "router_chain = make_intent_router_chain(llm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "82cf49d9-d48e-4d5c-8666-bcc95f637371",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# for question in SAMPLE_QUESTIONS:\n",
    "#     output = router_chain.invoke({\"input\":question})\n",
    "#     print(question)\n",
    "#     print(output)\n",
    "#     print(\"-\"*100)\n",
    "#     break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "d8ef7e0f-ac5f-4323-b02e-753ce2b4afda",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'intent': 'search'}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "router_chain.invoke({\"input\":\"Which industries have the highest GHG emissions?\"})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6f50f767-64e9-4f5d-82b4-496530532ad9",
   "metadata": {
    "jp-MarkdownHeadingCollapsed": true
   },
   "source": [
    "# Query Rewriter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "3345a24e-e794-4e84-93ae-98be5ca61af3",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from climateqa.engine.chains.query_transformation import make_query_rewriter_chain,make_query_decomposition_chain\n",
    "from climateqa.engine.chains.translation import make_translation_chain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "16bd17cd-f9ea-489c-923f-acd851b09cd8",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "rewriter_chain = make_query_rewriter_chain(llm)\n",
    "translation_chain = make_translation_chain(llm)\n",
    "decomposition_chain = make_query_decomposition_chain(llm)\n",
    "router_chain = make_intent_router_chain(llm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "3a2147fc-8437-44a3-87ae-52fe5b8f8f87",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "def transform_query(user_input):\n",
    "    \n",
    "    state = {\"user_input\":user_input}\n",
    "    \n",
    "    # Route\n",
    "    output_router = router_chain.invoke({\"input\":user_input})\n",
    "    if \"language\" not in output_router: output_router[\"language\"] = \"English\"\n",
    "    state.update(output_router)\n",
    "    \n",
    "    # Translation\n",
    "    if output_router[\"language\"].lower() != \"english\":\n",
    "        translation = translation_chain.invoke({\"input\":user_input})\n",
    "        state[\"query\"] = translation[\"translation\"]\n",
    "    else:\n",
    "        state[\"query\"] = user_input\n",
    "        \n",
    "    # Decomposition\n",
    "    decomposition_output = decomposition_chain.invoke({\"input\":state[\"query\"]})\n",
    "    state.update(decomposition_output)\n",
    "    \n",
    "    # Query Analysis\n",
    "    questions = []\n",
    "    for question in state[\"questions\"]:\n",
    "        question_state = {\"question\":question}\n",
    "        analysis_output = rewriter_chain.invoke({\"input\":question})\n",
    "        question_state.update(analysis_output)\n",
    "        questions.append(question_state)\n",
    "    state[\"questions\"] = questions\n",
    "    \n",
    "    return state"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "4151d2e4-0bfe-4642-a185-2dcb639e6f78",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'user_input': 'What does Morrison argue about IK and LK on internal migration ?',\n",
       " 'intent': 'search',\n",
       " 'language': 'English',\n",
       " 'query': 'What does Morrison argue about IK and LK on internal migration ?',\n",
       " 'questions': [{'question': 'What does Morrison argue about internal migration?',\n",
       "   'sources': ['OpenAlex']},\n",
       "  {'question': 'What does Morrison argue about interregional migration?',\n",
       "   'sources': ['OpenAlex']},\n",
       "  {'question': 'What does Morrison argue about intraregional migration?',\n",
       "   'sources': ['OpenAlex']}]}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# question = \"Franchement je sais pas trop de quoi on parle là, qui sont les membres du GIEC en fait ? Et quelles sont leurs dernières publications ?\"\n",
    "question = \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\"\n",
    "question = \"I need to search the president of the United States, find their age, then find how old they will be in June 2023.\"\n",
    "question = \"What does Morrison argue about IK and LK on internal migration ?\"\n",
    "state = transform_query(question)\n",
    "state"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "a322f737-191d-407f-b499-2b79476fac8b",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Super thanks, Which industries have the highest GHG emissions?'"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "questions = [\n",
    "    \"Super thanks, Which industries have the highest GHG emissions?\",\n",
    "    \"How do you compare the view on biodiversity between the IPCC and IPBES ?\",\n",
    "    \"Est-ce que l'IA a un impact sur l'environnement ?\",\n",
    "    \"Que dit le GIEC sur l'impact de l'IA\",\n",
    "    \"Franchement je sais pas trop de quoi on parle là, qui sont les membres du GIEC en fait ? Et quelles sont leurs dernières publications ?\",\n",
    "    \"Ok that's nice, but I don't really understand. What is the impact of El Nino ?\",\n",
    "    \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\",\n",
    "    \"Which industries have the highest GHG emissions?\",\n",
    "    \"What are invasive alien species and how do they threaten biodiversity and ecosystems?\",\n",
    "    \"Are human activities causing global warming?\",\n",
    "    \"What is the motivation behind mining the deep seabed?\",\n",
    "    \"Tu peux m'écrire un poème sur le changement climatique ?\",\n",
    "    \"Tu peux m'écrire un poème sur les bonbons ?\",\n",
    "    \"What will be the temperature in 2100 in Strasbourg?\",\n",
    "    \"C'est quoi le lien entre biodiversity and changement climatique ?\",\n",
    "    \"Can you tell me more about ESRS2 ?\"\n",
    "]\n",
    "\n",
    "question = questions[0]\n",
    "question"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "fcee82a3-342d-4da1-8c27-a6f6079da4a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sources': ['IPCC']}"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "question = \"Very nice thank you, What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\"\n",
    "output = rewriter_chain.invoke({\"input\":question})\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "d13d6a1a-9fa5-4e47-861e-30a79ea97d05",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Super thanks, Which industries have the highest GHG emissions?\n",
      "{'user_input': 'Super thanks, Which industries have the highest GHG emissions?', 'intent': 'search', 'language': 'English', 'query': 'Super thanks, Which industries have the highest GHG emissions?', 'questions': [{'question': 'Which industries are the largest contributors to greenhouse gas emissions?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "How do you compare the view on biodiversity between the IPCC and IPBES ?\n",
      "{'user_input': 'How do you compare the view on biodiversity between the IPCC and IPBES ?', 'intent': 'search', 'language': 'English', 'query': 'How do you compare the view on biodiversity between the IPCC and IPBES ?', 'questions': [{'question': 'What is the view on biodiversity according to the IPCC?', 'sources': ['IPCC']}, {'question': 'What is the view on biodiversity according to the IPBES?', 'sources': ['IPBES']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Est-ce que l'IA a un impact sur l'environnement ?\n",
      "{'user_input': \"Est-ce que l'IA a un impact sur l'environnement ?\", 'intent': 'ai_impact', 'language': 'French', 'query': 'Does AI have an impact on the environment?', 'questions': [{'question': 'What is the impact of AI on the environment?', 'sources': ['IPCC', 'OpenAlex']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Que dit le GIEC sur l'impact de l'IA\n",
      "{'user_input': \"Que dit le GIEC sur l'impact de l'IA\", 'intent': 'search', 'language': 'French', 'query': 'What does the IPCC say about the impact of AI', 'questions': [{'question': \"What is the IPCC's stance on artificial intelligence and its impact on climate change?\", 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Franchement je sais pas trop de quoi on parle là, qui sont les membres du GIEC en fait ? Et quelles sont leurs dernières publications ?\n",
      "{'user_input': 'Franchement je sais pas trop de quoi on parle là, qui sont les membres du GIEC en fait ? Et quelles sont leurs dernières publications ?', 'language': 'French', 'intent': 'search', 'query': \"Honestly, I'm not sure what we're talking about here, who are the members of the IPCC actually? And what are their latest publications?\", 'questions': [{'question': 'Who are the members of the IPCC?', 'sources': ['IPCC']}, {'question': 'What are the latest publications of the IPCC?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Ok that's nice, but I don't really understand. What is the impact of El Nino ?\n",
      "{'user_input': \"Ok that's nice, but I don't really understand. What is the impact of El Nino ?\", 'intent': 'ai_impact', 'language': 'English', 'query': \"Ok that's nice, but I don't really understand. What is the impact of El Nino ?\", 'questions': [{'question': 'What is El Nino?', 'sources': ['IPCC']}, {'question': 'What are the impacts of El Nino?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\n",
      "{'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'intent': 'search', 'language': 'English', 'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': \"What role do cloud formations play in modulating the Earth's radiative balance?\", 'sources': ['IPCC']}, {'question': 'How are cloud formations represented in current climate models?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Which industries have the highest GHG emissions?\n",
      "{'user_input': 'Which industries have the highest GHG emissions?', 'intent': 'search', 'language': 'English', 'query': 'Which industries have the highest GHG emissions?', 'questions': [{'question': 'What are the industries with the highest greenhouse gas emissions?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "What are invasive alien species and how do they threaten biodiversity and ecosystems?\n",
      "{'user_input': 'What are invasive alien species and how do they threaten biodiversity and ecosystems?', 'intent': 'search', 'language': 'English', 'query': 'What are invasive alien species and how do they threaten biodiversity and ecosystems?', 'questions': [{'question': 'Definition of invasive alien species', 'sources': ['IPBES']}, {'question': 'How do invasive alien species threaten biodiversity and ecosystems?', 'sources': ['IPBES']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Are human activities causing global warming?\n",
      "{'user_input': 'Are human activities causing global warming?', 'intent': 'search', 'language': 'English', 'query': 'Are human activities causing global warming?', 'questions': [{'question': 'What are the main causes of global warming?', 'sources': ['IPCC']}, {'question': 'How do human activities contribute to global warming?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "What is the motivation behind mining the deep seabed?\n",
      "{'user_input': 'What is the motivation behind mining the deep seabed?', 'intent': 'search', 'language': 'English', 'query': 'What is the motivation behind mining the deep seabed?', 'questions': [{'question': 'What are the reasons for mining the deep seabed?', 'sources': ['IPOS']}, {'question': 'What are the benefits of mining the deep seabed?', 'sources': ['IPOS']}, {'question': 'What are the environmental impacts of mining the deep seabed?', 'sources': ['IPOS']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Tu peux m'écrire un poème sur le changement climatique ?\n",
      "{'user_input': \"Tu peux m'écrire un poème sur le changement climatique ?\", 'language': 'French', 'intent': 'search', 'query': 'Can you write me a poem about climate change?', 'questions': [{'question': 'What are the key themes and impacts of climate change?', 'sources': ['IPCC']}, {'question': 'How does climate change affect the environment and ecosystems?', 'sources': ['IPCC', 'IPBES']}, {'question': 'What are some common metaphors or symbols used to describe climate change in literature?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Tu peux m'écrire un poème sur les bonbons ?\n",
      "{'user_input': \"Tu peux m'écrire un poème sur les bonbons ?\", 'language': 'French', 'intent': 'search', 'query': 'Can you write me a poem about candies?', 'questions': [{'question': 'What are the key elements of a poem about candies?', 'sources': ['OpenAlex']}, {'question': 'What are some common themes in poems about candies?', 'sources': ['OpenAlex']}, {'question': 'How can I structure a poem about candies?', 'sources': ['OpenAlex']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "What will be the temperature in 2100 in Strasbourg?\n",
      "{'user_input': 'What will be the temperature in 2100 in Strasbourg?', 'intent': 'geo_info', 'language': 'English', 'query': 'What will be the temperature in 2100 in Strasbourg?', 'questions': [{'question': 'What are the projected temperature changes for the year 2100 according to IPCC reports?', 'sources': ['IPCC']}, {'question': 'How does climate change affect temperature projections for the future?', 'sources': ['IPCC']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "C'est quoi le lien entre biodiversity and changement climatique ?\n",
      "{'user_input': \"C'est quoi le lien entre biodiversity and changement climatique ?\", 'intent': 'search', 'language': 'French', 'query': 'What is the link between biodiversity and climate change?', 'questions': [{'question': 'What is biodiversity?', 'sources': ['IPBES']}, {'question': 'How does climate change affect biodiversity?', 'sources': ['IPCC', 'IPBES']}, {'question': 'How does biodiversity affect climate change?', 'sources': ['IPCC', 'IPBES']}]}\n",
      "----------------------------------------------------------------------------------------------------\n",
      "Can you tell me more about ESRS2 ?\n",
      "{'user_input': 'Can you tell me more about ESRS2 ?', 'intent': 'esg', 'language': 'English', 'query': 'Can you tell me more about ESRS2 ?', 'questions': [{'question': 'What is ESRS2?', 'sources': ['OpenAlex']}, {'question': 'What are the key features of ESRS2?', 'sources': ['IPCC']}, {'question': 'How is ESRS2 related to climate change, energy, biodiversity, and nature?', 'sources': ['IPCC', 'IPBES']}]}\n",
      "----------------------------------------------------------------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "for question in questions:\n",
    "    print(question)\n",
    "    output = transform_query(question)\n",
    "    print(output)\n",
    "    print(\"-\"*100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "7a0d82ad-44e7-40a7-a594-48823429d70e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'query': 'Industries with highest GHG emissions',\n",
       " 'sources': ['IPCC'],\n",
       " 'topics': ['Climate change', 'Decarbonization'],\n",
       " 'date': '',\n",
       " 'location': {'country': '', 'location': ''}}"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rewriter_chain.invoke({\"input\":question})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "05aeeb92-9408-42b8-9f99-1e907c6a0798",
   "metadata": {},
   "source": [
    "# Langgraph\n",
    "Inspired from https://colab.research.google.com/drive/1WemHvycYcoNTDr33w7p2HL3FF72Nj88i?usp=sharing#scrollTo=YJ77ZCzkiGTL"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8664f5f1-0db8-4c3d-8229-e1719224cde5",
   "metadata": {},
   "source": [
    "## Graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "2376e1d7-5893-4022-a0af-155bb8c1950f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from climateqa.engine.graph import make_graph_agent,display_graph\n",
    "agent = make_graph_agent(llm,vectorstore,reranker)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "a1f78d00-e4a0-40f3-a1e9-61dea83fa6cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAJ+AuEDASIAAhEBAxEB/8QAHQABAAIDAQEBAQAAAA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d659W2Z1PUdmwiOqlibpoHTzWNVfsf/2x7St9oYukrLUPvvB3Bcous9zvGH2S6XGfl7Wrq6CKSWTTQ0czi0k6AA+4BWF9VVD74vfxv5J9VVD74vfxv5K0fwm1eMZY9pVnx2GecSq4+D/wzOt4BjZ13btcPT/qqW49jdpxO1x22y22ltNvjLnMpaKFsUbSTskNaABsklST6qqH3xe/jfyT6qqH3xe/jfyUz/CrW4Tm+EkeNwxxir+OFX9Bkn/td/8A3MKnK02MYtSYnRz09JJUTCec1EklTJzvc8ta3e/uaFuV3Z0jSI9IiPaIhxclovebR6iIiqzEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQFzv8Ayfv+ibhf/KXD/wAfULohc7/yfv8Aom4X/wApcP8Ax9Qg6IREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQFzv8Ayfv+ibhf/KXD/wAfULohc7/yfv8Aom4X/wApcP8Ax9Qg6IREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERARabI8roMYij8ZdJNUzb7Cjp28802tb5W+wbG3HTRsbI2FE5s9ySpcTS2e30cezoVdW6STXqJDGaH3Bx+9axjtMazwj750bUw5MnGsLFRVr5Z5d+rWT+KZPLPLv1ayfxTK26juj3a+UzdFlIq18s8u/VrJ/FMnlnl36tZP4pk3Ud0e55TN0WUirXyzy79Wsn8UyeWeXfq1k/imTdR3R7nlM3RzJ/KgcDXZRhVs4k2yDnr7ABRXENG3Po3v8x3/RyPPQeqVxPornH+Tp4HP4n8bYMlroXGxYkWXBz+4PrN7p2b+xzTJ/0YB9JfRnIbpf8qsNxst0t1i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2DSkI4UUAIP0vej9njv5LMt/DKwUM8c8tNLcp4yCx9xqH1AaQdghryWgg+sDf9wTd4o539o/ypPjsccYji0OMWN+VV1LcZ4nMstLIJ4BI0tdVzNILJAD/AL20+cD/AFnBrh5oBfZCIq2trpEcIhysuW2W21YREVGQiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiIKuyW64vD4QmGUFZj1VVZZNaq2SgvbN9jSwjXaxu87W3dNeafvCtFQu71WbM4qY/Bb6OikwR9FUOulVIR4xHUjXYhg5geU9d+afvCmiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICrrgrdvpagyp3kD9X/YZFWwdh2HZfSfKW/wA/12UfN22982nb5fScrFUL4YWvNrVR5A3OLxRXiomvVVPa30TA0QW5xb2EL9Rs29o5tnzu/wBJyCaIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiDnn+T+/0RsE++4f8AmFSuhlzz/J/f6I2CffcP/MKldDICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiCtshtVDPx2xK4SZo+318Fsq44sUEum3Bp1zTlvMN9n7eU9/eFZKq7Jbri8PhCYZQVmPVVVlk1qrZKC9s32NLCNdrG7ztbd015p+8K0UBERAREQEREBERAREQEREBERAREQEREBERAREQFVPg92vCbVbM1bg94rbxTzZXcJ7o+tYWmC4uLO3hZuNm2NPLo+d3+k5Wsq64K3b6WoMqd5A/V/2GRVsHYdh2X0nylv8AP9dlHzdtvfNp2+X0nILFREQEREBERAREQEREBERAREQEREBERAREQEREHPP8n9/ojYJ99w/8wqV0Muef5P7/AERsE++4f+YVK6GQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREELu9VmzOKmPwW+jopMEfRVDrpVSEeMR1I12IYOYHlPXfmn7wpoq2yG1UM/HbErhJmj7fXwWyrjixQS6bcGnXNOW8w32ft5T394VkoCIiAiIgIiICIiA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N2T7n2R4X7/AH/wqX6Trv2cvfwn5p9J137OXv4T81bSJ5bw3ZPufZHhfv8Af/Coom3G636wNbYrpTsguDJpJain5GMYGuBJO/tCt1EW/wDLWsUpGkQ6WDBTw1N3j5CIih6BERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQf/2Q==",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display_graph(agent)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "3a07607b-eb02-467f-a255-0c6bcdc6f62c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "... Analyzing user message\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'intent': 'search', 'language': 'English', 'query': 'What evidence do we have of climate change?'}\n",
      "... Thinking step by step to answer the question\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'questions': [{'question': 'What are the key indicators of climate change?', 'sources': ['IPCC']}, {'question': 'How do scientists gather evidence of climate change?', 'sources': ['IPCC']}, {'question': 'What data supports the existence of climate change?', 'sources': ['IPCC']}]}\n",
      "... Searching in the knowledge base\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The evidence of climate change is supported by a broad range of indicators across various domains, as highlighted in the IPCC and IPBES reports:\n",
      "\n",
      "- Surface air temperature and precipitation are key indicators of climate change [Doc 3, Doc 5].\n",
      "- Monitoring surface temperatures is integral to understanding climate change [Doc 3].\n",
      "- Upper-air temperatures are crucial indicators of different causal mechanisms underlying climate change [Doc 3].\n",
      "- Large-scale changes in the global hydrological cycle are monitored through indicators like ocean and land precipitation-evaporation, global precipitation, total column water vapor, surface humidity, and global river runoff [Doc 3].\n",
      "- A warming world may lead to changes in large-scale circulation patterns such as the Hadley circulation, monsoon systems, and the position and strength of the sub-tropical and polar jets [Doc 3].\n",
      "- The evidence for climate change is not solely based on increasing surface temperatures but on a variety of indicators across the atmosphere, ocean, cryosphere, and biosphere [Doc 6, Doc 11].\n",
      "- Scientists use multiple lines of evidence, including paleorecords, contemporary observations, manipulation experiments, and models, to attribute changes in marine ecosystems to climate change [Doc 8, Doc 10].\n",
      "- Geological and biological materials like corals, trees, glacier ice, and fossil pollen preserve evidence of past climate changes, aiding in understanding climate change over time [Doc 9].\n",
      "- Multiple data sources, methodologies, and approaches are used to construct climate information, including theoretical understanding, observed data, simulations, and experiments [Doc 7, Doc 13].\n",
      "- To generate robust information on regional climate change, consistency among data sources is crucial, and observational uncertainty should be considered [Doc 14].\n",
      "- The evidence base for climate change includes observed changes, model projections, and process-oriented attribution of changes to human interventions [Doc 15].\n",
      "\n",
      "Overall, the evidence for climate change is derived from a comprehensive analysis of various indicators and data sources across different domains, providing a coherent picture of a warming world."
     ]
    }
   ],
   "source": [
    "verbose = False\n",
    "question = \"What evidence do we have of climate change?\"\n",
    "\n",
    "steps_display = {\n",
    "    \"categorize_intent\":(\"... Analyzing user message\",True),\n",
    "    \"transform_query\":(\"... Thinking step by step to answer the question\",True),\n",
    "    \"retrieve_documents\":(\"... Searching in the knowledge base\",False),\n",
    "}\n",
    "\n",
    "def display_steps(event):\n",
    "\n",
    "    for event_name,(event_description,display_output) in steps_display.items():\n",
    "        if event[\"name\"] == event_name:\n",
    "            if event[\"event\"] == \"on_chain_start\":\n",
    "                print(event_description)\n",
    "            elif event[\"event\"] == \"on_chain_end\":\n",
    "                if display_output:\n",
    "                    print(event[\"data\"][\"output\"])\n",
    "\n",
    "async for event in agent.astream_events({\"user_input\":question,\"sources_input\":[\"auto\"],\"audience\":\"experts\"},version = \"v1\"):\n",
    "\n",
    "    if verbose:\n",
    "        print(event)\n",
    "        print(\"-\"*50)\n",
    "    else:\n",
    "    \n",
    "        if event[\"event\"] == \"on_chat_model_stream\":\n",
    "            print(event[\"data\"][\"chunk\"].content,end = \"\")\n",
    "\n",
    "        if event[\"name\"] == \"retrieve_documents\" and event[\"event\"] == \"on_chain_end\":\n",
    "            docs = event[\"data\"][\"output\"][\"documents\"]\n",
    "            \n",
    "        display_steps(event)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "a09f58e5-368b-486b-a458-7cfe56445c08",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Document(page_content='Summary: The image is a graphical representation of human-environment interactions from 1970 to 2020, depicting the substantial increase in global economic growth and its varied environmental impacts across different categories of countries (developed, developing, and least developed countries). This graph shows key indicators such as Gross Domestic Product (GDP), Domestic Material Consumption, Extraction of Living Biomass, Protection of Key Biodiversity Areas (KBAs), Air Pollution, and Fertilizer Use, indicating disparities in economic growth, resource consumption, environmental conservation, and pollution among these groups of countries.', metadata={'chunk_type': 'image', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'Picture_0_32', 'figure_code': 'N/A', 'file_size': 230.771484375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document24/images/Picture_0_32.png', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 33, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.658392608, 'content': 'Summary: The image is a graphical representation of human-environment interactions from 1970 to 2020, depicting the substantial increase in global economic growth and its varied environmental impacts across different categories of countries (developed, developing, and least developed countries). This graph shows key indicators such as Gross Domestic Product (GDP), Domestic Material Consumption, Extraction of Living Biomass, Protection of Key Biodiversity Areas (KBAs), Air Pollution, and Fertilizer Use, indicating disparities in economic growth, resource consumption, environmental conservation, and pollution among these groups of countries.', 'reranking_score': 0.9946669340133667, 'query_used_for_retrieval': 'What are the key indicators of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='This image is a representation of the four-box model used to communicate the level of scientific confidence in relation to climate change and biodiversity findings. It visually summarizes how confidence is categorized based on the strength of evidence and the degree of consensus among experts. The model categorizes findings into four different types of confidence levels: Inconclusive, Established but Incomplete, Unresolved, and Well Established, each corresponding to different intersections of evidence and agreement. The shading gradient indicates that higher confidence is represented towards the top right corner, which combines a high level of agreement with robust quantity and quality of evidence. This framework is instrumental in communicating scientific assessments from organizations such as IPBES.', metadata={'chunk_type': 'image', 'document_id': 'document34', 'document_number': 34.0, 'element_id': 'Picture_0_47', 'figure_code': 'Figure \\r\\nSPM.A1', 'file_size': 79.890625, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document34/images/Picture_0_47.png', 'n_pages': 52.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for Europe and Central Asia', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 48, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES RAR ECA SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237468/files/ipbes_assessment_spm_eca_EN.pdf', 'similarity_score': 0.659100771, 'content': 'This image is a representation of the four-box model used to communicate the level of scientific confidence in relation to climate change and biodiversity findings. It visually summarizes how confidence is categorized based on the strength of evidence and the degree of consensus among experts. The model categorizes findings into four different types of confidence levels: Inconclusive, Established but Incomplete, Unresolved, and Well Established, each corresponding to different intersections of evidence and agreement. The shading gradient indicates that higher confidence is represented towards the top right corner, which combines a high level of agreement with robust quantity and quality of evidence. This framework is instrumental in communicating scientific assessments from organizations such as IPBES.', 'reranking_score': 0.9927500486373901, 'query_used_for_retrieval': 'How do scientists gather evidence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', metadata={'chunk_type': 'text', 'document_id': 'document26', 'document_number': 26.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Summary for policymakers of the thematic assessment of the sustainable use of wild species of the IPBES', 'num_characters': 379.0, 'num_tokens': 75.0, 'num_tokens_approx': 81.0, 'num_words': 61.0, 'page_number': 23, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'B2 The sustainability of the use of wild species \\r\\nis influenced negatively or positively by \\r\\nmultiple drivers.', 'short_name': 'IPBES TAM SW SPM', 'source': 'IPBES', 'toc_level0': 'Table of Contents', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/7411847/files/EN_SPM_SUSTAINABLE%20USE%20OF%20WILD%20SPECIES.pdf', 'similarity_score': 0.624824047, 'content': 'by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', 'reranking_score': 0.9903822541236877, 'query_used_for_retrieval': 'What data supports the existence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='Summary: This figure visually represents a comparison of different pathways towards sustainable development, categorized by scenarios such as Green Economy, Low Carbon, and Ecotopian approaches. Each pathway is assessed for its effectiveness in addressing a range of sustainability goals, indicated by varying shades of green. Darker shades correlate with a greater number of goals addressed. The diagram serves as a tool for understanding the spectrum and relative impact of sustainability strategies within scenario archetypes outlined by the IPCC and IPBES reports on climate change and biodiversity. The pathways range from resource sparing to local multifunctionality, highlighting diverse strategies to combat climate change and protect biodiversity.', metadata={'chunk_type': 'image', 'document_id': 'document34', 'document_number': 34.0, 'element_id': 'Picture_0_35', 'figure_code': 'N/A', 'file_size': 66.1787109375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document34/images/Picture_0_35.png', 'n_pages': 52.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for Europe and Central Asia', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 36, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES RAR ECA SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237468/files/ipbes_assessment_spm_eca_EN.pdf', 'similarity_score': 0.657539964, 'content': 'Summary: This figure visually represents a comparison of different pathways towards sustainable development, categorized by scenarios such as Green Economy, Low Carbon, and Ecotopian approaches. Each pathway is assessed for its effectiveness in addressing a range of sustainability goals, indicated by varying shades of green. Darker shades correlate with a greater number of goals addressed. The diagram serves as a tool for understanding the spectrum and relative impact of sustainability strategies within scenario archetypes outlined by the IPCC and IPBES reports on climate change and biodiversity. The pathways range from resource sparing to local multifunctionality, highlighting diverse strategies to combat climate change and protect biodiversity.', 'reranking_score': 0.9874748587608337, 'query_used_for_retrieval': 'What are the key indicators of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='Summary:\\nThe image illustrates the four-box model for qualitative communication of confidence from scientific reports. It showcases a matrix with two axes: \"Level of Agreement\" on the vertical axis, ranging from low to high, and the horizontal axis representing the \"Quantity and Quality of Evidence,\" ranging from robust to low. The four quadrants formed are labeled as \"Established but incomplete,\" \"Well established,\" \"Inconclusive,\" and \"Unresolved,\" indicating various degrees of scientific confidence based on the agreement among experts and the evidence\\'s quality. Additionally, a separate \"Certainty Scale\" bar on the right side of the diagram indicates a continuum from low to high certainty. This model is used for assessing and communicating the confidence in scientific findings related to climate change and biodiversity.', metadata={'chunk_type': 'image', 'document_id': 'document26', 'document_number': 26.0, 'element_id': 'Picture_0_38', 'figure_code': 'N/A', 'file_size': 56.0205078125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document26/images/Picture_0_38.png', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Summary for policymakers of the thematic assessment of the sustainable use of wild species of the IPBES', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 39, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES TAM SW SPM', 'source': 'IPBES', 'toc_level0': 'Table of Contents', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/7411847/files/EN_SPM_SUSTAINABLE%20USE%20OF%20WILD%20SPECIES.pdf', 'similarity_score': 0.636326432, 'content': 'Summary:\\nThe image illustrates the four-box model for qualitative communication of confidence from scientific reports. It showcases a matrix with two axes: \"Level of Agreement\" on the vertical axis, ranging from low to high, and the horizontal axis representing the \"Quantity and Quality of Evidence,\" ranging from robust to low. The four quadrants formed are labeled as \"Established but incomplete,\" \"Well established,\" \"Inconclusive,\" and \"Unresolved,\" indicating various degrees of scientific confidence based on the agreement among experts and the evidence\\'s quality. Additionally, a separate \"Certainty Scale\" bar on the right side of the diagram indicates a continuum from low to high certainty. This model is used for assessing and communicating the confidence in scientific findings related to climate change and biodiversity.', 'reranking_score': 0.9869220852851868, 'query_used_for_retrieval': 'How do scientists gather evidence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', metadata={'chunk_type': 'text', 'document_id': 'document26', 'document_number': 26.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Summary for policymakers of the thematic assessment of the sustainable use of wild species of the IPBES', 'num_characters': 379.0, 'num_tokens': 75.0, 'num_tokens_approx': 81.0, 'num_words': 61.0, 'page_number': 23, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'B2 The sustainability of the use of wild species \\r\\nis influenced negatively or positively by \\r\\nmultiple drivers.', 'short_name': 'IPBES TAM SW SPM', 'source': 'IPBES', 'toc_level0': 'Table of Contents', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/7411847/files/EN_SPM_SUSTAINABLE%20USE%20OF%20WILD%20SPECIES.pdf', 'similarity_score': 0.653102875, 'content': 'by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', 'reranking_score': 0.9700126051902771, 'query_used_for_retrieval': 'What are the key indicators of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='The Assessment is critical today because evidence has \\r\\naccumulated that the multiple threats to biodiversity have \\r\\nintensified since previous reports, and that the sustainable use \\r\\nof nature will be vital for adapting to and mitigating dangerous \\r\\nanthropogenic interference with the climate system, as well as \\r\\nfor achieving many of our most important development goals.\\nThe findings of this Assessment focus on the global scale, \\r\\nspanning the period from the 1970s to 2050. They are based \\r\\non an unprecedented collection of evidence, integrating \\r\\nnatural and social science perspectives, a range of knowledge \\r\\nsystems and multiple dimensions of value. This is the first \\r\\nglobal-level assessment to systematically consider evidence \\r\\nabout the contributions of indigenous and local knowledge \\r\\nand practices, and issues concerning Indigenous Peoples and \\r\\nLocal Communities. All these features result in a more holistic \\r\\nassessment of indirect drivers as root causes of changes \\r\\nin nature and the associated risks to the quality of life of \\r\\nall people.', metadata={'chunk_type': 'text', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 1065.0, 'num_tokens': 196.0, 'num_tokens_approx': 225.0, 'num_words': 169.0, 'page_number': 5, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'FOREWORDFOREWORD\\n\\x0c', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.651207328, 'content': 'The Assessment is critical today because evidence has \\r\\naccumulated that the multiple threats to biodiversity have \\r\\nintensified since previous reports, and that the sustainable use \\r\\nof nature will be vital for adapting to and mitigating dangerous \\r\\nanthropogenic interference with the climate system, as well as \\r\\nfor achieving many of our most important development goals.\\nThe findings of this Assessment focus on the global scale, \\r\\nspanning the period from the 1970s to 2050. They are based \\r\\non an unprecedented collection of evidence, integrating \\r\\nnatural and social science perspectives, a range of knowledge \\r\\nsystems and multiple dimensions of value. This is the first \\r\\nglobal-level assessment to systematically consider evidence \\r\\nabout the contributions of indigenous and local knowledge \\r\\nand practices, and issues concerning Indigenous Peoples and \\r\\nLocal Communities. All these features result in a more holistic \\r\\nassessment of indirect drivers as root causes of changes \\r\\nin nature and the associated risks to the quality of life of \\r\\nall people.', 'reranking_score': 0.9676424860954285, 'query_used_for_retrieval': 'What are the key indicators of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content=\"Summary: This visual summary presents an assessment of global environmental changes and their impact on nature's capacity to support human well-being between 1970 and the present, indicating overall declines in various ecosystem services across multiple categories. This decline is signalled by downward arrows in categories such as habitat creation, pollination, air and climate regulation, as well as freshwater regulation. The chart differentiates between consistent regional trends and variable outcomes, while also providing indicators for each service that demonstrate the observed changes.\", metadata={'chunk_type': 'image', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'Picture_0_24', 'figure_code': 'N/A', 'file_size': 620.9736328125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document24/images/Picture_0_24.png', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 25, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.651050925, 'content': \"Summary: This visual summary presents an assessment of global environmental changes and their impact on nature's capacity to support human well-being between 1970 and the present, indicating overall declines in various ecosystem services across multiple categories. This decline is signalled by downward arrows in categories such as habitat creation, pollination, air and climate regulation, as well as freshwater regulation. The chart differentiates between consistent regional trends and variable outcomes, while also providing indicators for each service that demonstrate the observed changes.\", 'reranking_score': 0.9634665846824646, 'query_used_for_retrieval': 'What are the key indicators of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', metadata={'chunk_type': 'text', 'document_id': 'document26', 'document_number': 26.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Summary for policymakers of the thematic assessment of the sustainable use of wild species of the IPBES', 'num_characters': 379.0, 'num_tokens': 75.0, 'num_tokens_approx': 81.0, 'num_words': 61.0, 'page_number': 23, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'B2 The sustainability of the use of wild species \\r\\nis influenced negatively or positively by \\r\\nmultiple drivers.', 'short_name': 'IPBES TAM SW SPM', 'source': 'IPBES', 'toc_level0': 'Table of Contents', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/7411847/files/EN_SPM_SUSTAINABLE%20USE%20OF%20WILD%20SPECIES.pdf', 'similarity_score': 0.623599827, 'content': 'by interactions of climate change with other environmental, \\r\\nsociocultural, political and economic drivers and associated \\r\\nunderlying causes. Developing effective responses is also \\r\\nchallenged by incomplete knowledge of climate change \\r\\npatterns and by many gaps in understanding of how climate \\r\\nchange affects sustainability of uses (established but \\r\\nincomplete) {4.2.1.2}.', 'reranking_score': 0.9539093375205994, 'query_used_for_retrieval': 'How do scientists gather evidence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content=\"Summary: The image is a four-box model that represents a framework used by the IPBES to communicate the confidence level of scientific findings related to biodiversity and climate change. It illustrates the relationship between the quantity and quality of evidence and the level of agreement among experts, with confidence increasing from the bottom left corner ('Inconclusive' with low evidence and agreement) to the top right corner ('Well established' with high evidence and agreement). The degree of shading in each box corresponds to the level of certainty, which is also represented by an adjacent certainty scale with 'High' at the top and 'Low' at the bottom. This model serves as a guideline for assessing the degree of confidence in key findings within environmental reports.\", metadata={'chunk_type': 'image', 'document_id': 'document32', 'document_number': 32.0, 'element_id': 'Picture_0_41', 'figure_code': 'Figure \\r\\nSPM.A1', 'file_size': 57.51171875, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document32/images/Picture_0_41.png', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for Asia and the Pacific', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 42, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES RAR AP SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237383/files/ipbes_assessment_spm_ap_EN.pdf', 'similarity_score': 0.612060189, 'content': \"Summary: The image is a four-box model that represents a framework used by the IPBES to communicate the confidence level of scientific findings related to biodiversity and climate change. It illustrates the relationship between the quantity and quality of evidence and the level of agreement among experts, with confidence increasing from the bottom left corner ('Inconclusive' with low evidence and agreement) to the top right corner ('Well established' with high evidence and agreement). The degree of shading in each box corresponds to the level of certainty, which is also represented by an adjacent certainty scale with 'High' at the top and 'Low' at the bottom. This model serves as a guideline for assessing the degree of confidence in key findings within environmental reports.\", 'reranking_score': 0.9479717016220093, 'query_used_for_retrieval': 'How do scientists gather evidence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='instance, water, energy and shelter provision for the growing \\r\\npopulation at other scales {2.2.1.3, 8.4.2}. Effective means for \\r\\nenhancing such coordination and collaboration include the \\r\\nengagement of scientists with leaders in government, \\r\\nbusiness and civil society to develop the knowledge, tools \\r\\nand practices necessary to integrate social-ecological \\r\\ninteractions into decision-making {1.3.2.1, 2.3.2.2, 6.4.3, \\r\\n6.4.4, 8.2.3}, and cross-disciplinary and multi-actor \\r\\ncollaboration in research, restoration planning and \\r\\nimplementation {6.4.2.3, 6,4,3, 8.2.3}.', metadata={'chunk_type': 'text', 'document_id': 'document36', 'document_number': 36.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 48.0, 'name': 'Summary for Policymakers. Assessment Report on Land Degradation and Restoration', 'num_characters': 575.0, 'num_tokens': 163.0, 'num_tokens_approx': 190.0, 'num_words': 143.0, 'page_number': 37, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'Table SPM 1 Responses to address land degradation, their impacts and outcomes for \\r\\nbiodiversity and ecosystem services. ', 'short_name': 'IPBES AR LDR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/records/3237411/files/ipbes_assessment_spm_ldra_EN.pdf?download=1', 'similarity_score': 0.605369747, 'content': 'instance, water, energy and shelter provision for the growing \\r\\npopulation at other scales {2.2.1.3, 8.4.2}. Effective means for \\r\\nenhancing such coordination and collaboration include the \\r\\nengagement of scientists with leaders in government, \\r\\nbusiness and civil society to develop the knowledge, tools \\r\\nand practices necessary to integrate social-ecological \\r\\ninteractions into decision-making {1.3.2.1, 2.3.2.2, 6.4.3, \\r\\n6.4.4, 8.2.3}, and cross-disciplinary and multi-actor \\r\\ncollaboration in research, restoration planning and \\r\\nimplementation {6.4.2.3, 6,4,3, 8.2.3}.', 'reranking_score': 0.9426116943359375, 'query_used_for_retrieval': 'How do scientists gather evidence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='20. United Nations Development Programme (2015). Human Development \\r\\nData (1990-2015) Retrieved from http://hdr.undp.org/en/data\\r\\n21. Van der Esch, S., ten Brink, B., Stehfest, E., Bakkenes, M., Sewell, \\r\\nA., Bouwman, A., Meijer, J., Westhoek, H., and van den Berg, M. \\r\\n(2017). Exploring future changes in land use and land condition and \\r\\nthe impacts on food, water, climate change and biodiversity: Scenarios \\r\\nfor the UNCCD Global Land Outlook. The Hague: PBL Netherlands \\r\\nEnvironmental Assessment Agency. Retrieved from http://www.pbl.nl/\\r\\nsites/default/files/cms/publicaties/pbl-2017-exploring-future-changes\\x02in-land-use-and-land-condition-2076.pdf', metadata={'chunk_type': 'text', 'document_id': 'document36', 'document_number': 36.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 48.0, 'name': 'Summary for Policymakers. Assessment Report on Land Degradation and Restoration', 'num_characters': 655.0, 'num_tokens': 184.0, 'num_tokens_approx': 214.0, 'num_words': 161.0, 'page_number': 28, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'Figure SPM 9 Land degradation affects countries of all income levels and at all levels of human \\r\\ndevelopment. ', 'short_name': 'IPBES AR LDR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/records/3237411/files/ipbes_assessment_spm_ldra_EN.pdf?download=1', 'similarity_score': 0.622500896, 'content': '20. United Nations Development Programme (2015). Human Development \\r\\nData (1990-2015) Retrieved from http://hdr.undp.org/en/data\\r\\n21. Van der Esch, S., ten Brink, B., Stehfest, E., Bakkenes, M., Sewell, \\r\\nA., Bouwman, A., Meijer, J., Westhoek, H., and van den Berg, M. \\r\\n(2017). Exploring future changes in land use and land condition and \\r\\nthe impacts on food, water, climate change and biodiversity: Scenarios \\r\\nfor the UNCCD Global Land Outlook. The Hague: PBL Netherlands \\r\\nEnvironmental Assessment Agency. Retrieved from http://www.pbl.nl/\\r\\nsites/default/files/cms/publicaties/pbl-2017-exploring-future-changes\\x02in-land-use-and-land-condition-2076.pdf', 'reranking_score': 0.8312966823577881, 'query_used_for_retrieval': 'What data supports the existence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='This image is a representation of the four-box model used to communicate the level of scientific confidence in relation to climate change and biodiversity findings. It visually summarizes how confidence is categorized based on the strength of evidence and the degree of consensus among experts. The model categorizes findings into four different types of confidence levels: Inconclusive, Established but Incomplete, Unresolved, and Well Established, each corresponding to different intersections of evidence and agreement. The shading gradient indicates that higher confidence is represented towards the top right corner, which combines a high level of agreement with robust quantity and quality of evidence. This framework is instrumental in communicating scientific assessments from organizations such as IPBES.', metadata={'chunk_type': 'image', 'document_id': 'document34', 'document_number': 34.0, 'element_id': 'Picture_0_47', 'figure_code': 'Figure \\r\\nSPM.A1', 'file_size': 79.890625, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document34/images/Picture_0_47.png', 'n_pages': 52.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for Europe and Central Asia', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 48, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPBES RAR ECA SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237468/files/ipbes_assessment_spm_eca_EN.pdf', 'similarity_score': 0.621113539, 'content': 'This image is a representation of the four-box model used to communicate the level of scientific confidence in relation to climate change and biodiversity findings. It visually summarizes how confidence is categorized based on the strength of evidence and the degree of consensus among experts. The model categorizes findings into four different types of confidence levels: Inconclusive, Established but Incomplete, Unresolved, and Well Established, each corresponding to different intersections of evidence and agreement. The shading gradient indicates that higher confidence is represented towards the top right corner, which combines a high level of agreement with robust quantity and quality of evidence. This framework is instrumental in communicating scientific assessments from organizations such as IPBES.', 'reranking_score': 0.6637013554573059, 'query_used_for_retrieval': 'What data supports the existence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='biodiversity (well established) {4.2.2.2, 4.2.2.3.1}. Climate \\r\\nchange alone is projected to decrease ocean net primary \\r\\nproduction by between 3 and 10 per cent, and fish biomass \\r\\nby between 3 and 25 per cent (in low and high warming \\r\\nscenarios, respectively) by the end of the century (established \\r\\nbut incomplete) {4.2.2.2.1}. Whether or not the current \\r\\nremoval of nearly 30 per cent of anthropogenic carbon \\r\\ndioxide emissions by terrestrial ecosystems continues into the \\r\\nfuture varies greatly from one scenario to the next and \\r\\ndepends heavily on how climate change, atmospheric carbon \\r\\ndioxide and land-use change interact. Important regulating \\r\\ncontributions of nature, such as coastal and soil protection, \\r\\ncrop pollination and carbon storage, are projected to decline\\r\\n(established but incomplete) {4.2.4, 4.3.2.1}. In contrast, \\r\\nsubstantial increases in food, feed, timber and bioenergy', metadata={'chunk_type': 'text', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 908.0, 'num_tokens': 223.0, 'num_tokens_approx': 253.0, 'num_words': 190.0, 'page_number': 39, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': \"Figure SPM 7 Summary of recent status and trends in aspects of nature and nature's \\r\\ncontributions to people that support progress towards achieving selected targets \\r\\nof the Sustainable Development Goals. \", 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.61879009, 'content': 'biodiversity (well established) {4.2.2.2, 4.2.2.3.1}. Climate \\r\\nchange alone is projected to decrease ocean net primary \\r\\nproduction by between 3 and 10 per cent, and fish biomass \\r\\nby between 3 and 25 per cent (in low and high warming \\r\\nscenarios, respectively) by the end of the century (established \\r\\nbut incomplete) {4.2.2.2.1}. Whether or not the current \\r\\nremoval of nearly 30 per cent of anthropogenic carbon \\r\\ndioxide emissions by terrestrial ecosystems continues into the \\r\\nfuture varies greatly from one scenario to the next and \\r\\ndepends heavily on how climate change, atmospheric carbon \\r\\ndioxide and land-use change interact. Important regulating \\r\\ncontributions of nature, such as coastal and soil protection, \\r\\ncrop pollination and carbon storage, are projected to decline\\r\\n(established but incomplete) {4.2.4, 4.3.2.1}. In contrast, \\r\\nsubstantial increases in food, feed, timber and bioenergy', 'reranking_score': 0.465409517288208, 'query_used_for_retrieval': 'What data supports the existence of climate change?', 'sources_used': ['IPBES']}),\n",
       " Document(page_content='13. Van der Esch, S., ten Brink, B., Stehfest, E., Bakkenes, M., Sewell, \\r\\nA., Bouwman, A., Meijer, J., Westhoek, H., and van den Berg, M. \\r\\n(2017). Exploring future changes in land use and land condition and \\r\\nthe impacts on food, water, climate change and biodiversity: Scenarios \\r\\nfor the UNCCD Global Land Outlook. The Hague: PBL Netherlands \\r\\nEnvironmental Assessment Agency. Retrieved from http://www.pbl.nl/\\r\\nsites/default/files/cms/publicaties/pbl-2017-exploring-future-changes\\x02in-land-use-and-land-condition-2076.pdf.', metadata={'chunk_type': 'text', 'document_id': 'document36', 'document_number': 36.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 48.0, 'name': 'Summary for Policymakers. Assessment Report on Land Degradation and Restoration', 'num_characters': 526.0, 'num_tokens': 152.0, 'num_tokens_approx': 176.0, 'num_words': 132.0, 'page_number': 25, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'Figure SPM 7 Human activity has changed the surface of the planet in profound and \\r\\nfar-reaching ways. ', 'short_name': 'IPBES AR LDR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/records/3237411/files/ipbes_assessment_spm_ldra_EN.pdf?download=1', 'similarity_score': 0.616809428, 'content': '13. Van der Esch, S., ten Brink, B., Stehfest, E., Bakkenes, M., Sewell, \\r\\nA., Bouwman, A., Meijer, J., Westhoek, H., and van den Berg, M. \\r\\n(2017). Exploring future changes in land use and land condition and \\r\\nthe impacts on food, water, climate change and biodiversity: Scenarios \\r\\nfor the UNCCD Global Land Outlook. The Hague: PBL Netherlands \\r\\nEnvironmental Assessment Agency. Retrieved from http://www.pbl.nl/\\r\\nsites/default/files/cms/publicaties/pbl-2017-exploring-future-changes\\x02in-land-use-and-land-condition-2076.pdf.', 'reranking_score': 0.19112645089626312, 'query_used_for_retrieval': 'What data supports the existence of climate change?', 'sources_used': ['IPBES']})]"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "docs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "9b41f377-b3a9-41eb-acef-fb3ea131c374",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "L'impact environnemental de l'intelligence artificielle (IA) n'est pas couvert spécifiquement par les rapports du GIEC ou de l'IPBES. Cependant, il existe des recherches récentes sur ce sujet. Par exemple, vous pouvez consulter le travail de l'experte en IA et climat, Sasha Luccioni, qui a publié plusieurs articles sur l'empreinte carbone de l'IA, notamment sur le coût énergétique de l'inférence des modèles d'IA et sur l'estimation de l'empreinte carbone de l'entraînement de grands modèles de langage.\n",
      "\n",
      "De plus, il existe des outils tels que CodeCarbon et Ecologits qui peuvent vous aider à calculer l'empreinte carbone de vos modèles d'IA. Si vous souhaitez en savoir plus sur l'empreinte carbone de l'IA, je vous recommande de consulter ces ressources et outils. Vous pouvez également visiter cette page pour en apprendre davantage sur l'empreinte carbone de ClimateQ&A : [Lien vers la page sur l'empreinte carbone de ClimateQ&A](https://climateqa.com/docs/carbon-footprint/)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'user_input': \"C'est quoi l'empreinte carbone de l'IA\",\n",
       " 'language': 'French',\n",
       " 'intent': 'ai_impact',\n",
       " 'query': \"C'est quoi l'empreinte carbone de l'IA\",\n",
       " 'answer': \"L'impact environnemental de l'intelligence artificielle (IA) n'est pas couvert spécifiquement par les rapports du GIEC ou de l'IPBES. Cependant, il existe des recherches récentes sur ce sujet. Par exemple, vous pouvez consulter le travail de l'experte en IA et climat, Sasha Luccioni, qui a publié plusieurs articles sur l'empreinte carbone de l'IA, notamment sur le coût énergétique de l'inférence des modèles d'IA et sur l'estimation de l'empreinte carbone de l'entraînement de grands modèles de langage.\\n\\nDe plus, il existe des outils tels que CodeCarbon et Ecologits qui peuvent vous aider à calculer l'empreinte carbone de vos modèles d'IA. Si vous souhaitez en savoir plus sur l'empreinte carbone de l'IA, je vous recommande de consulter ces ressources et outils. Vous pouvez également visiter cette page pour en apprendre davantage sur l'empreinte carbone de ClimateQ&A : [Lien vers la page sur l'empreinte carbone de ClimateQ&A](https://climateqa.com/docs/carbon-footprint/)\"}"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output = await agent.ainvoke({\"user_input\":\"C'est quoi l'empreinte carbone de l'IA\"})\n",
    "output"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8d89f36b-fc04-4d0c-b9c4-990b489b7fc3",
   "metadata": {},
   "source": [
    "## Test simple route chains"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "1d884bb7-7230-47cb-a778-36cffed1fcde",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from climateqa.engine.chains.answer_chitchat import make_chitchat_chain\n",
    "from climateqa.engine.chains.answer_ai_impact import make_ai_impact_chain\n",
    "\n",
    "chitchat_chain = make_chitchat_chain(llm)\n",
    "ai_impact_chain = make_ai_impact_chain(llm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "586a4ead-6064-42e8-9f3c-8973b8d754c6",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "L'impact environnemental de l'intelligence artificielle n'est pas couvert par les rapports du GIEC ou de l'IPBES. Cependant, il existe des recherches récentes sur ce sujet. Par exemple, vous pouvez consulter le travail de l'experte en IA et climat, Sasha Luccioni, qui a publié des articles sur l'empreinte carbone de l'IA, notamment sur le coût énergétique de l'inférence des modèles d'IA et sur l'estimation de l'empreinte carbone de l'entraînement de grands modèles de langage.\n",
      "\n",
      "Si vous souhaitez en savoir plus sur l'empreinte carbone de l'IA, je vous recommande de consulter les liens suivants :\n",
      "- \"Power Hungry Processing: Watts Driving the Cost of AI Deployment?\" - https://arxiv.org/abs/2311.16863\n",
      "- \"Counting Carbon: A Survey of Factors Influencing the Emissions of Machine Learning\" - https://arxiv.org/abs/2302.08476\n",
      "- \"Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Model\" - https://arxiv.org/abs/2211.02001\n",
      "\n",
      "De plus, il existe des outils tels que CodeCarbon (https://github.com/mlco2/codecarbon) pour mesurer l'empreinte carbone de votre code, et Ecologits (https://ecologits.ai/) pour mesurer l'empreinte carbone de l'utilisation des API de grands modèles de langage. Ces ressources pourraient vous aider à mieux comprendre l'impact environnemental de l'IA. Si vous souhaitez en savoir plus sur l'empreinte carbone de ClimateQ&A, vous pouvez consulter cette page : https://climateqa.com/docs/carbon-footprint/."
     ]
    }
   ],
   "source": [
    "async for event in ai_impact_chain.astream_events({\"question\":\"Mais c'est quoi l'empreinte carbone de cet outil, ça doit consommer pas mal ...\"},version = \"v1\"):\n",
    "    if event[\"event\"] == \"on_chain_stream\":\n",
    "        print(event[\"data\"][\"chunk\"],end = \"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "6f3a1c52-f92a-442b-9442-22415087da8b",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Je suis désolé, je ne peux répondre qu'aux questions liées à l'environnement et au climat. N'hésitez pas à poser une question sur ces sujets!"
     ]
    }
   ],
   "source": [
    "async for event in chitchat_chain.astream_events({\"question\":\"Vas y blbablablala\"},version = \"v1\"):\n",
    "    if event[\"event\"] == \"on_chain_stream\":\n",
    "        print(event[\"data\"][\"chunk\"],end = \"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "0e380744-e03d-408d-9282-3fcb6925413b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from langchain.schema import Document\n",
    "from langgraph.graph import END, StateGraph"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1788fbb7-90df-41e5-88c4-83c5e59fe23c",
   "metadata": {
    "tags": []
   },
   "source": [
    "## Retriever & Reranker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "cbe2f9f0-0c0b-46f8-929c-51a94eab5f22",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "96"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "query = \"Is global warming caused by humans?\"\n",
    "\n",
    "retriever = ClimateQARetriever(\n",
    "    vectorstore=vectorstore,\n",
    "    sources = [\"IPCC\"],\n",
    "    # reports = ias_reports,\n",
    "   min_size = 200,\n",
    "   k_summary = 5,k_total = 100,\n",
    "   threshold = 0.5,\n",
    ")\n",
    "\n",
    "docs_question = retriever.get_relevant_documents(query)\n",
    "len(docs_question)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "6e6892d2-a5bd-456a-8284-6e844d02af0e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: total: 1.97 s\n",
      "Wall time: 681 ms\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "from scipy.special import expit, logit\n",
    "\n",
    "def rerank_docs(reranker,docs,query):\n",
    "    \n",
    "    # Get a list of texts from langchain docs\n",
    "    input_docs = [x.page_content for x in docs]\n",
    "    \n",
    "    # Rerank using rerankers library\n",
    "    results = reranker.rank(query=query, docs=input_docs)\n",
    "\n",
    "    # Prepare langchain list of docs\n",
    "    docs_reranked = []\n",
    "    for result in results.results:\n",
    "        doc_id = result.document.doc_id\n",
    "        doc = docs[doc_id]\n",
    "        doc.metadata[\"rerank_score\"] = result.score\n",
    "        doc.metadata[\"query_used_for_retrieval\"] = query\n",
    "        docs_reranked.append(doc)\n",
    "    return docs_reranked\n",
    "\n",
    "docs_reranked = rerank_docs(reranker,docs_question,query)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "430209db-5ffb-4017-8ebd-12fee30df327",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Document(page_content='Observed Warming and its Causes\\nA.1 Human activities, principally through emissions of greenhouse gases, have unequivocally \\r\\ncaused global warming, with global surface temperature reaching 1.1degC above 1850-1900 \\r\\nin 2011-2020. Global greenhouse gas emissions have continued to increase, with unequal \\r\\nhistorical and ongoing contributions arising from unsustainable energy use, land use and \\r\\nland-use change, lifestyles and patterns of consumption and production across regions, \\r\\nbetween and within countries, and among individuals (high confidence). {2.1, Figure 2.1, \\r\\nFigure 2.2}', metadata={'chunk_type': 'text', 'document_id': 'document10', 'document_number': 10.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 36.0, 'name': 'Synthesis report of the IPCC Sixth Assesment Report AR6', 'num_characters': 587.0, 'num_tokens': 130.0, 'num_tokens_approx': 142.0, 'num_words': 107.0, 'page_number': 10, 'release_date': 2023.0, 'report_type': 'SPM', 'section_header': 'Observed Warming and its Causes', 'short_name': 'IPCC AR6 SYR', 'source': 'IPCC', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_SPM.pdf', 'similarity_score': 0.759439, 'content': 'Observed Warming and its Causes\\nA.1 Human activities, principally through emissions of greenhouse gases, have unequivocally \\r\\ncaused global warming, with global surface temperature reaching 1.1degC above 1850-1900 \\r\\nin 2011-2020. Global greenhouse gas emissions have continued to increase, with unequal \\r\\nhistorical and ongoing contributions arising from unsustainable energy use, land use and \\r\\nland-use change, lifestyles and patterns of consumption and production across regions, \\r\\nbetween and within countries, and among individuals (high confidence). {2.1, Figure 2.1, \\r\\nFigure 2.2}', 'rerank_score': 0.9993778467178345, 'query_used_for_retrieval': 'Is global warming caused by humans?'})"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "docs_reranked[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "5ed0b677-bcc4-48b0-bc99-2f515f2e7293",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[5, 5, 5]"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def divide_into_parts(target, parts):\n",
    "    # Base value for each part\n",
    "    base = target // parts\n",
    "    # Remainder to distribute\n",
    "    remainder = target % parts\n",
    "    # List to hold the result\n",
    "    result = []\n",
    "    \n",
    "    for i in range(parts):\n",
    "        if i < remainder:\n",
    "            # These parts get base value + 1\n",
    "            result.append(base + 1)\n",
    "        else:\n",
    "            # The rest get the base value\n",
    "            result.append(base)\n",
    "    \n",
    "    return result\n",
    "\n",
    "divide_into_parts(15,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1886fe98-4a29-4419-b436-adcbdbda35ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "questions = "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "4fca0c26-cc42-4f40-996a-c915b7c03a85",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "state = {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\",\n",
    " 'questions': [{'question': \"What role do cloud formations play in modulating the Earth's radiative balance?\",\n",
    "   'sources': ['IPCC']},\n",
    "  {'question': 'How are cloud formations represented in current climate models?',\n",
    "   'sources': ['IPCC']}]}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "28307adf-42bb-4067-a95d-c5c4867d2657",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "state = {'query': \"What does Morrison argue about the role of IK and LK ?\",\n",
    " 'questions': [{'question': \"How is the manga One Piece cited in the IPCC\",\n",
    "   'sources': ['IPCC']}]}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "id": "9daa8285-919b-4eab-b071-70ea866d473e",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import sys\n",
    "import os\n",
    "from contextlib import contextmanager\n",
    "\n",
    "@contextmanager\n",
    "def suppress_output():\n",
    "    # Open a null device\n",
    "    with open(os.devnull, 'w') as devnull:\n",
    "        # Store the original stdout and stderr\n",
    "        old_stdout = sys.stdout\n",
    "        old_stderr = sys.stderr\n",
    "        # Redirect stdout and stderr to the null device\n",
    "        sys.stdout = devnull\n",
    "        sys.stderr = devnull\n",
    "        try:\n",
    "            yield\n",
    "        finally:\n",
    "            # Restore stdout and stderr\n",
    "            sys.stdout = old_stdout\n",
    "            sys.stderr = old_stderr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "id": "4fc2efe2-783d-44ba-a246-2472ce6fd19b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "def retrieve_documents(state):\n",
    "    \n",
    "    POSSIBLE_SOURCES = [\"IPCC\",\"IPBES\",\"IPOS\",\"OpenAlex\"]\n",
    "    questions = state[\"questions\"]\n",
    "    \n",
    "    # Use sources from the user input or from the LLM detection\n",
    "    sources_input = state[\"sources_input\"] if \"sources_input\" in state else [\"auto\"]\n",
    "    auto_mode = \"auto\" in sources_input\n",
    "    \n",
    "    # Constants\n",
    "    k_final = 15\n",
    "    k_before_reranking = 100\n",
    "    k_summary = 5\n",
    "    rerank_by_question = True\n",
    "    \n",
    "    # There are several options to get the final top k\n",
    "    # Option 1 - Get 100 documents by question and rerank by question\n",
    "    # Option 2 - Get 100/n documents by question and rerank the total\n",
    "    if rerank_by_question:\n",
    "        k_by_question = divide_into_parts(k_final,len(questions))\n",
    "    \n",
    "    docs = []\n",
    "    \n",
    "    for i,q in enumerate(questions):\n",
    "        \n",
    "        sources = q[\"sources\"]\n",
    "        question = q[\"question\"]\n",
    "        \n",
    "        # If auto mode, we use the sources detected by the LLM\n",
    "        if auto_mode:\n",
    "            sources = [x for x in sources if x in POSSIBLE_SOURCES]\n",
    "            \n",
    "        # Otherwise, we use the config\n",
    "        else:\n",
    "            sources = sources_input\n",
    "            \n",
    "        # Search the document store using the retriever\n",
    "        # Configure high top k for further reranking step\n",
    "        retriever = ClimateQARetriever(\n",
    "            vectorstore=vectorstore,\n",
    "            sources = sources,\n",
    "            # reports = ias_reports,\n",
    "           min_size = 200,\n",
    "           k_summary = k_summary,k_total = k_before_reranking,\n",
    "           threshold = 0.5,\n",
    "        )\n",
    "        docs_question = retriever.get_relevant_documents(question)\n",
    "        \n",
    "        # Rerank\n",
    "        with suppress_output():\n",
    "            docs_question = rerank_docs(reranker,docs_question,question)\n",
    "        \n",
    "        # If rerank by question we select the top documents for each question\n",
    "        if rerank_by_question:\n",
    "            docs_question = docs_question[:k_by_question[i]]\n",
    "            \n",
    "        # Add sources used in the metadata\n",
    "        for doc in docs_question:\n",
    "            doc.metadata[\"sources_used\"] = sources\n",
    "        \n",
    "        # Add to the list of docs\n",
    "        docs.extend(docs_question)\n",
    "        \n",
    "    # Sorting the list in descending order by rerank_score\n",
    "    # Then select the top k\n",
    "    docs = sorted(docs, key=lambda x: x.metadata[\"rerank_score\"], reverse=True)\n",
    "    docs = docs[:k_final]\n",
    "    \n",
    "    new_state = {\"documents\":docs}\n",
    "    return new_state\n",
    "\n",
    "def search(state):\n",
    "    return {}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "id": "299cdae3-2e97-4e47-bad3-98643dfaf4ea",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: total: 1.64 s\n",
      "Wall time: 3.23 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "output = retrieve_documents(state)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "id": "638be0ea-bd41-45d7-ac7c-57ed789da3c5",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.20497774 0.20197058 0.20149879 0.16000335 0.1522842  0.14817041\n",
      " 0.14743239 0.1468197  0.14330755 0.13432105 0.12885363 0.12517229\n",
      " 0.12262824 0.12241826 0.12210386]\n",
      "0.15079746933333335\n"
     ]
    }
   ],
   "source": [
    "rerank_scores = np.array([doc.metadata[\"rerank_score\"] for doc in output[\"documents\"]])\n",
    "print(rerank_scores)\n",
    "print(np.mean(rerank_scores))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "id": "69ba19d3-97fb-4a23-99ee-c5827e0664e6",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "page_content='This Technical Summary should be cited as:\\nIPCC, 2019: Technical Summary [H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, E. Poloczanska, K. Mintenbeck, \\r\\nM. Tignor, A. Alegria, M. Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. In: IPCC Special Report on the \\r\\nOcean and Cryosphere in a Changing Climate [H.- O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, \\r\\nE. Poloczanska, K. Mintenbeck, A. Alegria, M. Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge \\r\\nUniversity Press, Cambridge, UK and New York, NY, USA, pp. 39-69. https://doi.org/10.1017/9781009157964.002' metadata={'chunk_type': 'text', 'document_id': 'document14', 'document_number': 14.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 34.0, 'name': 'Technical Summary. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 623.0, 'num_tokens': 237.0, 'num_tokens_approx': 250.0, 'num_words': 188.0, 'page_number': 4, 'release_date': 2019.0, 'report_type': 'TS', 'section_header': 'This Technical Summary should be cited as:', 'short_name': 'IPCC SR OC TS', 'source': 'IPCC', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/site/assets/uploads/sites/3/2022/03/02_SROCC_TS_FINAL.pdf', 'similarity_score': 0.611846924, 'content': 'This Technical Summary should be cited as:\\nIPCC, 2019: Technical Summary [H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, E. Poloczanska, K. Mintenbeck, \\r\\nM. Tignor, A. Alegria, M. Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. In: IPCC Special Report on the \\r\\nOcean and Cryosphere in a Changing Climate [H.- O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, \\r\\nE. Poloczanska, K. Mintenbeck, A. Alegria, M. Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge \\r\\nUniversity Press, Cambridge, UK and New York, NY, USA, pp. 39-69. https://doi.org/10.1017/9781009157964.002', 'rerank_score': 0.20497774, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This chapter should be cited as:\\nCabeza, L. F., Q. Bai, P. Bertoldi, J.M. Kihila, A.F.P. Lucena, E. Mata, S. Mirasgedis, A. Novikova, Y. Saheb, 2022: Buildings. \\r\\nIn IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working Group III to the Sixth \\r\\nAssessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, R. Slade, A. Al Khourdajie, \\r\\nR. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, A. Hasija, G. Lisboa, S. Luz, J. Malley, \\r\\n(eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. doi: 10.1017/9781009157926.011\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n953953' metadata={'chunk_type': 'text', 'document_id': 'document9', 'document_number': 9.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2258.0, 'name': 'Full Report. In: Climate Change 2022: Mitigation of Climate Change. Contribution of the WGIII to the AR6 of the IPCC', 'num_characters': 706.0, 'num_tokens': 248.0, 'num_tokens_approx': 261.0, 'num_words': 196.0, 'page_number': 966, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This chapter should be cited as:', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': 'References', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf', 'similarity_score': 0.603373706, 'content': 'This chapter should be cited as:\\nCabeza, L. F., Q. Bai, P. Bertoldi, J.M. Kihila, A.F.P. Lucena, E. Mata, S. Mirasgedis, A. Novikova, Y. Saheb, 2022: Buildings. \\r\\nIn IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working Group III to the Sixth \\r\\nAssessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, R. Slade, A. Al Khourdajie, \\r\\nR. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, A. Hasija, G. Lisboa, S. Luz, J. Malley, \\r\\n(eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. doi: 10.1017/9781009157926.011\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n953953', 'rerank_score': 0.20197058, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This chapter should be cited as:\\nBashmakov, I.A., L.J. Nilsson, A. Acquaye, C. Bataille, J.M. Cullen, S. de la Rue du Can, M. Fischedick, Y. Geng, K. Tanaka, \\r\\n2022: Industry. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working Group III \\r\\nto the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, R. Slade, \\r\\nA. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, A.  Hasija, \\r\\nG. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.013\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n11611161' metadata={'chunk_type': 'text', 'document_id': 'document9', 'document_number': 9.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2258.0, 'name': 'Full Report. In: Climate Change 2022: Mitigation of Climate Change. Contribution of the WGIII to the AR6 of the IPCC', 'num_characters': 724.0, 'num_tokens': 251.0, 'num_tokens_approx': 264.0, 'num_words': 198.0, 'page_number': 1174, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This chapter should be cited as:', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': 'Appendix 10.3: Line of Sight for Feasibility\\xa0Assessment', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf', 'similarity_score': 0.619030833, 'content': 'This chapter should be cited as:\\nBashmakov, I.A., L.J. Nilsson, A. Acquaye, C. Bataille, J.M. Cullen, S. de la Rue du Can, M. Fischedick, Y. Geng, K. Tanaka, \\r\\n2022: Industry. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working Group III \\r\\nto the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, R. Slade, \\r\\nA. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, A.  Hasija, \\r\\nG. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.013\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n11611161', 'rerank_score': 0.20149879, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This Annex should be cited as:\\nIPCC, 2022: Annex II: Glossary [Moller, V., R. van Diemen, J.B.R. Matthews, C. Mendez, S. Semenov, J.S. Fuglestvedt, \\r\\nA. Reisinger (eds.)]. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2897-2930, doi:10.1017/9781009325844.029.\\n <Section-header> This Annex should be cited as: </Section-header> \\n\\n28972897' metadata={'chunk_type': 'text', 'document_id': 'document6', 'document_number': 6.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 3068.0, 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 702.0, 'num_tokens': 239.0, 'num_tokens_approx': 250.0, 'num_words': 188.0, 'page_number': 2909, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This Annex should be cited as:', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Annexes', 'toc_level1': 'Annex II  Glossary', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.612448752, 'content': 'This Annex should be cited as:\\nIPCC, 2022: Annex II: Glossary [Moller, V., R. van Diemen, J.B.R. Matthews, C. Mendez, S. Semenov, J.S. Fuglestvedt, \\r\\nA. Reisinger (eds.)]. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2897-2930, doi:10.1017/9781009325844.029.\\n <Section-header> This Annex should be cited as: </Section-header> \\n\\n28972897', 'rerank_score': 0.16000335, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='Annex IX: Contributors \\r\\nto the IPCC WGI Sixth \\r\\nAssessment Report\\nThis annex should be cited as:\\nIPCC, 2021: Annex IX: Contributors to the IPCC Working Group I Sixth Assessment Report. In Climate Change 2021: The \\r\\nPhysical Science Basis. Contribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel \\r\\non Climate Change [Masson-Delmotte, V., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, \\r\\nM.I. Gomis, M. Huang, K. Leitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou \\r\\n(eds.)]. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA, pp. 2267-2286.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n22672267' metadata={'chunk_type': 'text', 'document_id': 'document2', 'document_number': 2.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2409.0, 'name': 'Full Report. In: Climate Change 2021: The Physical Science Basis. Contribution of the WGI to the AR6 of the IPCC', 'num_characters': 766.0, 'num_tokens': 233.0, 'num_tokens_approx': 260.0, 'num_words': 195.0, 'page_number': 2284, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': 'This annex should be cited as:', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': 'Annex IX: Contributors', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.652021468, 'content': 'Annex IX: Contributors \\r\\nto the IPCC WGI Sixth \\r\\nAssessment Report\\nThis annex should be cited as:\\nIPCC, 2021: Annex IX: Contributors to the IPCC Working Group I Sixth Assessment Report. In Climate Change 2021: The \\r\\nPhysical Science Basis. Contribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel \\r\\non Climate Change [Masson-Delmotte, V., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, \\r\\nM.I. Gomis, M. Huang, K. Leitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou \\r\\n(eds.)]. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA, pp. 2267-2286.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n22672267', 'rerank_score': 0.1522842, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This Summary for Policymakers should be cited as:\\nIPCC, 2019: Summary for Policymakers. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate \\r\\n[H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, E. Poloczanska, K. Mintenbeck, A. Alegria, \\r\\nM.  Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge University Press, Cambridge, UK and \\r\\nNew York, NY, USA, pp. 3-35. https://doi.org/10.1017/9781009157964.001. \\n <Section-header> This Summary for Policymakers should be cited as: </Section-header>' metadata={'chunk_type': 'text', 'document_id': 'document13', 'document_number': 13.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 36.0, 'name': 'Summary for Policymakers. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 548.0, 'num_tokens': 183.0, 'num_tokens_approx': 197.0, 'num_words': 148.0, 'page_number': 3, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'This Summary for Policymakers should be cited as:', 'short_name': 'IPCC SR OC SPM', 'source': 'IPCC', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/site/assets/uploads/sites/3/2022/03/01_SROCC_SPM_FINAL.pdf', 'similarity_score': 0.624829769, 'content': 'This Summary for Policymakers should be cited as:\\nIPCC, 2019: Summary for Policymakers. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate \\r\\n[H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, E. Poloczanska, K. Mintenbeck, A. Alegria, \\r\\nM.  Nicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge University Press, Cambridge, UK and \\r\\nNew York, NY, USA, pp. 3-35. https://doi.org/10.1017/9781009157964.001. \\n <Section-header> This Summary for Policymakers should be cited as: </Section-header>', 'rerank_score': 0.14817041, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='Annex VIII: Acronyms\\nThis annex should be cited as:\\nIPCC, 2021: Annex VIII: Acronyms. In Climate Change 2021: The Physical Science Basis. Contribution of Working \\r\\nGroup I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [Masson-Delmotte, \\r\\nV., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, M.I. Gomis, M.  Huang, K. \\r\\nLeitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou (eds.)]. Cambridge \\r\\nUniversity Press, Cambridge, United Kingdom and New York, NY, USA, pp. 2257-2266.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n22572257' metadata={'chunk_type': 'text', 'document_id': 'document2', 'document_number': 2.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2409.0, 'name': 'Full Report. In: Climate Change 2021: The Physical Science Basis. Contribution of the WGI to the AR6 of the IPCC', 'num_characters': 667.0, 'num_tokens': 218.0, 'num_tokens_approx': 238.0, 'num_words': 179.0, 'page_number': 2274, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': 'land-use-land-use-change-and-forestry-lulucf/reporting-and-accounting\\x02of-lulucf-activities-under-the-kyoto-protocol.', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': 'Annex VIII: Acronyms', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.595291555, 'content': 'Annex VIII: Acronyms\\nThis annex should be cited as:\\nIPCC, 2021: Annex VIII: Acronyms. In Climate Change 2021: The Physical Science Basis. Contribution of Working \\r\\nGroup I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [Masson-Delmotte, \\r\\nV., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, M.I. Gomis, M.  Huang, K. \\r\\nLeitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou (eds.)]. Cambridge \\r\\nUniversity Press, Cambridge, United Kingdom and New York, NY, USA, pp. 2257-2266.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n22572257', 'rerank_score': 0.14743239, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This annex should be cited as:\\nIPCC, 2022: Annex I: Global to Regional Atlas [Portner, H.-O., A. Alegria, V. Moller, E.S. Poloczanska, K. Mintenbeck, \\r\\nS. Gotze (eds.)]. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2811-2896, doi:10.1017/9781009325844.028.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n28112811' metadata={'chunk_type': 'text', 'document_id': 'document6', 'document_number': 6.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 3068.0, 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 700.0, 'num_tokens': 235.0, 'num_tokens_approx': 245.0, 'num_words': 184.0, 'page_number': 2823, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This annex should be cited as:', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Annexes', 'toc_level1': 'Annex I  Global to Regional Atlas', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.626139402, 'content': 'This annex should be cited as:\\nIPCC, 2022: Annex I: Global to Regional Atlas [Portner, H.-O., A. Alegria, V. Moller, E.S. Poloczanska, K. Mintenbeck, \\r\\nS. Gotze (eds.)]. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2811-2896, doi:10.1017/9781009325844.028.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n28112811', 'rerank_score': 0.1468197, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This chapter should be cited as:\\nIPCC, 2022: Annex I: Glossary [van Diemen, R., J.B.R. Matthews, V. Moller, J.S. Fuglestvedt, V. Masson-Delmotte, \\r\\nC.  Mendez, A. Reisinger, S. Semenov (eds)]. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. \\r\\nContribution of Working Group III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change\\r\\n[P.R. Shukla, J. Skea, R. Slade, A. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, \\r\\nM. Belkacemi, A. Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, \\r\\nNY, USA. doi: 10.1017/9781009157926.020' metadata={'chunk_type': 'text', 'document_id': 'document9', 'document_number': 9.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2258.0, 'name': 'Full Report. In: Climate Change 2022: Mitigation of Climate Change. Contribution of the WGIII to the AR6 of the IPCC', 'num_characters': 659.0, 'num_tokens': 235.0, 'num_tokens_approx': 242.0, 'num_words': 182.0, 'page_number': 1806, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This chapter should be cited as:', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': '_Hlk111724995', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf', 'similarity_score': 0.608979702, 'content': 'This chapter should be cited as:\\nIPCC, 2022: Annex I: Glossary [van Diemen, R., J.B.R. Matthews, V. Moller, J.S. Fuglestvedt, V. Masson-Delmotte, \\r\\nC.  Mendez, A. Reisinger, S. Semenov (eds)]. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. \\r\\nContribution of Working Group III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change\\r\\n[P.R. Shukla, J. Skea, R. Slade, A. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, \\r\\nM. Belkacemi, A. Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, \\r\\nNY, USA. doi: 10.1017/9781009157926.020', 'rerank_score': 0.14330755, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This annex should be cited as:\\nIPCC, 2022: Annex III: Acronyms. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of \\r\\nWorking Group II to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, \\r\\nD.C. Roberts, M. Tignor, E.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, \\r\\nA. Okem, B. Rama (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2931-2938, \\r\\ndoi:10.1017/9781009325844.030. \\n <Section-header> This annex should be cited as: </Section-header> \\n\\n29312931' metadata={'chunk_type': 'text', 'document_id': 'document6', 'document_number': 6.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 3068.0, 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 597.0, 'num_tokens': 194.0, 'num_tokens_approx': 201.0, 'num_words': 151.0, 'page_number': 2943, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This annex should be cited as:', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Annexes', 'toc_level1': 'Annex III  Acronyms', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.598234832, 'content': 'This annex should be cited as:\\nIPCC, 2022: Annex III: Acronyms. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of \\r\\nWorking Group II to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, \\r\\nD.C. Roberts, M. Tignor, E.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, \\r\\nA. Okem, B. Rama (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA, pp. 2931-2938, \\r\\ndoi:10.1017/9781009325844.030. \\n <Section-header> This annex should be cited as: </Section-header> \\n\\n29312931', 'rerank_score': 0.13432105, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This annex should be cited as:\\nIPCC, 2021: Annex V: Monsoons [Cherchi, A., A. Turner (eds.)]. In Climate Change 2021: The Physical Science Basis. \\r\\nContribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change\\r\\n[Masson-Delmotte, V., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, M.I. Gomis, M. Huang, \\r\\nK. Leitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou (eds.)]. Cambridge University \\r\\nPress, Cambridge, United Kingdom and New York, NY, USA, pp. 2193-2204, doi:10.1017/9781009157896.019.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n21932193' metadata={'chunk_type': 'text', 'document_id': 'document2', 'document_number': 2.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2409.0, 'name': 'Full Report. In: Climate Change 2021: The Physical Science Basis. Contribution of the WGI to the AR6 of the IPCC', 'num_characters': 704.0, 'num_tokens': 238.0, 'num_tokens_approx': 260.0, 'num_words': 195.0, 'page_number': 2210, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': 'This annex should be cited as:', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': 'Annex V: Monsoons', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.621438146, 'content': 'This annex should be cited as:\\nIPCC, 2021: Annex V: Monsoons [Cherchi, A., A. Turner (eds.)]. In Climate Change 2021: The Physical Science Basis. \\r\\nContribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change\\r\\n[Masson-Delmotte, V., P. Zhai, A. Pirani, S.L. Connors, C. Pean, S. Berger, N. Caud, Y. Chen, L. Goldfarb, M.I. Gomis, M. Huang, \\r\\nK. Leitzell, E. Lonnoy, J.B.R. Matthews, T.K. Maycock, T. Waterfield, O. Yelekci, R. Yu, and B. Zhou (eds.)]. Cambridge University \\r\\nPress, Cambridge, United Kingdom and New York, NY, USA, pp. 2193-2204, doi:10.1017/9781009157896.019.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n21932193', 'rerank_score': 0.12885363, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This annex should be cited as:\\nIPCC, 2019: Annex I: Glossary [Weyer, N.M. (ed.)]. In: IPCC Special Report on the Ocean and Cryosphere in a Changing \\r\\nClimate [H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, E. Poloczanska, K. Mintenbeck, A. Alegria, M. \\r\\nNicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, \\r\\nUSA, pp. 677-702. https://doi.org/10.1017/9781009157964.010.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n677677' metadata={'chunk_type': 'text', 'document_id': 'document22', 'document_number': 22.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 28.0, 'name': 'Annex I: Glossary In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 533.0, 'num_tokens': 188.0, 'num_tokens_approx': 206.0, 'num_words': 155.0, 'page_number': 3, 'release_date': 2019.0, 'report_type': 'Special Report', 'section_header': 'This annex should be cited as:', 'short_name': 'IPCC SR OC A1 G', 'source': 'IPCC', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/site/assets/uploads/sites/3/2022/03/10_SROCC_AnnexI-Glossary_FINAL.pdf', 'similarity_score': 0.644453526, 'content': 'This annex should be cited as:\\nIPCC, 2019: Annex I: Glossary [Weyer, N.M. (ed.)]. In: IPCC Special Report on the Ocean and Cryosphere in a Changing \\r\\nClimate [H.-O. Portner, D.C. Roberts, V. Masson-Delmotte, P. Zhai, M. Tignor, E. Poloczanska, K. Mintenbeck, A. Alegria, M. \\r\\nNicolai, A. Okem, J. Petzold, B. Rama, N.M. Weyer (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, \\r\\nUSA, pp. 677-702. https://doi.org/10.1017/9781009157964.010.\\n <Section-header> This annex should be cited as: </Section-header> \\n\\n677677', 'rerank_score': 0.12517229, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This index should be cited as:\\nIPCC, 2022: Index. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 3005-3056, doi:10.1017/9781009325844.033. \\n <Section-header> This index should be cited as: </Section-header> \\n\\n30053005' metadata={'chunk_type': 'text', 'document_id': 'document6', 'document_number': 6.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 3068.0, 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 581.0, 'num_tokens': 189.0, 'num_tokens_approx': 197.0, 'num_words': 148.0, 'page_number': 3017, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This index should be cited as:', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Index', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.616092443, 'content': 'This index should be cited as:\\nIPCC, 2022: Index. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of Working Group II to \\r\\nthe Sixth Assessment Report of the Intergovernmental Panel on Climate Change [H.-O. Portner, D.C. Roberts, M. Tignor, \\r\\nE.S. Poloczanska, K. Mintenbeck, A. Alegria, M. Craig, S. Langsdorf, S. Loschke, V. Moller, A. Okem, B. Rama (eds.)]. \\r\\nCambridge University Press, Cambridge, UK and New York, NY, USA, pp. 3005-3056, doi:10.1017/9781009325844.033. \\n <Section-header> This index should be cited as: </Section-header> \\n\\n30053005', 'rerank_score': 0.12262824, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This chapter should be cited as:\\nIPCC, 2022: Index. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working \\r\\nGroup III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, \\r\\nR. Slade, A.  Al  Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, \\r\\nA.  Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.026\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n19791979' metadata={'chunk_type': 'text', 'document_id': 'document9', 'document_number': 9.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2258.0, 'name': 'Full Report. In: Climate Change 2022: Mitigation of Climate Change. Contribution of the WGIII to the AR6 of the IPCC', 'num_characters': 602.0, 'num_tokens': 199.0, 'num_tokens_approx': 205.0, 'num_words': 154.0, 'page_number': 1992, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This chapter should be cited as:', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': 'References', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf', 'similarity_score': 0.614085197, 'content': 'This chapter should be cited as:\\nIPCC, 2022: Index. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of Working \\r\\nGroup III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, J. Skea, \\r\\nR. Slade, A.  Al  Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, \\r\\nA.  Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.026\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n19791979', 'rerank_score': 0.12241826, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n",
      "page_content='This chapter should be cited as:\\nGrubb, M., C. Okereke, J. Arima, V. Bosetti, Y. Chen, J. Edmonds, S. Gupta, A. Koberle, S. Kverndokk, A. Malik, L. Sulistiawati, \\r\\n2022: Introduction and Framing. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of \\r\\nWorking Group III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, \\r\\nJ. Skea, R. Slade, A. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, \\r\\nA. Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.003\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n151151' metadata={'chunk_type': 'text', 'document_id': 'document9', 'document_number': 9.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 2258.0, 'name': 'Full Report. In: Climate Change 2022: Mitigation of Climate Change. Contribution of the WGIII to the AR6 of the IPCC', 'num_characters': 741.0, 'num_tokens': 254.0, 'num_tokens_approx': 264.0, 'num_words': 198.0, 'page_number': 164, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'This chapter should be cited as:', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': 'TS.7 Mitigation in the Context of\\xa0Sustainable\\xa0Development', 'toc_level1': 'Box TS.15 | A Harmonised Approach to Assessing Feasibility', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf', 'similarity_score': 0.603973, 'content': 'This chapter should be cited as:\\nGrubb, M., C. Okereke, J. Arima, V. Bosetti, Y. Chen, J. Edmonds, S. Gupta, A. Koberle, S. Kverndokk, A. Malik, L. Sulistiawati, \\r\\n2022: Introduction and Framing. In IPCC, 2022: Climate Change 2022: Mitigation of Climate Change. Contribution of \\r\\nWorking Group III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [P.R. Shukla, \\r\\nJ. Skea, R. Slade, A. Al Khourdajie, R. van Diemen, D. McCollum, M. Pathak, S. Some, P. Vyas, R. Fradera, M. Belkacemi, \\r\\nA. Hasija, G. Lisboa, S. Luz, J. Malley, (eds.)]. Cambridge University Press, Cambridge, UK and New York, NY, USA. \\r\\ndoi: 10.1017/9781009157926.003\\n <Section-header> This chapter should be cited as: </Section-header> \\n\\n151151', 'rerank_score': 0.12210386, 'query_used_for_retrieval': 'How is the manga One Piece cited in the IPCC', 'sources_used': ['IPCC']}\n",
      "\n"
     ]
    }
   ],
   "source": [
    "for doc in output[\"documents\"]:\n",
    "    print(doc)\n",
    "    print(\"\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5ef9b1be-d913-4dbd-ad67-b87c4e948d11",
   "metadata": {},
   "source": [
    "## Create the RAG"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b4638a7a-08c4-4259-a2de-77d1eb45a47c",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# async def answer_ai_impact(state,config):\n",
    "#     answer = await ai_impact_chain.ainvoke({\"question\":state[\"user_input\"]},config)\n",
    "#     return {\"answer\":answer}\n",
    "            \n",
    "async def answer_rag(state):\n",
    "    \n",
    "    # Get the docs\n",
    "    docs = state[\"documents\"]\n",
    "    \n",
    "    # Compute the trust average score\n",
    "    rerank_scores = np.array([doc.metadata[\"rerank_score\"] for doc in docs])\n",
    "    trust_score = np.mean(rerank_scores)\n",
    "    \n",
    "    # \n",
    "    answer = \"\\n\".join([x[\"question\"] for x in state[\"questions\"]])\n",
    "    return {\"answer\":answer}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "827873ee-f74d-4ed6-a4f8-fc8a3ef6aea8",
   "metadata": {
    "tags": []
   },
   "source": [
    "## Test the graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "a24b8dd3-54b7-4209-a532-c3d6dfd1530d",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'event': 'on_chain_start', 'run_id': '54411858-94b4-423d-933e-45e86a7d6c4b', 'name': 'LangGraph', 'tags': [], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'sources': ['auto']}}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': '__start__', 'run_id': '96e10c35-0088-454b-928c-8eda40e544a9', 'tags': ['graph:step:0', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'sources': ['auto']}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': '__start__', 'run_id': '96e10c35-0088-454b-928c-8eda40e544a9', 'tags': ['graph:step:0', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'sources': ['auto']}, 'output': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'sources': ['auto']}}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': 'route_input_message', 'run_id': 'c5328959-b052-4920-a538-fb9a9f482ccb', 'tags': ['graph:step:1'], 'metadata': {}, 'data': {}}\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CATEGORIZE {'intent': 'search', 'language': 'English'}\n",
      "{'event': 'on_chain_start', 'name': 'ChannelWrite<route_input_message,user_input,language,intent,query,questions,answer,audience,sources_input>', 'run_id': '09cda419-7333-4bf6-aeb7-385ee456f1d9', 'tags': ['seq:step:2', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'ChannelWrite<route_input_message,user_input,language,intent,query,questions,answer,audience,sources_input>', 'run_id': '09cda419-7333-4bf6-aeb7-385ee456f1d9', 'tags': ['seq:step:2', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'intent': 'search', 'language': 'English'}, 'output': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': 'route_entry_point', 'run_id': '478ecc36-08b2-4732-8e70-6efc0fcfc22f', 'tags': ['seq:step:3'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'language': 'English', 'intent': 'search'}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'route_entry_point', 'run_id': '478ecc36-08b2-4732-8e70-6efc0fcfc22f', 'tags': ['seq:step:3'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'language': 'English', 'intent': 'search'}, 'output': 'transform_query'}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': 'ChannelWrite<branch:route_input_message:route_entry_point:transform_query>', 'run_id': '32752ceb-d15d-4ae3-aaf6-639f5564f559', 'tags': ['seq:step:3', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'ChannelWrite<branch:route_input_message:route_entry_point:transform_query>', 'run_id': '32752ceb-d15d-4ae3-aaf6-639f5564f559', 'tags': ['seq:step:3', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'intent': 'search', 'language': 'English'}, 'output': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_stream', 'name': 'route_input_message', 'run_id': 'c5328959-b052-4920-a538-fb9a9f482ccb', 'tags': ['graph:step:1'], 'metadata': {}, 'data': {'chunk': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'route_input_message', 'run_id': 'c5328959-b052-4920-a538-fb9a9f482ccb', 'tags': ['graph:step:1'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'language': None, 'intent': None, 'query': None, 'questions': None, 'answer': None, 'audience': None, 'sources_input': None}, 'output': {'intent': 'search', 'language': 'English'}}}\n",
      "\n",
      "{'event': 'on_chain_stream', 'run_id': '54411858-94b4-423d-933e-45e86a7d6c4b', 'tags': [], 'metadata': {}, 'name': 'LangGraph', 'data': {'chunk': {'route_input_message': {'language': 'English', 'intent': 'search'}}}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': 'transform_query', 'run_id': 'debea710-be86-44af-a6ef-094ea95d5a3d', 'tags': ['graph:step:2'], 'metadata': {}, 'data': {}}\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
      "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'event': 'on_chain_start', 'name': 'ChannelWrite<transform_query,user_input,language,intent,query,questions,answer,audience,sources_input>', 'run_id': 'f0d11fc9-cdc0-4c51-8576-4fa59b668d17', 'tags': ['seq:step:2', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'ChannelWrite<transform_query,user_input,language,intent,query,questions,answer,audience,sources_input>', 'run_id': 'f0d11fc9-cdc0-4c51-8576-4fa59b668d17', 'tags': ['seq:step:2', 'langsmith:hidden'], 'metadata': {}, 'data': {'input': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}, 'output': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}}}\n",
      "\n",
      "{'event': 'on_chain_stream', 'name': 'transform_query', 'run_id': 'debea710-be86-44af-a6ef-094ea95d5a3d', 'tags': ['graph:step:2'], 'metadata': {}, 'data': {'chunk': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'transform_query', 'run_id': 'debea710-be86-44af-a6ef-094ea95d5a3d', 'tags': ['graph:step:2'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'language': 'English', 'intent': 'search', 'query': None, 'questions': None, 'answer': None, 'audience': None, 'sources_input': None}, 'output': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}}}\n",
      "\n",
      "{'event': 'on_chain_stream', 'run_id': '54411858-94b4-423d-933e-45e86a7d6c4b', 'tags': [], 'metadata': {}, 'name': 'LangGraph', 'data': {'chunk': {'transform_query': {'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}]}}}}\n",
      "\n",
      "{'event': 'on_chain_start', 'name': 'retrieve_documents', 'run_id': '6aee01df-8b06-47d5-b338-b774c7b76641', 'tags': ['graph:step:3'], 'metadata': {}, 'data': {}}\n",
      "\n",
      "{'event': 'on_chain_end', 'name': 'retrieve_documents', 'run_id': '6aee01df-8b06-47d5-b338-b774c7b76641', 'tags': ['graph:step:3'], 'metadata': {}, 'data': {'input': {'user_input': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'language': 'English', 'intent': 'search', 'query': \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\", 'questions': [{'question': 'What are the main factors contributing to climate change?', 'sources': ['IPCC']}, {'question': 'How does human activity impact biodiversity?', 'sources': ['IPBES']}, {'question': 'What are the key findings of the latest IPCC report?', 'sources': ['IPCC']}], 'answer': None, 'audience': None, 'sources_input': None}, 'output': None}}\n",
      "\n"
     ]
    },
    {
     "ename": "TypeError",
     "evalue": "argument of type 'NoneType' is not iterable",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[105], line 6\u001b[0m\n\u001b[0;32m      3\u001b[0m question \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mC\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mest quoi l\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mimpact de ChatGPT ?\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m      4\u001b[0m question \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mI am not really sure what you mean. What role do cloud formations play in modulating the Earth\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124ms radiative balance, and how are they represented in current climate models?\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m----> 6\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m event \u001b[38;5;129;01min\u001b[39;00m app\u001b[38;5;241m.\u001b[39mastream_events({\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124muser_input\u001b[39m\u001b[38;5;124m\"\u001b[39m: question,\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msources\u001b[39m\u001b[38;5;124m\"\u001b[39m:[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mauto\u001b[39m\u001b[38;5;124m\"\u001b[39m]}, version\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mv1\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[0;32m      7\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chat_model_stream\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m      8\u001b[0m         token \u001b[38;5;241m=\u001b[39m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m\"\u001b[39m][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mchunk\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m.\u001b[39mcontent\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:1131\u001b[0m, in \u001b[0;36mRunnable.astream_events\u001b[1;34m(self, input, config, version, include_names, include_types, include_tags, exclude_names, exclude_types, exclude_tags, **kwargs)\u001b[0m\n\u001b[0;32m   1126\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m   1127\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m(\n\u001b[0;32m   1128\u001b[0m         \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mOnly versions \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mv1\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m and \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mv2\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m of the schema is currently supported.\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m   1129\u001b[0m     )\n\u001b[1;32m-> 1131\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m event \u001b[38;5;129;01min\u001b[39;00m event_stream:\n\u001b[0;32m   1132\u001b[0m     \u001b[38;5;28;01myield\u001b[39;00m event\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\tracers\\event_stream.py:570\u001b[0m, in \u001b[0;36m_astream_events_implementation_v1\u001b[1;34m(runnable, input, config, include_names, include_types, include_tags, exclude_names, exclude_types, exclude_tags, **kwargs)\u001b[0m\n\u001b[0;32m    566\u001b[0m root_name \u001b[38;5;241m=\u001b[39m config\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrun_name\u001b[39m\u001b[38;5;124m\"\u001b[39m, runnable\u001b[38;5;241m.\u001b[39mget_name())\n\u001b[0;32m    568\u001b[0m \u001b[38;5;66;03m# Ignoring mypy complaint about too many different union combinations\u001b[39;00m\n\u001b[0;32m    569\u001b[0m \u001b[38;5;66;03m# This arises because many of the argument types are unions\u001b[39;00m\n\u001b[1;32m--> 570\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m log \u001b[38;5;129;01min\u001b[39;00m _astream_log_implementation(  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[0;32m    571\u001b[0m     runnable,\n\u001b[0;32m    572\u001b[0m     \u001b[38;5;28minput\u001b[39m,\n\u001b[0;32m    573\u001b[0m     config\u001b[38;5;241m=\u001b[39mconfig,\n\u001b[0;32m    574\u001b[0m     stream\u001b[38;5;241m=\u001b[39mstream,\n\u001b[0;32m    575\u001b[0m     diff\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m,\n\u001b[0;32m    576\u001b[0m     with_streamed_output_list\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m,\n\u001b[0;32m    577\u001b[0m     \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[0;32m    578\u001b[0m ):\n\u001b[0;32m    579\u001b[0m     run_log \u001b[38;5;241m=\u001b[39m run_log \u001b[38;5;241m+\u001b[39m log\n\u001b[0;32m    581\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m encountered_start_event:\n\u001b[0;32m    582\u001b[0m         \u001b[38;5;66;03m# Yield the start event for the root runnable.\u001b[39;00m\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\tracers\\log_stream.py:617\u001b[0m, in \u001b[0;36m_astream_log_implementation\u001b[1;34m(runnable, input, config, stream, diff, with_streamed_output_list, **kwargs)\u001b[0m\n\u001b[0;32m    614\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m    615\u001b[0m     \u001b[38;5;66;03m# Wait for the runnable to finish, if not cancelled (eg. by break)\u001b[39;00m\n\u001b[0;32m    616\u001b[0m     \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 617\u001b[0m         \u001b[38;5;28;01mawait\u001b[39;00m task\n\u001b[0;32m    618\u001b[0m     \u001b[38;5;28;01mexcept\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mCancelledError:\n\u001b[0;32m    619\u001b[0m         \u001b[38;5;28;01mpass\u001b[39;00m\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\tracers\\log_stream.py:571\u001b[0m, in \u001b[0;36m_astream_log_implementation.<locals>.consume_astream\u001b[1;34m()\u001b[0m\n\u001b[0;32m    568\u001b[0m prev_final_output: Optional[Output] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m    569\u001b[0m final_output: Optional[Output] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m--> 571\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m chunk \u001b[38;5;129;01min\u001b[39;00m runnable\u001b[38;5;241m.\u001b[39mastream(\u001b[38;5;28minput\u001b[39m, config, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m    572\u001b[0m     prev_final_output \u001b[38;5;241m=\u001b[39m final_output\n\u001b[0;32m    573\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m final_output \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langgraph\\pregel\\__init__.py:1208\u001b[0m, in \u001b[0;36mPregel.astream\u001b[1;34m(self, input, config, stream_mode, output_keys, input_keys, interrupt_before, interrupt_after, debug)\u001b[0m\n\u001b[0;32m   1206\u001b[0m     \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[0;32m   1207\u001b[0m \u001b[38;5;66;03m# wait for all background tasks to finish\u001b[39;00m\n\u001b[1;32m-> 1208\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mgather(\u001b[38;5;241m*\u001b[39mbg)\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langgraph\\pregel\\__init__.py:1107\u001b[0m, in \u001b[0;36mPregel.astream\u001b[1;34m(self, input, config, stream_mode, output_keys, input_keys, interrupt_before, interrupt_after, debug)\u001b[0m\n\u001b[0;32m   1100\u001b[0m done, inflight \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mwait(\n\u001b[0;32m   1101\u001b[0m     futures,\n\u001b[0;32m   1102\u001b[0m     return_when\u001b[38;5;241m=\u001b[39masyncio\u001b[38;5;241m.\u001b[39mFIRST_EXCEPTION,\n\u001b[0;32m   1103\u001b[0m     timeout\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstep_timeout,\n\u001b[0;32m   1104\u001b[0m )\n\u001b[0;32m   1106\u001b[0m \u001b[38;5;66;03m# panic on failure or timeout\u001b[39;00m\n\u001b[1;32m-> 1107\u001b[0m \u001b[43m_panic_or_proceed\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdone\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43minflight\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstep\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m   1109\u001b[0m \u001b[38;5;66;03m# combine pending writes from all tasks\u001b[39;00m\n\u001b[0;32m   1110\u001b[0m pending_writes \u001b[38;5;241m=\u001b[39m deque[\u001b[38;5;28mtuple\u001b[39m[\u001b[38;5;28mstr\u001b[39m, Any]]()\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langgraph\\pregel\\__init__.py:1334\u001b[0m, in \u001b[0;36m_panic_or_proceed\u001b[1;34m(done, inflight, step)\u001b[0m\n\u001b[0;32m   1332\u001b[0m             inflight\u001b[38;5;241m.\u001b[39mpop()\u001b[38;5;241m.\u001b[39mcancel()\n\u001b[0;32m   1333\u001b[0m         \u001b[38;5;66;03m# raise the exception\u001b[39;00m\n\u001b[1;32m-> 1334\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m exc\n\u001b[0;32m   1336\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m inflight:\n\u001b[0;32m   1337\u001b[0m     \u001b[38;5;66;03m# if we got here means we timed out\u001b[39;00m\n\u001b[0;32m   1338\u001b[0m     \u001b[38;5;28;01mwhile\u001b[39;00m inflight:\n\u001b[0;32m   1339\u001b[0m         \u001b[38;5;66;03m# cancel all pending tasks\u001b[39;00m\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langgraph\\pregel\\retry.py:111\u001b[0m, in \u001b[0;36marun_with_retry\u001b[1;34m(task, retry_policy, stream)\u001b[0m\n\u001b[0;32m    109\u001b[0m \u001b[38;5;66;03m# run the task\u001b[39;00m\n\u001b[0;32m    110\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m stream:\n\u001b[1;32m--> 111\u001b[0m     \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m _ \u001b[38;5;129;01min\u001b[39;00m task\u001b[38;5;241m.\u001b[39mproc\u001b[38;5;241m.\u001b[39mastream(task\u001b[38;5;241m.\u001b[39minput, task\u001b[38;5;241m.\u001b[39mconfig):\n\u001b[0;32m    112\u001b[0m         \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[0;32m    113\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:2769\u001b[0m, in \u001b[0;36mRunnableSequence.astream\u001b[1;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[0;32m   2766\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21minput_aiter\u001b[39m() \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m AsyncIterator[Input]:\n\u001b[0;32m   2767\u001b[0m     \u001b[38;5;28;01myield\u001b[39;00m \u001b[38;5;28minput\u001b[39m\n\u001b[1;32m-> 2769\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m chunk \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39matransform(input_aiter(), config, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m   2770\u001b[0m     \u001b[38;5;28;01myield\u001b[39;00m chunk\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:2752\u001b[0m, in \u001b[0;36mRunnableSequence.atransform\u001b[1;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[0;32m   2746\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21matransform\u001b[39m(\n\u001b[0;32m   2747\u001b[0m     \u001b[38;5;28mself\u001b[39m,\n\u001b[0;32m   2748\u001b[0m     \u001b[38;5;28minput\u001b[39m: AsyncIterator[Input],\n\u001b[0;32m   2749\u001b[0m     config: Optional[RunnableConfig] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m   2750\u001b[0m     \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs: Optional[Any],\n\u001b[0;32m   2751\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m AsyncIterator[Output]:\n\u001b[1;32m-> 2752\u001b[0m     \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m chunk \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_atransform_stream_with_config(\n\u001b[0;32m   2753\u001b[0m         \u001b[38;5;28minput\u001b[39m,\n\u001b[0;32m   2754\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_atransform,\n\u001b[0;32m   2755\u001b[0m         patch_config(config, run_name\u001b[38;5;241m=\u001b[39m(config \u001b[38;5;129;01mor\u001b[39;00m {})\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrun_name\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname),\n\u001b[0;32m   2756\u001b[0m         \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[0;32m   2757\u001b[0m     ):\n\u001b[0;32m   2758\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m chunk\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:1854\u001b[0m, in \u001b[0;36mRunnable._atransform_stream_with_config\u001b[1;34m(self, input, transformer, config, run_type, **kwargs)\u001b[0m\n\u001b[0;32m   1849\u001b[0m     chunk: Output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mcreate_task(  \u001b[38;5;66;03m# type: ignore[call-arg]\u001b[39;00m\n\u001b[0;32m   1850\u001b[0m         py_anext(iterator),  \u001b[38;5;66;03m# type: ignore[arg-type]\u001b[39;00m\n\u001b[0;32m   1851\u001b[0m         context\u001b[38;5;241m=\u001b[39mcontext,\n\u001b[0;32m   1852\u001b[0m     )\n\u001b[0;32m   1853\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m-> 1854\u001b[0m     chunk \u001b[38;5;241m=\u001b[39m cast(Output, \u001b[38;5;28;01mawait\u001b[39;00m py_anext(iterator))\n\u001b[0;32m   1855\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m chunk\n\u001b[0;32m   1856\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m final_output_supported:\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\tracers\\log_stream.py:238\u001b[0m, in \u001b[0;36mLogStreamCallbackHandler.tap_output_aiter\u001b[1;34m(self, run_id, output)\u001b[0m\n\u001b[0;32m    234\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mtap_output_aiter\u001b[39m(\n\u001b[0;32m    235\u001b[0m     \u001b[38;5;28mself\u001b[39m, run_id: UUID, output: AsyncIterator[T]\n\u001b[0;32m    236\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m AsyncIterator[T]:\n\u001b[0;32m    237\u001b[0m \u001b[38;5;250m    \u001b[39m\u001b[38;5;124;03m\"\"\"Tap an output async iterator to stream its values to the log.\"\"\"\u001b[39;00m\n\u001b[1;32m--> 238\u001b[0m     \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m chunk \u001b[38;5;129;01min\u001b[39;00m output:\n\u001b[0;32m    239\u001b[0m         \u001b[38;5;66;03m# root run is handled in .astream_log()\u001b[39;00m\n\u001b[0;32m    240\u001b[0m         \u001b[38;5;28;01mif\u001b[39;00m run_id \u001b[38;5;241m!=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mroot_id:\n\u001b[0;32m    241\u001b[0m             \u001b[38;5;66;03m# if we can't find the run silently ignore\u001b[39;00m\n\u001b[0;32m    242\u001b[0m             \u001b[38;5;66;03m# eg. because this run wasn't included in the log\u001b[39;00m\n\u001b[0;32m    243\u001b[0m             \u001b[38;5;28;01mif\u001b[39;00m key \u001b[38;5;241m:=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_key_map_by_run_id\u001b[38;5;241m.\u001b[39mget(run_id):\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:2722\u001b[0m, in \u001b[0;36mRunnableSequence._atransform\u001b[1;34m(self, input, run_manager, config)\u001b[0m\n\u001b[0;32m   2714\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m step \u001b[38;5;129;01min\u001b[39;00m steps:\n\u001b[0;32m   2715\u001b[0m     final_pipeline \u001b[38;5;241m=\u001b[39m step\u001b[38;5;241m.\u001b[39matransform(\n\u001b[0;32m   2716\u001b[0m         final_pipeline,\n\u001b[0;32m   2717\u001b[0m         patch_config(\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m   2720\u001b[0m         ),\n\u001b[0;32m   2721\u001b[0m     )\n\u001b[1;32m-> 2722\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m output \u001b[38;5;129;01min\u001b[39;00m final_pipeline:\n\u001b[0;32m   2723\u001b[0m     \u001b[38;5;28;01myield\u001b[39;00m output\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:1182\u001b[0m, in \u001b[0;36mRunnable.atransform\u001b[1;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[0;32m   1179\u001b[0m final: Input\n\u001b[0;32m   1180\u001b[0m got_first_val \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m-> 1182\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m ichunk \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28minput\u001b[39m:\n\u001b[0;32m   1183\u001b[0m     \u001b[38;5;66;03m# The default implementation of transform is to buffer input and\u001b[39;00m\n\u001b[0;32m   1184\u001b[0m     \u001b[38;5;66;03m# then call stream.\u001b[39;00m\n\u001b[0;32m   1185\u001b[0m     \u001b[38;5;66;03m# It'll attempt to gather all input into a single chunk using\u001b[39;00m\n\u001b[0;32m   1186\u001b[0m     \u001b[38;5;66;03m# the `+` operator.\u001b[39;00m\n\u001b[0;32m   1187\u001b[0m     \u001b[38;5;66;03m# If the input is not addable, then we'll assume that we can\u001b[39;00m\n\u001b[0;32m   1188\u001b[0m     \u001b[38;5;66;03m# only operate on the last chunk,\u001b[39;00m\n\u001b[0;32m   1189\u001b[0m     \u001b[38;5;66;03m# and we'll iterate until we get to the last chunk.\u001b[39;00m\n\u001b[0;32m   1190\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m got_first_val:\n\u001b[0;32m   1191\u001b[0m         final \u001b[38;5;241m=\u001b[39m ichunk\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:1200\u001b[0m, in \u001b[0;36mRunnable.atransform\u001b[1;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[0;32m   1197\u001b[0m             final \u001b[38;5;241m=\u001b[39m ichunk\n\u001b[0;32m   1199\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m got_first_val:\n\u001b[1;32m-> 1200\u001b[0m     \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m output \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mastream(final, config, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m   1201\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m output\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\base.py:820\u001b[0m, in \u001b[0;36mRunnable.astream\u001b[1;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[0;32m    810\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mastream\u001b[39m(\n\u001b[0;32m    811\u001b[0m     \u001b[38;5;28mself\u001b[39m,\n\u001b[0;32m    812\u001b[0m     \u001b[38;5;28minput\u001b[39m: Input,\n\u001b[0;32m    813\u001b[0m     config: Optional[RunnableConfig] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m    814\u001b[0m     \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs: Optional[Any],\n\u001b[0;32m    815\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m AsyncIterator[Output]:\n\u001b[0;32m    816\u001b[0m \u001b[38;5;250m    \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m    817\u001b[0m \u001b[38;5;124;03m    Default implementation of astream, which calls ainvoke.\u001b[39;00m\n\u001b[0;32m    818\u001b[0m \u001b[38;5;124;03m    Subclasses should override this method if they support streaming output.\u001b[39;00m\n\u001b[0;32m    819\u001b[0m \u001b[38;5;124;03m    \"\"\"\u001b[39;00m\n\u001b[1;32m--> 820\u001b[0m     \u001b[38;5;28;01myield\u001b[39;00m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mainvoke(\u001b[38;5;28minput\u001b[39m, config, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langgraph\\utils.py:115\u001b[0m, in \u001b[0;36mRunnableCallable.ainvoke\u001b[1;34m(self, input, config)\u001b[0m\n\u001b[0;32m    111\u001b[0m         ret \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mcreate_task(\n\u001b[0;32m    112\u001b[0m             \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mafunc(\u001b[38;5;28minput\u001b[39m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs), context\u001b[38;5;241m=\u001b[39mcontext\n\u001b[0;32m    113\u001b[0m         )\n\u001b[0;32m    114\u001b[0m     \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m--> 115\u001b[0m         ret \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mafunc(\u001b[38;5;28minput\u001b[39m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m    116\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(ret, Runnable) \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrecurse:\n\u001b[0;32m    117\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mawait\u001b[39;00m ret\u001b[38;5;241m.\u001b[39mainvoke(\u001b[38;5;28minput\u001b[39m, config)\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\site-packages\\langchain_core\\runnables\\config.py:514\u001b[0m, in \u001b[0;36mrun_in_executor\u001b[1;34m(executor_or_config, func, *args, **kwargs)\u001b[0m\n\u001b[0;32m    501\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Run a function in an executor.\u001b[39;00m\n\u001b[0;32m    502\u001b[0m \n\u001b[0;32m    503\u001b[0m \u001b[38;5;124;03mArgs:\u001b[39;00m\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m    510\u001b[0m \u001b[38;5;124;03m    Output: The output of the function.\u001b[39;00m\n\u001b[0;32m    511\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m    512\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m executor_or_config \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(executor_or_config, \u001b[38;5;28mdict\u001b[39m):\n\u001b[0;32m    513\u001b[0m     \u001b[38;5;66;03m# Use default executor with context copied from current context\u001b[39;00m\n\u001b[1;32m--> 514\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mget_running_loop()\u001b[38;5;241m.\u001b[39mrun_in_executor(\n\u001b[0;32m    515\u001b[0m         \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m    516\u001b[0m         cast(Callable[\u001b[38;5;241m.\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;241m.\u001b[39m, T], partial(copy_context()\u001b[38;5;241m.\u001b[39mrun, func, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)),\n\u001b[0;32m    517\u001b[0m     )\n\u001b[0;32m    519\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mget_running_loop()\u001b[38;5;241m.\u001b[39mrun_in_executor(\n\u001b[0;32m    520\u001b[0m     executor_or_config, partial(func, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs), \u001b[38;5;241m*\u001b[39margs\n\u001b[0;32m    521\u001b[0m )\n",
      "File \u001b[1;32m~\\Anaconda3\\envs\\py310\\lib\\concurrent\\futures\\thread.py:58\u001b[0m, in \u001b[0;36m_WorkItem.run\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m     55\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[0;32m     57\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m---> 58\u001b[0m     result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfn(\u001b[38;5;241m*\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkwargs)\n\u001b[0;32m     59\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mBaseException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m exc:\n\u001b[0;32m     60\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfuture\u001b[38;5;241m.\u001b[39mset_exception(exc)\n",
      "Cell \u001b[1;32mIn[89], line 7\u001b[0m, in \u001b[0;36mretrieve_documents\u001b[1;34m(state)\u001b[0m\n\u001b[0;32m      5\u001b[0m questions \u001b[38;5;241m=\u001b[39m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mquestions\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[0;32m      6\u001b[0m sources_input \u001b[38;5;241m=\u001b[39m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msources_input\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m----> 7\u001b[0m auto_mode \u001b[38;5;241m=\u001b[39m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mauto\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43msources_input\u001b[49m\n\u001b[0;32m      9\u001b[0m k_final \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m15\u001b[39m\n\u001b[0;32m     10\u001b[0m k_before_reranking \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m100\u001b[39m\n",
      "\u001b[1;31mTypeError\u001b[0m: argument of type 'NoneType' is not iterable"
     ]
    }
   ],
   "source": [
    "# question = \"Tu penses quoi de Shakespeare ?\"\n",
    "question = \"C'est quoi la recette de la tarte aux pommes ?\"\n",
    "question = \"C'est quoi l'impact de ChatGPT ?\"\n",
    "question = \"I am not really sure what you mean. What role do cloud formations play in modulating the Earth's radiative balance, and how are they represented in current climate models?\"\n",
    "\n",
    "async for event in app.astream_events({\"user_input\": question,\"sources\":[\"auto\"]}, version=\"v1\"):\n",
    "    if event[\"event\"] == \"on_chat_model_stream\":\n",
    "        token = event[\"data\"][\"chunk\"].content\n",
    "        print(token,end = \"\")\n",
    "        \n",
    "    print(event)\n",
    "    print(\"\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "climateqa",
   "language": "python",
   "name": "climateqa"
  },
  "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.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}