timeki commited on
Commit
d7adcaa
1 Parent(s): d396732

Update 20241104 - CQA - StepByStep CQA.ipynb

Browse files
sandbox/20241104 - CQA - StepByStep CQA.ipynb CHANGED
@@ -116,49 +116,6 @@
116
  "docs_question"
117
  ]
118
  },
119
- {
120
- "cell_type": "code",
121
- "execution_count": 6,
122
- "metadata": {},
123
- "outputs": [
124
- {
125
- "data": {
126
- "text/plain": [
127
- "{'chunk_type': 'text',\n",
128
- " 'document_id': 'document6',\n",
129
- " 'document_number': 6.0,\n",
130
- " 'element_id': 'N/A',\n",
131
- " 'figure_code': 'N/A',\n",
132
- " 'file_size': 'N/A',\n",
133
- " 'image_path': 'N/A',\n",
134
- " 'n_pages': 3068.0,\n",
135
- " 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC',\n",
136
- " 'num_characters': 1152.0,\n",
137
- " 'num_tokens': 223.0,\n",
138
- " 'num_tokens_approx': 285.0,\n",
139
- " 'num_words': 214.0,\n",
140
- " 'page_number': 2516.0,\n",
141
- " 'release_date': 2022.0,\n",
142
- " 'report_type': 'Full Report',\n",
143
- " 'section_header': '(a) Low-lying coastal systems',\n",
144
- " 'short_name': 'IPCC AR6 WGII FR',\n",
145
- " 'source': 'IPCC',\n",
146
- " 'toc_level0': 'Chapters and Cross-Chapter Papers ',\n",
147
- " 'toc_level1': 'Chapter 16 Key Risks across Sectors and Regions',\n",
148
- " 'toc_level2': 'N/A',\n",
149
- " 'toc_level3': 'N/A',\n",
150
- " 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}"
151
- ]
152
- },
153
- "execution_count": 6,
154
- "metadata": {},
155
- "output_type": "execute_result"
156
- }
157
- ],
158
- "source": [
159
- "docs_question[0].metadata"
160
- ]
161
- },
162
  {
163
  "cell_type": "code",
164
  "execution_count": 7,
@@ -197,175 +154,6 @@
197
  "owid_graphs"
198
  ]
199
  },
200
- {
201
- "cell_type": "code",
202
- "execution_count": 8,
203
- "metadata": {},
204
- "outputs": [],
205
- "source": [
206
- "from climateqa.knowledge.retriever import ClimateQARetriever\n",
207
- "\n",
208
- "sources = [\"IPCC\"]\n",
209
- "k_summary = 5\n",
210
- "k_before_reranking = 10\n",
211
- "config={}\n",
212
- "# Search the document store using the retriever\n",
213
- "# Configure high top k for further reranking step\n",
214
- "retriever = ClimateQARetriever(\n",
215
- " vectorstore=vectorstore_ipcc,\n",
216
- " sources = sources,\n",
217
- " min_size = 200,\n",
218
- " k_summary = k_summary,\n",
219
- " k_total = k_before_reranking,\n",
220
- " threshold = 0.5,\n",
221
- ")\n",
222
- "docs_question = await retriever.ainvoke(question,config)"
223
- ]
224
- },
225
- {
226
- "cell_type": "code",
227
- "execution_count": 9,
228
- "metadata": {},
229
- "outputs": [
230
- {
231
- "data": {
232
- "text/plain": [
233
- "[(Document(metadata={'chunk_type': 'image', 'document_id': 'document10', 'document_number': 10.0, 'element_id': 'Picture_0_12', 'figure_code': 'N/A', 'file_size': 109.03125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document10/images/Picture_0_12.png', 'n_pages': 36.0, 'name': 'Synthesis report of the IPCC Sixth Assesment Report AR6', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 12.0, 'release_date': 2023.0, 'report_type': 'SPM', 'section_header': 'N/A', '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'}, page_content='Summary: This image provides a visual summary of the impacts of climate change on various aspects such as health, well-being, agriculture, water availability, and ecosystems. It shows the relationships between physical climate conditions altered by human influence and the consequential effects on food production, human health, and biodiversity. The visual icons depict specific areas affected by climate change, including crop production, animal and livestock health, fisheries, infectious diseases, mental health, and displacement due to extreme weather events. Additionally, it addresses the impacts on cities, settlements, and infrastructure, illustrating issues like inland flooding, storm-induced coastal damage, and damage to key economic sectors. For biodiversity, it highlights the changes occurring in terrestrial, freshwater, and ocean ecosystems. These elements are critical for understanding targeted areas for climate resilience and adaptation strategies.'),\n",
234
- " 0.716457784),\n",
235
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document14', 'document_number': 14.0, 'element_id': 'Picture_0_14', 'figure_code': 'N/A', 'file_size': 72.3505859375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document14/images/Picture_0_14.png', 'n_pages': 34.0, 'name': 'Technical Summary. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 14.0, 'release_date': 2019.0, 'report_type': 'TS', 'section_header': 'N/A', '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'}, page_content='Summary: The image illustrates the cascading effects of climate change on ocean systems, starting from the attribution of greenhouse gases, followed by physical changes such as temperature rise, oxygen level changes, ocean pH shifts, sea ice extent reduction, and sea level rise. It further shows the impact on various ecosystems, including upper water column, coral reefs, coastal wetlands, kelp forests, rocky shores, the deep sea, polar benthos, and sea ice-associated regions. Finally, it delineates the consequences on human systems and ecosystem services like fisheries, tourism, habitat services, transportation/shipping, cultural services, and coastal carbon sequestration. This schematic representation emphasizes the interconnectivity between climate change drivers, oceanic responses, and socio-economic impacts. (Caption included: Eastern Boundary Upwelling Systems, such as the Benguela Current, Canary Current, California Current, and Humboldt Current.)'),\n",
236
- " 0.70854187),\n",
237
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document14', 'document_number': 14.0, 'element_id': 'Picture_1_14', 'figure_code': 'N/A', 'file_size': 58.65234375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document14/images/Picture_1_14.png', 'n_pages': 34.0, 'name': 'Technical Summary. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 14.0, 'release_date': 2019.0, 'report_type': 'TS', 'section_header': 'N/A', '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'}, page_content='Summary and Explanation: The image presents a structured overview of the impacts of climate change on high mountain and polar land regions, organized into three categories: Physical Changes, Ecosystems, and Human Systems and Services. It details how changes in the cryosphere—such as glaciers and ice sheets—affect water availability, increase natural hazards like floods, landslides, and avalanches, alter ecosystems (tundra, forest, lakes/ponds, and rivers/streams), and ultimately impact human activities such as tourism, agriculture, infrastructure, and cultural services. The illustration emphasizes the attribution of these changes to climate dynamics. Migration is noted specifically, implying changes in human population movements as a result of cryospheric changes.'),\n",
238
- " 0.699624538),\n",
239
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'Picture_1_11', 'figure_code': 'Figure TS.3', 'file_size': 224.412109375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document5/images/Picture_1_11.png', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 11.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.B Observed Impacts', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Summary: This figure represents observed impacts of climate change on various human systems, categorized by region and type. It provides a matrix summarizing the effects on water scarcity, food production including agriculture, livestock, and fisheries, as well as health and wellbeing impacts such as disease, nutrition, mental health, and displacement. Additionally, it considers climate change implications for urban areas, including flooding and infrastructure damage, and economic sectors. Each impact is accompanied by a symbol indicating whether the effect is increasing (positive or adverse), decreasing, mixed, or not assessed. The graphic facilitates a comparison across different geographical areas, from global scale to specific regions like Africa, Asia, and the Arctic, acknowledging the variable levels of confidence in attributing these impacts directly to climate change.'),\n",
240
- " 0.693654299),\n",
241
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'Picture_0_24', 'figure_code': 'Figure TS.4', 'file_size': 222.9453125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document5/images/Picture_0_24.png', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 24.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.C Projected Impacts and Risks', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'Food systems and food security', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Summary: This image visualizes the projected impacts of global warming on various regional environmental and socio-economic factors, ranging from food production and biodiversity to mortality rates and infrastructure. It uses a color gradient to illustrate the levels of impact and risk across different global surface temperature increases, from the pre-industrial period baseline up to a 5-degree Celsius change. The diverse set of indicators includes agriculture in Africa, health and coastal flooding in Europe, coral reef conditions in Australasia, tourism in North America, and ice-dependent ecosystems in polar regions. This comprehensive assessment aids in understanding the potential regional risks associated with climate change.'),\n",
242
- " 0.693352699),\n",
243
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document15', 'document_number': 15.0, 'element_id': 'Picture_0_8', 'figure_code': 'N/A', 'file_size': 294.6240234375, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document15/images/Picture_0_8.png', 'n_pages': 60.0, 'name': 'Chapter 1 - Framing and Context of the Report. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 8.0, 'release_date': 2019.0, 'report_type': 'Special Report', 'section_header': 'N/A', 'short_name': 'IPCC SR OC C1', '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/03_SROCC_Ch01_FINAL.pdf'}, page_content='Summary: This schematic illustration depicts the interplay between ocean and cryosphere changes and their links through the transfer of heat, water, and carbon dioxide in the Earth system, as detailed in the IPCC reports on climate change. It highlights the effects of climate change, including the rise in sea levels, increased ocean heat content, marine heatwaves, ocean acidification, and deoxygenation, as well as the decline in Arctic sea ice, ice sheet mass, glaciers, permafrost, and snow cover. The graphic also indicates interactions between humans and these environments, emphasizing the importance of understanding these changes for addressing climate-related challenges.'),\n",
244
- " 0.692583323),\n",
245
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document11', 'document_number': 11.0, 'element_id': 'Picture_1_10', 'figure_code': 'Figure SPM.2', 'file_size': 89.39453125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document11/images/Picture_1_10.png', 'n_pages': 24.0, 'name': 'Summary for Policymakers. In: Global Warming of 1.5°C. An IPCC Special Report on the impacts of global warming of 1.5°C above pre-industrial levels and related global greenhouse gas emission pathways, in the context of strengthening the global response to the threat of climate change, sustainable development, and efforts to eradicate poverty', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 10.0, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPCC SR GW 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/2/2022/06/SPM_version_report_LR.pdf'}, page_content='This image is a graphical representation of the impacts and risks related to climate change across various ecological and socio-economic systems, as analyzed in the IPCC reports. It outlines the consequences of different levels of global warming on factors such as warm-water corals, mangroves, fisheries, Arctic regions, coastal and fluvial flooding, crop yields, tourism, and heat-related health issues. The color gradients indicate increasing global mean surface temperature changes and the associated confidence levels (Low, Medium, High, and Very High) for the transition of risks and impacts. It serves to summarize expert judgments on the global warming thresholds at which impacts and risks become perceptible to severe, providing a synthesized overview for policymakers and researchers in the field of climate change.'),\n",
246
- " 0.687731683),\n",
247
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document4', 'document_number': 4.0, 'element_id': 'Picture_1_9', 'figure_code': 'Figure SPM.2', 'file_size': 221.7900390625, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document4/images/Picture_1_9.png', 'n_pages': 34.0, 'name': 'Summary for Policymakers. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 9.0, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII SPM', 'source': 'IPCC', 'toc_level0': 'B: Observed and Projected Impacts and Risks', 'toc_level1': 'Observed Impacts from Climate Change', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_SummaryForPolicymakers.pdf'}, page_content=\"Summary: This visual summarizes the observed impacts of climate change on various human systems across different global regions, including effects on water scarcity, food production (agriculture, livestock, fisheries), human health (infectious diseases, malnutrition, mental health), displacement, and the damage to cities, infrastructure, and economic sectors. The graphic highlights the degree of confidence in the attribution of these impacts to climate change, with varied confidence levels indicated by the color and filling of symbols for global assessments and regional assessments. Each region's row indicates the observed impacts, allowing a comparison of how climate change has differentially affected human systems around the world.\"),\n",
248
- " 0.686938882),\n",
249
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'Picture_0_37', 'figure_code': 'N/A', 'file_size': 299.216796875, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document5/images/Picture_0_37.png', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 37.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.D Contribution of Adaptation to Solutions', 'toc_level1': 'Adaptation progress and gaps', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Summary:\\nThe image presents a scientific analysis of the observed impacts of climate change on ecosystems across various geographical regions and ecosystem types, showing changes in ecosystem structure, species range shifts, and timing (phenology). It features a matrix with the confidence levels in attribution to climate change, from high to not applicable, for terrestrial, freshwater, and oceanic ecosystems. The second part of the image depicts a trend graph illustrating marine species richness changes across different latitudes from the 1950s to 2015, indicating a decline in equatorial regions and an increase in higher latitudes due to global warming. This composite scientific visualization conveys the broad and multifaceted effects of climate change on biodiversity globally, as reported by the IPCC or IPBES.'),\n",
250
- " 0.68600893),\n",
251
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document14', 'document_number': 14.0, 'element_id': 'Picture_0_13', 'figure_code': 'Figure TS.5', 'file_size': 717.8076171875, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document14/images/Picture_0_13.png', 'n_pages': 34.0, 'name': 'Technical Summary. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 13.0, 'release_date': 2019.0, 'report_type': 'TS', 'section_header': 'N/A', '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'}, page_content='Summary: This complex scientific visualization from the IPCC reports is a global assessment of climate change impacts on various ecosystems and human systems. It provides a comparative analysis of the attribution confidence and observed physical changes to the cryosphere and oceans, such as temperature variation, sea level, ocean pH, ice extent, and greenhouse gases. The image details how these physical changes affect ecosystems across oceanic regions like the Eastern Boundary Upwelling Systems and high mountain and polar land regions, including the Himalayas and the Arctic. It also outlines the consequences for human systems and ecosystem services, including fisheries, tourism, infrastructure, and cultural services, among others. The figure employs a legend to denote the degree of impact (increase, decrease, both, or none) and the confidence in attribution to climate change (ranging from high to no assessment). It serves as a visual synthesis of the interaction between climate-induced physical changes and their varied implications for nature and societies around the globe.'),\n",
252
- " 0.683739603),\n",
253
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'Picture_0_23', 'figure_code': 'N/A', 'file_size': 421.5048828125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document5/images/Picture_0_23.png', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 23.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.C Projected Impacts and Risks', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'Food systems and food security', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Summary:\\nThe image displays multi-part diagrams related to climate change impact assessments under scenarios with low to no adaptation. It includes projections for global surface temperature changes under various scenarios, and the associated risks for increasing levels of global warming categorized as Reasons for Concern (RFCs). The diagrams illustrate the consequent effects on biodiversity, unique and threatened systems, extreme weather events, distribution of impacts, and large-scale singular events. Additionally, it depicts the impacts and risks to terrestrial and freshwater ecosystems, ocean ecosystems, and climate-sensitive health outcomes under three adaptation scenarios (limited, incomplete, and proactive adaptation), particularly focusing on heat- and ozone-related morbidity and mortality, malaria, and diseases carried by Aedes mosquitoes. The visual representation emphasizes the varying risk levels based on the degree of temperature change and different adaptive strategies.'),\n",
254
- " 0.682781458),\n",
255
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document4', 'document_number': 4.0, 'element_id': 'Picture_0_15', 'figure_code': 'N/A', 'file_size': 422.8779296875, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document4/images/Picture_0_15.png', 'n_pages': 34.0, 'name': 'Summary for Policymakers. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 15.0, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII SPM', 'source': 'IPCC', 'toc_level0': 'B: Observed and Projected Impacts and Risks', 'toc_level1': 'Mid to Long-term Risks (2041–2100)', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_SummaryForPolicymakers.pdf'}, page_content='Summary:\\nThe image presents an integrated visualization of global climate change impacts and risks under various scenarios related to increasing global surface temperatures, with a focus on the Reasons for Concern (RFC) without adaptation efforts. It includes projections for surface temperature change and assesses impacts and risks to terrestrial and freshwater ecosystems, as well as to ocean ecosystems, and possible health outcomes under different adaptation scenarios. The image is meant to convey the severity of biodiversity loss, structural changes in ecosystems, increased tree mortality and wildfires, carbon loss, damage to marine environments such as coral reefs and kelp forests, and the exacerbation of health issues like heat and ozone-related mortality and the spread of diseases like malaria and dengue. It emphasizes the heightened risks under scenarios of limited or no adaptation and the potential for mitigation with proactive adaptation strategies.'),\n",
256
- " 0.681671679),\n",
257
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document4', 'document_number': 4.0, 'element_id': 'Picture_0_16', 'figure_code': 'N/A', 'file_size': 222.1357421875, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document4/images/Picture_0_16.png', 'n_pages': 34.0, 'name': 'Summary for Policymakers. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 16.0, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII SPM', 'source': 'IPCC', 'toc_level0': 'B: Observed and Projected Impacts and Risks', 'toc_level1': 'Mid to Long-term Risks (2041–2100)', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_SummaryForPolicymakers.pdf'}, page_content='Summary: The image is a series of bar graphs representing the risks of climate change impacts at various degrees of global surface temperature change relative to the pre-industrial period. The assessment spans different regions and sectors, such as food security in Africa, health and well-being in the Mediterranean, coastal flooding in Europe, coral reefs in Australia, and sea-ice ecosystem changes in the Arctic. Each bar graph denotes the escalation of impact and risk with higher temperature increments, providing a visual summary of potential climate change consequences across global sectors and regions as part of a synthetic overview for policymakers.'),\n",
258
- " 0.677480817),\n",
259
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'Picture_0_11', 'figure_code': 'N/A', 'file_size': 239.587890625, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document5/images/Picture_0_11.png', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 11.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'N/A', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.B Observed Impacts', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Summary: This image is a matrix summarizing the observed impacts of climate change on various ecosystems across different regions and evaluating the confidence in attribution of these impacts to climate change. It covers terrestrial, freshwater, and ocean ecosystems and notes changes in ecosystem structure, species range shifts, and changes in phenology. The chart uses color-coded dots to indicate levels of confidence, ranging from high (dark blue) to low (light purple), and also acknowledges areas where evidence is limited or not applicable. Impacts to human systems are referenced but not detailed in this part of the chart.'),\n",
260
- " 0.675764263),\n",
261
- " (Document(metadata={'chunk_type': 'image', 'document_id': 'document14', 'document_number': 14.0, 'element_id': 'Picture_0_6', 'figure_code': 'Figure TS.2', 'file_size': 319.705078125, 'image_path': '/dbfs/mnt/ai4sclqa/raw/climateqa/documents/document14/images/Picture_0_6.png', 'n_pages': 34.0, 'name': 'Technical Summary. In: IPCC Special Report on the Ocean and Cryosphere in a Changing Climate', 'num_characters': 'N/A', 'num_tokens': 'N/A', 'num_tokens_approx': 'N/A', 'num_words': 'N/A', 'page_number': 6.0, 'release_date': 2019.0, 'report_type': 'TS', 'section_header': 'N/A', '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'}, page_content='Summary: This schematic provides a visual representation of the significant changes occurring in the ocean and cryosphere due to climate change. It illustrates the global exchange of heat, water, and carbon between these components and highlights changes such as sea level rise, increased ocean heat content, marine heatwaves, ocean acidification, decreased oxygen levels, and cryosphere alterations like reduced ice mass in Greenland and Antarctica, glacier retreat, and permafrost thaw. These alterations have direct impacts on human activities and are interlinked with the United Nations Sustainable Development Goals, emphasizing the need for progress in climate action to mitigate risks to sustainable development.'),\n",
262
- " 0.674771845)]"
263
- ]
264
- },
265
- "execution_count": 9,
266
- "metadata": {},
267
- "output_type": "execute_result"
268
- }
269
- ],
270
- "source": [
271
- "vectorstore_ipcc.similarity_search_with_score(query=question,filter = {\"chunk_type\": \"image\"},k = 15)"
272
- ]
273
- },
274
- {
275
- "cell_type": "code",
276
- "execution_count": 10,
277
- "metadata": {},
278
- "outputs": [
279
- {
280
- "data": {
281
- "text/plain": [
282
- "[(Document(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': 1152.0, 'num_tokens': 223.0, 'num_tokens_approx': 285.0, 'num_words': 214.0, 'page_number': 2516.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '(a) Low-lying coastal systems', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 16 Key Risks across Sectors and Regions', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}, page_content=\"'Impact of climate change' is defined as the difference between the observed state of the system and the state of \\r\\nthe system assuming the same observed levels of non-climate-related drivers but no climate change. For example, \\r\\nwe can compare the level of crop yields, damage induced by a river flood, and coral bleaching with differences \\r\\nin fertilizer input, land use patterns or settlement structures, without climate change and with climate change \\r\\noccurring.\\nWhile this definition is quite clear, there certainly is the problem that, in real life, we do not have a 'no climate \\r\\nchange world' to compare with. We use model simulations where the influence of climate change can be eliminated \\r\\nto estimate what might have happened without climate change. In a situation where the influence of other \\r\\nnon-climate-related drivers is known to be minor (e.g., in very remote locations), the non-climate-change situation \\r\\ncan also be approximated by observation from an early period where climate change was still minor. Often, a \\r\\ncombination of different approaches increases our confidence in the quantification of the impact of climate change.\"),\n",
283
- " 0.738316119),\n",
284
- " (Document(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': 1010.0, 'num_tokens': 218.0, 'num_tokens_approx': 222.0, 'num_words': 167.0, 'page_number': 877.0, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': '6.5 Implications of Changing Climate on AQ', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': '6: Short-lived Climate Forcers', 'toc_level1': '6.5 Implications of Changing Climate on AQ', 'toc_level2': '6.5.1 Effect of Climate Change on Surface Ozone', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf'}, page_content='Air pollutants can be impacted by climate change through physical \\r\\nchanges affecting meterorological conditions, chemical changes \\r\\naffecting their lifetimes, and biological changes affecting their natural \\r\\nemissions (Kirtman et al., 2013). Changes in meteorology affect air \\r\\nquality directly through modifications of atmospheric transport \\r\\npatterns (e.g., occurrence and length of atmospheric blocking \\r\\nepisodes, ventilation of the polluted boundary layer), extent of mixing \\r\\nlayer and stratosphere-troposphere exchange (STE) for surface ozone \\r\\n(von Schneidemesser et al., 2015), and through modifications of the \\r\\nrate of reactions that generate secondary species in the atmosphere. \\r\\nChanging precipitation patterns in a future climate also influence \\r\\nthe wet removal efficiency, in particular for atmospheric aerosols \\r\\n(Hou et al., 2018). Processes at play in non-CO2 biogeochemical \\r\\nfeedbacks (Section 6.4.5) are also involved in the perturbation of \\r\\natmospheric pollutants (Section 6.2.2).'),\n",
285
- " 0.737111747),\n",
286
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document33', 'document_number': 33.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 894.0, 'name': 'Full Report. Regional Assessment Report on Biodiversity and Ecosystem Services for Europe and Central Asia', 'num_characters': 918.0, 'num_tokens': 233.0, 'num_tokens_approx': 230.0, 'num_words': 173.0, 'page_number': 529.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': '4.7 DRIVERS AND \\r\\nEFFECTS OF CLIMATE \\r\\nCHANGE ', 'short_name': 'IPBES RAR ECA FR', 'source': 'IPBES', 'toc_level0': \"CHAPTER 4: DIRECT AND INDIRECT DRIVERS OF CHANGE IN BIODIVERSITY AND NATURE'S CONTRIBUTIONS PEOPLE\", 'toc_level1': '4.7 Drivers and effects of climate change ', 'toc_level2': '4.7.1 Effects of climate change on biodiversity', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237429/files/ipbes_assessment_report_eca_EN.pdf'}, page_content=\"4.7 DRIVERS AND \\r\\nEFFECTS OF CLIMATE \\r\\nCHANGE \\n4.7.1 Effects of climate change on \\r\\nbiodiversity\\n4.7.1 Effects of climate change on \\r\\nbiodiversity\\n <Section-header> 4.7.1 Effects of climate change on \\r\\nbiodiversity </Section-header> \\n\\nand modulate important ecosystem functions and \\r\\nprocesses that underpin human livelihoods and nature's \\r\\ncontributions to people, such as water regulation, food \\r\\nproduction, and carbon sequestration (CBD, 2016; \\r\\nGallardo et al., 2015; IPBES, 2016a; IPCC, 2014a; \\r\\nMEA, 2005a).\\nClimate change is a complex driver of ecosystem change, \\r\\nconsisting of changes in precipitation and temperature \\r\\npatterns which lead to changes in drought, flood, and fire \\r\\nrisk, ocean-atmosphere interchange, marine circulation \\r\\nand stratification, and the concentrations and distribution \\r\\nof O2 and CO2 in the atmosphere and in the ocean (IPCC, \\r\\n2014a). These impacts affect species and influence\"),\n",
287
- " 0.736420274),\n",
288
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document31', 'document_number': 31.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 616.0, 'name': 'Full Report. Regional Assessment Report on Biodiversity and Ecosystem Services for Asia and the Pacific', 'num_characters': 928.0, 'num_tokens': 186.0, 'num_tokens_approx': 209.0, 'num_words': 157.0, 'page_number': 586.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': 'Climate change', 'short_name': 'IPBES RAR AP FR', 'source': 'IPBES', 'toc_level0': 'ANNEXES', 'toc_level1': 'Annex I: Glossary', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237374/files/ipbes_assessment_report_ap_EN.pdf'}, page_content='Climate change\\nClimate change is a change in the statistical \\r\\ndistribution of weather patterns when that \\r\\nchange lasts for an extended period of time \\r\\n(i.e., decades to millions of years). Climate \\r\\nchange may refer to a change in average \\r\\nweather conditions, or in the time variation \\r\\nof weather within the context of longer\\x02term average conditions. Climate change is \\r\\ncaused by factors such as biotic processes, \\r\\nvariations in solar radiation received by Earth, \\r\\nplate tectonics, and volcanic eruptions. \\r\\nCertain human activities have been identified \\r\\nas primary causes of ongoing climate \\r\\nchange, often referred to as global warming.\\n <Section-header> Climate change </Section-header> \\n\\nClimate Smart Agriculture (CSA)\\r\\nAgriculture that sustainably increases \\r\\nproductivity, resilience (adaptation), reduces/\\r\\nremoves GHGs (mitigation), and enhances \\r\\nachievement of national food security and \\r\\ndevelopment goals.'),\n",
289
- " 0.734916091),\n",
290
- " (Document(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': 34.0, 'num_tokens': 7.0, 'num_tokens_approx': 8.0, 'num_words': 6.0, 'page_number': 1187.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '8.1 Introduction', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 8 Poverty, Livelihoods and Sustainable Development', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}, page_content='adverse impacts of climate change.'),\n",
291
- " 0.733919621),\n",
292
- " (Document(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': 413.0, 'num_tokens': 75.0, 'num_tokens_approx': 82.0, 'num_words': 62.0, 'page_number': 56.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'TS.B Observed Impacts', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Technical Summary ', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}, page_content='Climate change impacts are concurrent and interact with other \\r\\nsignificant societal changes that have become more salient since AR5, \\r\\nincluding a growing and urbanising global population; significant \\r\\ninequality and demands for social justice; rapid technological change; \\r\\ncontinuing poverty, land and water degradation, biodiversity loss; food \\r\\ninsecurity; and a global pandemic.\\nEcosystems and biodiversity'),\n",
293
- " 0.730846643),\n",
294
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 413.0, 'num_tokens': 75.0, 'num_tokens_approx': 82.0, 'num_words': 62.0, 'page_number': 10.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'TS.B Observed Impacts', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.B Observed Impacts', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='Climate change impacts are concurrent and interact with other \\r\\nsignificant societal changes that have become more salient since AR5, \\r\\nincluding a growing and urbanising global population; significant \\r\\ninequality and demands for social justice; rapid technological change; \\r\\ncontinuing poverty, land and water degradation, biodiversity loss; food \\r\\ninsecurity; and a global pandemic.\\nEcosystems and biodiversity'),\n",
295
- " 0.730846643),\n",
296
- " (Document(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': 444.0, 'num_tokens': 88.0, 'num_tokens_approx': 106.0, 'num_words': 80.0, 'page_number': 58.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '(b) Observed impacts of climate change on human systems', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Technical Summary ', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}, page_content='(a) Climate change has already altered terrestrial, freshwater and ocean ecosystems at global scale, with multiple impacts evident at regional and local scales where there is \\r\\nsufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology \\r\\nand detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'),\n",
297
- " 0.730548739),\n",
298
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 444.0, 'num_tokens': 88.0, 'num_tokens_approx': 106.0, 'num_words': 80.0, 'page_number': 12.0, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': '(b) Observed impacts of climate change on human systems', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.B Observed Impacts', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf'}, page_content='(a) Climate change has already altered terrestrial, freshwater and ocean ecosystems at global scale, with multiple impacts evident at regional and local scales where there is \\r\\nsufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology \\r\\nand detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'),\n",
299
- " 0.730548739),\n",
300
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document35', 'document_number': 35.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 748.0, 'name': 'Full Report. Assessment Report on Land Degradation and Restoration', 'num_characters': 1050.0, 'num_tokens': 207.0, 'num_tokens_approx': 229.0, 'num_words': 172.0, 'page_number': 199.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': 'EXECUTIVE SUMMARY ', 'short_name': 'IPBES AR LDR FR', 'source': 'IPBES', 'toc_level0': 'Executive Summary ', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237393/files/ipbes_assessment_report_ldra_EN.pdf'}, page_content='The importance of climate change for land \\r\\ndegradation is most prominent through its role in \\r\\nexacerbating the impacts of other human activities \\r\\n(established but incomplete) {3.4}. The exacerbating \\r\\neffect of climate change on the impact of degradation \\r\\ndrivers, including land clearance and intensive farming \\r\\ntechniques, can be felt both through chronic impacts and \\r\\ndirectional changes - like temperature changes, leading \\r\\nto shifts in species range sizes, as well as changes in \\r\\naverage precipitation levels, atmospheric CO2\\r\\n and nitrogen \\r\\ndeposition - and acute impacts through extreme weather \\r\\nevents of flooding, drought, and other natural disasters \\r\\n(well established). Heavy rainfall events and storms as well \\r\\nas heat waves and droughts are predicted to increase in \\r\\nfrequency over several parts of the globe, with cascading \\r\\neffects on the frequency, intensity, extent and timing of \\nother drivers such as fires, pest and pathogen outbreaks, \\r\\nspecies invasions, soil erosion and landslides (established \\r\\nbut incomplete).'),\n",
301
- " 0.726093054),\n",
302
- " (Document(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': 536.0, 'num_tokens': 115.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 2246.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'Executive Summary', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Cross-Chapter Paper 4 Mediterranean Region', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}, page_content='A growing number of observed impacts across the entire \\r\\nbasin are now being attributed to climate change, along \\r\\nwith major roles of other forcings of environmental change \\r\\n(high confidence). These impacts include multiple consequences \\r\\nof longer and/or more intensive heat waves, droughts, floods, \\r\\nocean acidification and sea level rise, such as cascading impacts on \\r\\nmarine and terrestrial ecosystems, as well as on land and sea use \\r\\n(agriculture, forestry, fisheries, tourism, recreation, etc.) and human \\r\\nhealth. {CCP4.1.4}'),\n",
303
- " 0.726076663),\n",
304
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document35', 'document_number': 35.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 748.0, 'name': 'Full Report. Assessment Report on Land Degradation and Restoration', 'num_characters': 312.0, 'num_tokens': 59.0, 'num_tokens_approx': 69.0, 'num_words': 52.0, 'page_number': 712.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': 'Climate change', 'short_name': 'IPBES AR LDR FR', 'source': 'IPBES', 'toc_level0': 'Annexes', 'toc_level1': 'Annex I: Glossary', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237393/files/ipbes_assessment_report_ldra_EN.pdf'}, page_content='Climate change\\nRefers to a change of climate that is \\r\\nattributed directly or indirectly to human \\r\\nactivity that alters the composition of the \\r\\nglobal atmosphere and that is in addition \\r\\nto natural climate variability observed over \\r\\ncomparable time periods.\\n <Section-header> Climate change </Section-header>'),\n",
305
- " 0.725297272),\n",
306
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document29', 'document_number': 29.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 660.0, 'name': 'Full Report. Regional Assessment Report on Biodiversity and Ecosystem Services for the Americas', 'num_characters': 438.0, 'num_tokens': 98.0, 'num_tokens_approx': 106.0, 'num_words': 80.0, 'page_number': 144.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': '2.2.12 Regulation of hazards and \\r\\nextreme events', 'short_name': 'IPBES RAR AM FR', 'source': 'IPBES', 'toc_level0': 'CHAPTER 2: Nature’s contributions to people and quality of life', 'toc_level1': '2.2 Status and trends of nature’s contribution to people in the Americas', 'toc_level2': '2.2.13 Habitat creation and maintenance', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3236253/files/ipbes_assessment_report_americas_EN.pdf'}, page_content='Anticipated climate change could increase the impacts of \\r\\nhazardous events in various ways (IPCC, 2007), placing \\r\\nmore stress on ecosystems and more pressure on whatever \\r\\nmitigating services they may provide. The impacts of climate \\nchange, however, may be moderated by reducing local \\r\\nhuman impacts on ecosystems. Recent trends indicate that \\r\\nmore ocean, land, and wetland areas are now protected \\r\\nthan in the past (section 2.2.8).'),\n",
307
- " 0.724390745),\n",
308
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document25', 'document_number': 25.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 1008.0, 'name': 'Full Report. Thematic assessment of the sustainable use of wild species of the IPBES', 'num_characters': 1016.0, 'num_tokens': 209.0, 'num_tokens_approx': 224.0, 'num_words': 168.0, 'page_number': 524.0, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '4.2.1.1 Overview', 'short_name': 'IPBES TAM SW FR', 'source': 'IPBES', 'toc_level0': 'Chapter 4 - Table of Contents', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/7755805/files/IPBES_ASSESSMENT_SUWS_FULL_REPORT.pdf'}, page_content='This section discusses drivers directly linked with the \\r\\nso-called \"natural\" environment: climate change and \\r\\nhydrometeorological hazards, land and ecosystem \\r\\ndegradation, invasive alien species, land and seascape \\r\\nchange, pollution, and environmental hazards. Climate \\r\\nchange and related hazards have adversely impacted \\r\\nbiodiversity and terrestrial, marine, and freshwater \\r\\necosystems. Although there is little direct evidence to show \\r\\nhow climate change has, and will, affect wild species use, \\r\\nclimate change and associated hazards have already, and \\r\\nare expected to further affect, food production systems, \\r\\nenergy systems, water availability, and human health \\r\\n(Hoegh-Guldberg et al., 2018), which in turn impact \\r\\nhow wild species are used. Land degradation, especially \\r\\ndegradation of forests, rangelands, and croplands \\r\\nworldwide, has affected the capacity of nature to produce \\r\\nprovisioning services and the availability and abundance \\r\\nof wild species. Conversion of grassland, savanna, and'),\n",
309
- " 0.719455361),\n",
310
- " (Document(metadata={'chunk_type': 'text', 'document_id': 'document35', 'document_number': 35.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 748.0, 'name': 'Full Report. Assessment Report on Land Degradation and Restoration', 'num_characters': 28.0, 'num_tokens': 8.0, 'num_tokens_approx': 10.0, 'num_words': 8.0, 'page_number': 331.0, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': '4.2.8 Climate Change impacts', 'short_name': 'IPBES AR LDR FR', 'source': 'IPBES', 'toc_level0': '4.2 Individual degradation processes ', 'toc_level1': '4.2.1 Soil erosion', 'toc_level2': '4.2.8 Climate Change impacts', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237393/files/ipbes_assessment_report_ldra_EN.pdf'}, page_content='4.2.8 Climate Change impacts'),\n",
311
- " 0.719132543)]"
312
- ]
313
- },
314
- "execution_count": 10,
315
- "metadata": {},
316
- "output_type": "execute_result"
317
- }
318
- ],
319
- "source": [
320
- "vectorstore_ipcc.similarity_search_with_score(query=question,filter = {\"chunk_type\": \"text\"},k = 15)"
321
- ]
322
- },
323
- {
324
- "cell_type": "code",
325
- "execution_count": 11,
326
- "metadata": {},
327
- "outputs": [
328
- {
329
- "data": {
330
- "text/plain": [
331
- "{'docs_summaries': [Document(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': 568.0, 'num_tokens': 128.0, 'num_tokens_approx': 144.0, 'num_words': 108.0, 'page_number': 11, 'release_date': 2023.0, 'report_type': 'SPM', 'section_header': 'Observed Changes and Impacts', '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.696859181, 'content': 'Observed Changes and Impacts\\nA.2 Widespread and rapid changes in the atmosphere, ocean, cryosphere and biosphere have occurred. Human-caused climate change is already affecting many weather and climate extremes in every region across the globe. This has led to widespread adverse impacts and related losses and damages to nature and people (high confidence). Vulnerable communities who have historically contributed the least to current climate change are disproportionately affected (high confidence). {2.1, Table 2.1, Figure 2.2, Figure 2.3} (Figure SPM.1)'}, page_content='Observed Changes and Impacts\\nA.2 Widespread and rapid changes in the atmosphere, ocean, cryosphere and biosphere have occurred. Human-caused climate change is already affecting many weather and climate extremes in every region across the globe. This has led to widespread adverse impacts and related losses and damages to nature and people (high confidence). Vulnerable communities who have historically contributed the least to current climate change are disproportionately affected (high confidence). {2.1, Table 2.1, Figure 2.2, Figure 2.3} (Figure SPM.1)'),\n",
332
- " Document(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': 1194.0, 'num_tokens': 224.0, 'num_tokens_approx': 265.0, 'num_words': 199.0, 'page_number': 13, 'release_date': 2023.0, 'report_type': 'SPM', 'section_header': 'b) Impacts are driven by changes in multiple physical climate \\r\\nconditions, which are increasingly attributed to human influence', '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.693956316, 'content': 'Figure SPM.1: (a) Climate change has already caused widespread impacts and related losses and damages on human systems and altered terrestrial, freshwater and ocean ecosystems worldwide. Physical water availability includes balance of water available from various sources including ground water, water quality and demand for water. Global mental health and displacement assessments reflect only assessed regions. Confidence levels reflect the assessment of attribution of the observed impact to climate change. (b) Observed impacts are connected to physical climate changes including many that have been attributed to human influence such as the selected climatic impact-drivers shown. Confidence and likelihood levels reflect the assessment of attribution of the observed climatic impact-driver to human influence. (c) Observed (1900-2020) and projected (2021-2100) changes in global surface temperature (relative to 1850-1900), which are linked to changes in climate conditions and impacts, illustrate how the climate has already changed and will change along the lifespan of three \\nObserved increase in climate impacts to human systems and ecosystems assessed at global level'}, page_content='Figure SPM.1: (a) Climate change has already caused widespread impacts and related losses and damages on human systems and altered terrestrial, freshwater and ocean ecosystems worldwide. Physical water availability includes balance of water available from various sources including ground water, water quality and demand for water. Global mental health and displacement assessments reflect only assessed regions. Confidence levels reflect the assessment of attribution of the observed impact to climate change. (b) Observed impacts are connected to physical climate changes including many that have been attributed to human influence such as the selected climatic impact-drivers shown. Confidence and likelihood levels reflect the assessment of attribution of the observed climatic impact-driver to human influence. (c) Observed (1900-2020) and projected (2021-2100) changes in global surface temperature (relative to 1850-1900), which are linked to changes in climate conditions and impacts, illustrate how the climate has already changed and will change along the lifespan of three \\nObserved increase in climate impacts to human systems and ecosystems assessed at global level'),\n",
333
- " Document(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': 942.0, 'num_tokens': 226.0, 'num_tokens_approx': 260.0, 'num_words': 195.0, 'page_number': 24, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Summary for Policymakers', '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.688985765, 'content': 'biological, biogeochemical, geomorphological and physical aspects. Higher risks associated with compound effects of climate hazards include habitat and biodiversity loss, changes in species composition and distribution ranges, and impacts/risks on ecosystem structure and functioning, including changes in animal/plant biomass and density, productivity, carbon fluxes, and sediment transport. As part of the assessment, literature was compiled and data extracted into a summary table. A multi-round expert elicitation process was undertaken with independent evaluation of threshold judgement, and a final consensus discussion. Further information on methods and underlying literature can be found in Chapter 5, Sections 5.2 and 5.3 and Supplementary Material. {3.2.3, 3.2.4, 5.2, 5.3, 5.2.5, 5.3.7, SM5.6, SM5.8, Figure 5.16, Cross Chapter Box 1 in Chapter 1 Table CCB1} \\n <Section-header> Summary for Policymakers </Section-header>'}, page_content='biological, biogeochemical, geomorphological and physical aspects. Higher risks associated with compound effects of climate hazards include habitat and biodiversity loss, changes in species composition and distribution ranges, and impacts/risks on ecosystem structure and functioning, including changes in animal/plant biomass and density, productivity, carbon fluxes, and sediment transport. As part of the assessment, literature was compiled and data extracted into a summary table. A multi-round expert elicitation process was undertaken with independent evaluation of threshold judgement, and a final consensus discussion. Further information on methods and underlying literature can be found in Chapter 5, Sections 5.2 and 5.3 and Supplementary Material. {3.2.3, 3.2.4, 5.2, 5.3, 5.2.5, 5.3.7, SM5.6, SM5.8, Figure 5.16, Cross Chapter Box 1 in Chapter 1 Table CCB1} \\n <Section-header> Summary for Policymakers </Section-header>'),\n",
334
- " Document(metadata={'chunk_type': 'text', 'document_id': 'document12', 'document_number': 12.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: Climate Change and Land: an IPCC special report on climate change, desertification, land degradation, sustainable land management, food security, and greenhouse gas fluxes in terrestrial ecosystems', 'num_characters': 633.0, 'num_tokens': 170.0, 'num_tokens_approx': 194.0, 'num_words': 146.0, 'page_number': 17, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Summary for Policymakers', 'short_name': 'IPCC SR CCL 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/4/2022/11/SRCCL_SPM.pdf', 'similarity_score': 0.686773837, 'content': 'A.5 Climate change creates additional stresses on land, exacerbating existing risks to livelihoods, biodiversity, human and ecosystem health, infrastructure, and food systems (high confidence). Increasing impacts on land are projected under all future GHG emission scenarios (high confidence). Some regions will face higher risks, while some regions will face risks previously not anticipated (high confidence). Cascading risks with impacts on multiple systems and sectors also vary across regions (high confidence). (Figure SPM.2) {2.2, 3.5, 4.2, 4.4, 4.7, 5.1, 5.2, 5.8, 6.1, 7.2, 7.3, Cross-Chapter Box 9 in Chapter 6}'}, page_content='A.5 Climate change creates additional stresses on land, exacerbating existing risks to livelihoods, biodiversity, human and ecosystem health, infrastructure, and food systems (high confidence). Increasing impacts on land are projected under all future GHG emission scenarios (high confidence). Some regions will face higher risks, while some regions will face risks previously not anticipated (high confidence). Cascading risks with impacts on multiple systems and sectors also vary across regions (high confidence). (Figure SPM.2) {2.2, 3.5, 4.2, 4.4, 4.7, 5.1, 5.2, 5.8, 6.1, 7.2, 7.3, Cross-Chapter Box 9 in Chapter 6}'),\n",
335
- " Document(metadata={'chunk_type': 'text', 'document_id': 'document11', 'document_number': 11.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 24.0, 'name': 'Summary for Policymakers. In: Global Warming of 1.5°C. An IPCC Special Report on the impacts of global warming of 1.5°C above pre-industrial levels and related global greenhouse gas emission pathways, in the context of strengthening the global response to the threat of climate change, sustainable development, and efforts to eradicate poverty', 'num_characters': 1278.0, 'num_tokens': 232.0, 'num_tokens_approx': 280.0, 'num_words': 210.0, 'page_number': 11, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'B. Projected Climate Change, Potential Impacts and Associated Risks', 'short_name': 'IPCC SR GW 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/2/2022/06/SPM_version_report_LR.pdf', 'similarity_score': 0.686343133, 'content': '10 Here, impacts on economic growth refer to changes in gross domestic product (GDP). Many impacts, such as loss of human lives, cultural heritage and ecosystem services, are difficult to value and monetize. RFC1 Unique and threatened systems: ecological and human systems that have restricted geographic ranges constrained by climate-related conditions and have high endemism or other distinctive properties. Examples include coral reefs, the Arctic and its indigenous people, mountain glaciers and biodiversity hotspots. RFC2 Extreme weather events: risks/impacts to human health, livelihoods, assets and ecosystems from extreme weather events such as heat waves, heavy rain, drought and associated wildfires, and coastal flooding. RFC3 Distribution of impacts: risks/impacts that disproportionately affect particular groups due to uneven distribution of physical climate change hazards, exposure or vulnerability. RFC4 Global aggregate impacts: global monetary damage, global-scale degradation and loss of ecosystems and biodiversity. RFC5 Large-scale singular events: are relatively large, abrupt and sometimes irreversible changes in systems that are caused by global warming. Examples include disintegration of the Greenland and Antarctic ice sheets.\\n11'}, page_content='10 Here, impacts on economic growth refer to changes in gross domestic product (GDP). Many impacts, such as loss of human lives, cultural heritage and ecosystem services, are difficult to value and monetize. RFC1 Unique and threatened systems: ecological and human systems that have restricted geographic ranges constrained by climate-related conditions and have high endemism or other distinctive properties. Examples include coral reefs, the Arctic and its indigenous people, mountain glaciers and biodiversity hotspots. RFC2 Extreme weather events: risks/impacts to human health, livelihoods, assets and ecosystems from extreme weather events such as heat waves, heavy rain, drought and associated wildfires, and coastal flooding. RFC3 Distribution of impacts: risks/impacts that disproportionately affect particular groups due to uneven distribution of physical climate change hazards, exposure or vulnerability. RFC4 Global aggregate impacts: global monetary damage, global-scale degradation and loss of ecosystems and biodiversity. RFC5 Large-scale singular events: are relatively large, abrupt and sometimes irreversible changes in systems that are caused by global warming. Examples include disintegration of the Greenland and Antarctic ice sheets.\\n11')],\n",
336
- " 'docs_full': [Document(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': 1152.0, 'num_tokens': 223.0, 'num_tokens_approx': 285.0, 'num_words': 214.0, 'page_number': 2517, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '(a) Low-lying coastal systems', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 16 Key Risks across Sectors and Regions', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.738316119, 'content': \"'Impact of climate change' is defined as the difference between the observed state of the system and the state of the system assuming the same observed levels of non-climate-related drivers but no climate change. For example, we can compare the level of crop yields, damage induced by a river flood, and coral bleaching with differences in fertilizer input, land use patterns or settlement structures, without climate change and with climate change occurring.\\nWhile this definition is quite clear, there certainly is the problem that, in real life, we do not have a 'no climate change world' to compare with. We use model simulations where the influence of climate change can be eliminated to estimate what might have happened without climate change. In a situation where the influence of other non-climate-related drivers is known to be minor (e.g., in very remote locations), the non-climate-change situation can also be approximated by observation from an early period where climate change was still minor. Often, a combination of different approaches increases our confidence in the quantification of the impact of climate change.\"}, page_content=\"'Impact of climate change' is defined as the difference between the observed state of the system and the state of the system assuming the same observed levels of non-climate-related drivers but no climate change. For example, we can compare the level of crop yields, damage induced by a river flood, and coral bleaching with differences in fertilizer input, land use patterns or settlement structures, without climate change and with climate change occurring.\\nWhile this definition is quite clear, there certainly is the problem that, in real life, we do not have a 'no climate change world' to compare with. We use model simulations where the influence of climate change can be eliminated to estimate what might have happened without climate change. In a situation where the influence of other non-climate-related drivers is known to be minor (e.g., in very remote locations), the non-climate-change situation can also be approximated by observation from an early period where climate change was still minor. Often, a combination of different approaches increases our confidence in the quantification of the impact of climate change.\"),\n",
337
- " Document(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': 1010.0, 'num_tokens': 218.0, 'num_tokens_approx': 222.0, 'num_words': 167.0, 'page_number': 878, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': '6.5 Implications of Changing Climate on AQ', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': '6: Short-lived Climate Forcers', 'toc_level1': '6.5 Implications of Changing Climate on AQ', 'toc_level2': '6.5.1 Effect of Climate Change on Surface Ozone', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.737111747, 'content': 'Air pollutants can be impacted by climate change through physical changes affecting meterorological conditions, chemical changes affecting their lifetimes, and biological changes affecting their natural emissions (Kirtman et al., 2013). Changes in meteorology affect air quality directly through modifications of atmospheric transport patterns (e.g., occurrence and length of atmospheric blocking episodes, ventilation of the polluted boundary layer), extent of mixing layer and stratosphere-troposphere exchange (STE) for surface ozone (von Schneidemesser et al., 2015), and through modifications of the rate of reactions that generate secondary species in the atmosphere. Changing precipitation patterns in a future climate also influence the wet removal efficiency, in particular for atmospheric aerosols (Hou et al., 2018). Processes at play in non-CO2 biogeochemical feedbacks (Section 6.4.5) are also involved in the perturbation of atmospheric pollutants (Section 6.2.2).'}, page_content='Air pollutants can be impacted by climate change through physical changes affecting meterorological conditions, chemical changes affecting their lifetimes, and biological changes affecting their natural emissions (Kirtman et al., 2013). Changes in meteorology affect air quality directly through modifications of atmospheric transport patterns (e.g., occurrence and length of atmospheric blocking episodes, ventilation of the polluted boundary layer), extent of mixing layer and stratosphere-troposphere exchange (STE) for surface ozone (von Schneidemesser et al., 2015), and through modifications of the rate of reactions that generate secondary species in the atmosphere. Changing precipitation patterns in a future climate also influence the wet removal efficiency, in particular for atmospheric aerosols (Hou et al., 2018). Processes at play in non-CO2 biogeochemical feedbacks (Section 6.4.5) are also involved in the perturbation of atmospheric pollutants (Section 6.2.2).'),\n",
338
- " Document(metadata={'chunk_type': 'text', 'document_id': 'document5', 'document_number': 5.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 84.0, 'name': 'Technical Summary. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC', 'num_characters': 413.0, 'num_tokens': 75.0, 'num_tokens_approx': 82.0, 'num_words': 62.0, 'page_number': 11, 'release_date': 2022.0, 'report_type': 'TS', 'section_header': 'TS.B Observed Impacts', 'short_name': 'IPCC AR6 WGII TS', 'source': 'IPCC', 'toc_level0': 'TS.B Observed Impacts', 'toc_level1': 'Ecosystems and biodiversity', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_TechnicalSummary.pdf', 'similarity_score': 0.730846643, 'content': 'Climate change impacts are concurrent and interact with other significant societal changes that have become more salient since AR5, including a growing and urbanising global population; significant inequality and demands for social justice; rapid technological change; continuing poverty, land and water degradation, biodiversity loss; food insecurity; and a global pandemic.\\nEcosystems and biodiversity'}, page_content='Climate change impacts are concurrent and interact with other significant societal changes that have become more salient since AR5, including a growing and urbanising global population; significant inequality and demands for social justice; rapid technological change; continuing poverty, land and water degradation, biodiversity loss; food insecurity; and a global pandemic.\\nEcosystems and biodiversity'),\n",
339
- " Document(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': 413.0, 'num_tokens': 75.0, 'num_tokens_approx': 82.0, 'num_words': 62.0, 'page_number': 57, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'TS.B Observed Impacts', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Technical Summary ', '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.730846643, 'content': 'Climate change impacts are concurrent and interact with other significant societal changes that have become more salient since AR5, including a growing and urbanising global population; significant inequality and demands for social justice; rapid technological change; continuing poverty, land and water degradation, biodiversity loss; food insecurity; and a global pandemic.\\nEcosystems and biodiversity'}, page_content='Climate change impacts are concurrent and interact with other significant societal changes that have become more salient since AR5, including a growing and urbanising global population; significant inequality and demands for social justice; rapid technological change; continuing poverty, land and water degradation, biodiversity loss; food insecurity; and a global pandemic.\\nEcosystems and biodiversity')]}"
340
- ]
341
- },
342
- "execution_count": 11,
343
- "metadata": {},
344
- "output_type": "execute_result"
345
- }
346
- ],
347
- "source": [
348
- "docs_question"
349
- ]
350
- },
351
- {
352
- "cell_type": "code",
353
- "execution_count": 12,
354
- "metadata": {},
355
- "outputs": [],
356
- "source": [
357
- "# from climateqa.knowledge.retriever import ClimateQARetriever\n",
358
- "\n",
359
- "# # Search the document store using the retriever\n",
360
- "# retriever = GraphRetriever(\n",
361
- "# vectorstore = vectorstore,\n",
362
- "# sources = sources,\n",
363
- "# k_total = k_before_reranking,\n",
364
- "# threshold = 0.5,\n",
365
- "# )\n",
366
- "# docs_question = retriever.get_relevant_documents(question)"
367
- ]
368
- },
369
  {
370
  "cell_type": "markdown",
371
  "metadata": {},
@@ -685,29 +473,6 @@
685
  "retriever_node"
686
  ]
687
  },
688
- {
689
- "cell_type": "code",
690
- "execution_count": null,
691
- "metadata": {},
692
- "outputs": [
693
- {
694
- "ename": "TypeError",
695
- "evalue": "'RunnableLambda' object is not callable",
696
- "output_type": "error",
697
- "traceback": [
698
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
699
- "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
700
- "Cell \u001b[0;32mIn[68], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m new_state \u001b[38;5;241m=\u001b[39m state\u001b[38;5;241m.\u001b[39mcopy()\n\u001b[0;32m----> 2\u001b[0m new_state\u001b[38;5;241m.\u001b[39mupdate(\u001b[38;5;28;01mawait\u001b[39;00m \u001b[43mretriever_node\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m{\u001b[49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# .append(await retriever_node(state,{})\u001b[39;00m\n",
701
- "\u001b[0;31mTypeError\u001b[0m: 'RunnableLambda' object is not callable"
702
- ]
703
- }
704
- ],
705
- "source": [
706
- "# new_state = state.copy()\n",
707
- "# new_state.update(await retriever_node(state, {}))\n",
708
- "# # .append(await retriever_node(state,{})"
709
- ]
710
- },
711
  {
712
  "cell_type": "code",
713
  "execution_count": 69,
@@ -1002,13 +767,6 @@
1002
  "async for event in event_list:\n",
1003
  " pass"
1004
  ]
1005
- },
1006
- {
1007
- "cell_type": "code",
1008
- "execution_count": null,
1009
- "metadata": {},
1010
- "outputs": [],
1011
- "source": []
1012
  }
1013
  ],
1014
  "metadata": {
 
116
  "docs_question"
117
  ]
118
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  {
120
  "cell_type": "code",
121
  "execution_count": 7,
 
154
  "owid_graphs"
155
  ]
156
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  {
158
  "cell_type": "markdown",
159
  "metadata": {},
 
473
  "retriever_node"
474
  ]
475
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  {
477
  "cell_type": "code",
478
  "execution_count": 69,
 
767
  "async for event in event_list:\n",
768
  " pass"
769
  ]
 
 
 
 
 
 
 
770
  }
771
  ],
772
  "metadata": {