diff --git "a/sandbox/20241104 - CQA - StepByStep CQA.ipynb" "b/sandbox/20241104 - CQA - StepByStep CQA.ipynb"
--- "a/sandbox/20241104 - CQA - StepByStep CQA.ipynb"
+++ "b/sandbox/20241104 - CQA - StepByStep CQA.ipynb"
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 39,
"metadata": {},
"outputs": [
{
@@ -19,7 +19,7 @@
"True"
]
},
- "execution_count": 3,
+ "execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
@@ -33,7 +33,7 @@
"%autoreload 2\n",
"\n",
"import sys\n",
- "sys.path.append(os.getcwd()+\"../\")\n",
+ "sys.path.append(os.path.dirname(os.getcwd()))\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv()"
@@ -48,7 +48,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 40,
"metadata": {},
"outputs": [
{
@@ -61,10 +61,10 @@
{
"data": {
"text/plain": [
- "AIMessage(content='Hello! How can I assist you today?', response_metadata={'finish_reason': 'stop'}, id='run-5993a6ca-a40b-4cf1-a0a1-cafad4510566-0')"
+ "AIMessage(content='Hello! How can I assist you today?', response_metadata={'finish_reason': 'stop'}, id='run-1e3aee01-7ae5-4ac8-88b2-294e7848f1ee-0')"
]
},
- "execution_count": 7,
+ "execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
@@ -86,7 +86,7 @@
},
{
"cell_type": "code",
- "execution_count": 56,
+ "execution_count": 41,
"metadata": {},
"outputs": [
{
@@ -122,7 +122,7 @@
" 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 Climate change \\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.')]"
]
},
- "execution_count": 56,
+ "execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
@@ -142,18 +142,52 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 44,
"metadata": {},
"outputs": [
{
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "INFO:pinecone_plugin_interface.logging:Discovering subpackages in _NamespacePath(['/home/tim/anaconda3/envs/climateqa/lib/python3.11/site-packages/pinecone_plugins'])\n",
- "INFO:pinecone_plugin_interface.logging:Looking for plugins in pinecone_plugins.inference\n",
- "INFO:pinecone_plugin_interface.logging:Installing plugin inference into Pinecone\n"
- ]
- },
+ "data": {
+ "text/plain": [
+ "{'chunk_type': 'text',\n",
+ " 'document_id': 'document6',\n",
+ " 'document_number': 6.0,\n",
+ " 'element_id': 'N/A',\n",
+ " 'figure_code': 'N/A',\n",
+ " 'file_size': 'N/A',\n",
+ " 'image_path': 'N/A',\n",
+ " 'n_pages': 3068.0,\n",
+ " 'name': 'Full Report. In: Climate Change 2022: Impacts, Adaptation and Vulnerability. Contribution of the WGII to the AR6 of the IPCC',\n",
+ " 'num_characters': 1152.0,\n",
+ " 'num_tokens': 223.0,\n",
+ " 'num_tokens_approx': 285.0,\n",
+ " 'num_words': 214.0,\n",
+ " 'page_number': 2516.0,\n",
+ " 'release_date': 2022.0,\n",
+ " 'report_type': 'Full Report',\n",
+ " 'section_header': '(a) Low-lying coastal systems',\n",
+ " 'short_name': 'IPCC AR6 WGII FR',\n",
+ " 'source': 'IPCC',\n",
+ " 'toc_level0': 'Chapters and Cross-Chapter Papers ',\n",
+ " 'toc_level1': 'Chapter 16 Key Risks across Sectors and Regions',\n",
+ " 'toc_level2': 'N/A',\n",
+ " 'toc_level3': 'N/A',\n",
+ " 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf'}"
+ ]
+ },
+ "execution_count": 44,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "docs_question[0].metadata"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [
{
"data": {
"text/plain": [
@@ -169,7 +203,7 @@
" 0.643842101)]"
]
},
- "execution_count": 17,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -187,12 +221,165 @@
"owid_graphs"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from climateqa.knowledge.retriever import ClimateQARetriever\n",
+ "\n",
+ "sources = [\"IPCC\"]\n",
+ "k_summary = 5\n",
+ "k_before_reranking = 10\n",
+ "config={}\n",
+ "# Search the document store using the retriever\n",
+ "# Configure high top k for further reranking step\n",
+ "retriever = ClimateQARetriever(\n",
+ " vectorstore=vectorstore_ipcc,\n",
+ " sources = sources,\n",
+ " min_size = 200,\n",
+ " k_summary = k_summary,\n",
+ " k_total = k_before_reranking,\n",
+ " threshold = 0.5,\n",
+ ")\n",
+ "docs_question = await retriever.ainvoke(question,config)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[(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",
+ " 0.716457784),\n",
+ " (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",
+ " 0.70854187),\n",
+ " (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",
+ " 0.699624538),\n",
+ " (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",
+ " 0.693654299),\n",
+ " (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",
+ " 0.693352699),\n",
+ " (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",
+ " 0.692583323),\n",
+ " (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",
+ " 0.687731683),\n",
+ " (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",
+ " 0.686938882),\n",
+ " (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",
+ " 0.68600893),\n",
+ " (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",
+ " 0.683739603),\n",
+ " (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",
+ " 0.682781458),\n",
+ " (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",
+ " 0.681671679),\n",
+ " (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",
+ " 0.677480817),\n",
+ " (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",
+ " 0.675764263),\n",
+ " (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",
+ " 0.674771845)]"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "vectorstore_ipcc.similarity_search_with_score(query=question,filter = {\"chunk_type\": \"image\"},k = 15)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[(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",
+ " 0.738316119),\n",
+ " (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",
+ " 0.737111747),\n",
+ " (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 4.7.1 Effects of climate change on \\r\\nbiodiversity \\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",
+ " 0.736420274),\n",
+ " (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 Climate change \\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",
+ " 0.734916091),\n",
+ " (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",
+ " 0.733919621),\n",
+ " (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",
+ " 0.730846643),\n",
+ " (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",
+ " 0.730846643),\n",
+ " (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",
+ " 0.730548739),\n",
+ " (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",
+ " 0.730548739),\n",
+ " (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",
+ " 0.726093054),\n",
+ " (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",
+ " 0.726076663),\n",
+ " (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 Climate change '),\n",
+ " 0.725297272),\n",
+ " (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",
+ " 0.724390745),\n",
+ " (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",
+ " 0.719455361),\n",
+ " (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",
+ " 0.719132543)]"
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "vectorstore_ipcc.similarity_search_with_score(query=question,filter = {\"chunk_type\": \"text\"},k = 15)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[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': 13, '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', 'similarity_score': 0.716457784, '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.'}, 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",
+ " 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",
+ " 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",
+ " 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 Summary for Policymakers '}, 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 Summary for Policymakers '),\n",
+ " 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': 11, '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', 'similarity_score': 0.687731683, '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.'}, 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",
+ " 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",
+ " 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",
+ " 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'),\n",
+ " 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')]"
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "docs_question"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
+ "# from climateqa.knowledge.retriever import ClimateQARetriever\n",
+ "\n",
"# # Search the document store using the retriever\n",
"# retriever = GraphRetriever(\n",
"# vectorstore = vectorstore,\n",
@@ -212,7 +399,7 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
@@ -232,7 +419,7 @@
" 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', 'reranking_score': 0.9812125563621521, 'query_used_for_retrieval': 'What is the impact of climate change on the environment?'}, 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 Climate change \\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.')]"
]
},
- "execution_count": 16,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -255,7 +442,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -285,7 +472,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@@ -308,7 +495,7 @@
},
{
"cell_type": "code",
- "execution_count": 150,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -318,7 +505,7 @@
},
{
"cell_type": "code",
- "execution_count": 151,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
@@ -356,7 +543,7 @@
" 'query': 'What is the impact of climate change on the environment?'}"
]
},
- "execution_count": 151,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -369,7 +556,7 @@
},
{
"cell_type": "code",
- "execution_count": 152,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
@@ -383,7 +570,7 @@
" 'query': 'What is the impact of climate change on the environment?'}"
]
},
- "execution_count": 152,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -395,34 +582,9 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 15,
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "---- Translate query ----\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"
- ]
- },
- {
- "data": {
- "text/plain": [
- "{'query': 'What is the impact of climate change on the environment?'}"
- ]
- },
- "execution_count": 165,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"intent = route_intent(state)\n",
"\n",
@@ -432,21 +594,14 @@
},
{
"cell_type": "code",
- "execution_count": 154,
+ "execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "---- Transform query ----"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n"
+ "---- Transform query ----\n"
]
},
{
@@ -476,7 +631,7 @@
" 'n_questions': 2}"
]
},
- "execution_count": 154,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -488,7 +643,7 @@
},
{
"cell_type": "code",
- "execution_count": 155,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -496,7 +651,21 @@
"output_type": "stream",
"text": [
"---- Retrieving graphs ----\n",
- "Subquestion 0: What are the effects of climate change on ecosystems?\n",
+ "Subquestion 0: What are the effects of climate change on ecosystems?\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/home/tim/ai4s/climate_qa/climate-question-answering/climateqa/engine/chains/graph_retriever.py:91: LangChainDeprecationWarning: The method `BaseRetriever.get_relevant_documents` was deprecated in langchain-core 0.1.46 and will be removed in 1.0. Use invoke instead.\n",
+ " docs_question = retriever.get_relevant_documents(question)\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
"8 graphs retrieved for subquestion 1: [Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_386', 'returned_content': '', 'source': 'OWID', 'subtitle': \"This is shown as a country or region's share of the global mean surface temperature change as a result of its cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contributions-global-temp-change', 'similarity_score': 0.649586797, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.004589226096868515, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_349', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Consumption-based emissions are national emissions that have been adjusted for trade. This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp', 'similarity_score': 0.623827338, 'content': 'Change in CO2 emissions and GDP', 'reranking_score': 0.002260460052639246, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in CO2 emissions and GDP'), Document(metadata={'category': 'Forests & Deforestation', 'doc_id': 'owid_1358', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Net change in forest area measures forest expansion (either through afforestation or natural expansion) minus deforestation', 'url': 'https://ourworldindata.org/grapher/annual-change-forest-area', 'similarity_score': 0.612325966, 'content': 'Annual change in forest area', 'reranking_score': 0.001020866329781711, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Annual change in forest area'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_351', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp-long-term', 'similarity_score': 0.611927152, 'content': 'Change in per capita CO2 emissions and GDP', 'reranking_score': 0.0006646059919148684, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in per capita CO2 emissions and GDP'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_330', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Data source: Global Carbon Budget (2023)', 'url': 'https://ourworldindata.org/grapher/co2-emissions-fossil-land', 'similarity_score': 0.602846205, 'content': 'CO2 emissions from fossil fuels and land-use change', 'reranking_score': 0.00017391949950251728, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='CO2 emissions from fossil fuels and land-use change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_372', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions from land-use change can be positive or negative depending on whether these changes emit (positive) or sequester (negative) carbon.', 'url': 'https://ourworldindata.org/grapher/cumulative-co2-land-use', 'similarity_score': 0.59720397, 'content': 'Cumulative CO2 emissions from land-use change', 'reranking_score': 4.376090510049835e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Cumulative CO2 emissions from land-use change'), Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_199', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The number of species at risk of losing greater than 25% of their habitat as a result of agricultural expansion under business-as-usual projections to 2050. This is shown for countries with more than 25 species at risk.', 'url': 'https://ourworldindata.org/grapher/habitat-loss-25-species', 'similarity_score': 0.59466666, 'content': 'Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050', 'reranking_score': 2.851418685168028e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_375', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions include those from fossil fuels and industry, and land-use change. They are measured as the cumulative total since 1850, in tonnes.', 'url': 'https://ourworldindata.org/grapher/cumulative-co2-including-land', 'similarity_score': 0.593179703, 'content': 'Cumulative CO2 emissions including land-use change', 'reranking_score': 2.8351740184007213e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Cumulative CO2 emissions including land-use change')]\n",
"Subquestion 1: How does climate change affect biodiversity and wildlife?\n",
"7 graphs retrieved for subquestion 2: [Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_199', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The number of species at risk of losing greater than 25% of their habitat as a result of agricultural expansion under business-as-usual projections to 2050. This is shown for countries with more than 25 species at risk.', 'url': 'https://ourworldindata.org/grapher/habitat-loss-25-species', 'similarity_score': 0.638248205, 'content': 'Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050', 'reranking_score': 0.00037698738742619753, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050'), Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_192', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The bird population index is measured relative to population size in the year 2000 (i.e. the value in 2000 = 100).', 'url': 'https://ourworldindata.org/grapher/bird-populations-eu', 'similarity_score': 0.637129366, 'content': 'Change in bird populations in the EU', 'reranking_score': 0.0002982213336508721, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in bird populations in the EU'), Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_235', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The projected number of mammal, bird and amphibian species losing a certain extent of habitat by 2050 as a result of cropland expansion globally under a business-as-usual-scenario.', 'url': 'https://ourworldindata.org/grapher/projected-habitat-loss-extent-bau', 'similarity_score': 0.629549921, 'content': 'Number of animal species losing habitat due to cropland expansion by 2050', 'reranking_score': 0.00019150562002323568, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Number of animal species losing habitat due to cropland expansion by 2050'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_386', 'returned_content': '', 'source': 'OWID', 'subtitle': \"This is shown as a country or region's share of the global mean surface temperature change as a result of its cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contributions-global-temp-change', 'similarity_score': 0.626872361, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.0001559457741677761, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_349', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Consumption-based emissions are national emissions that have been adjusted for trade. This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp', 'similarity_score': 0.605995178, 'content': 'Change in CO2 emissions and GDP', 'reranking_score': 0.00015302258543670177, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in CO2 emissions and GDP'), Document(metadata={'category': 'Forests & Deforestation', 'doc_id': 'owid_1358', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Net change in forest area measures forest expansion (either through afforestation or natural expansion) minus deforestation', 'url': 'https://ourworldindata.org/grapher/annual-change-forest-area', 'similarity_score': 0.605800509, 'content': 'Annual change in forest area', 'reranking_score': 0.00011613907554419711, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Annual change in forest area'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_351', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp-long-term', 'similarity_score': 0.59752804, 'content': 'Change in per capita CO2 emissions and GDP', 'reranking_score': 0.00010721882426878437, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in per capita CO2 emissions and GDP')]\n"
@@ -530,7 +699,7 @@
" Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_375', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions include those from fossil fuels and industry, and land-use change. They are measured as the cumulative total since 1850, in tonnes.', 'url': 'https://ourworldindata.org/grapher/cumulative-co2-including-land', 'similarity_score': 0.593179703, 'content': 'Cumulative CO2 emissions including land-use change', 'reranking_score': 2.8351740184007213e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Cumulative CO2 emissions including land-use change')]}"
]
},
- "execution_count": 155,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -542,16 +711,16 @@
},
{
"cell_type": "code",
- "execution_count": 156,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "RunnableLambda(afunc=lambda x: x.metadata['reranking_score'])"
+ ".retrieve_classical_docs(state, config)>"
]
},
- "execution_count": 156,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -563,74 +732,53 @@
},
{
"cell_type": "code",
- "execution_count": 157,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "---- Retrieve documents ----\n",
- "{'documents': [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': 442.0, 'num_tokens': 113.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 13, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts on Ecosystems', '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.768190384, 'content': 'A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}', 'reranking_score': 0.9998337030410767, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}'), 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': 830.0, 'num_tokens': 178.0, 'num_tokens_approx': 210.0, 'num_words': 158.0, 'page_number': 16, '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.731245279, 'content': 'Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change ', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change '), 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': 1030.0, 'num_tokens': 220.0, 'num_tokens_approx': 265.0, 'num_words': 199.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.728410065, 'content': 'A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result'), 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.728101909, '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 Summary for Policymakers ', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 Summary for Policymakers '), Document(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': 547.0, 'num_tokens': 104.0, 'num_tokens_approx': 116.0, 'num_words': 87.0, 'page_number': 839, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '7.6.4.3 Ecological Barriers and Opportunities', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': '7.6 Assessment of Economic, Social and\\xa0Policy Responses', 'toc_level1': 'Box\\xa07.12 | Financing AFOLU Mitigation; What Are the Costs and Who Pays?', '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.789457798, 'content': 'The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).'), 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': 13, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9997003078460693, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'), 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': 59, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9996869564056396, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).')], 'remaining_questions': [{'question': 'How does climate change affect biodiversity and wildlife?', 'sources': ['IPCC'], 'index': 'Vector'}]}\n",
- "---- Retrieve documents ----\n",
- "{'documents': [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': 442.0, 'num_tokens': 113.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 13, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts on Ecosystems', '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.768190384, 'content': 'A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}', 'reranking_score': 0.9998337030410767, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}'), 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': 830.0, 'num_tokens': 178.0, 'num_tokens_approx': 210.0, 'num_words': 158.0, 'page_number': 16, '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.731245279, 'content': 'Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change ', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change '), 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': 1030.0, 'num_tokens': 220.0, 'num_tokens_approx': 265.0, 'num_words': 199.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.728410065, 'content': 'A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result'), 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.728101909, '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 Summary for Policymakers ', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 Summary for Policymakers '), Document(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': 547.0, 'num_tokens': 104.0, 'num_tokens_approx': 116.0, 'num_words': 87.0, 'page_number': 839, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '7.6.4.3 Ecological Barriers and Opportunities', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': '7.6 Assessment of Economic, Social and\\xa0Policy Responses', 'toc_level1': 'Box\\xa07.12 | Financing AFOLU Mitigation; What Are the Costs and Who Pays?', '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.789457798, 'content': 'The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).'), 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': 899.0, 'num_tokens': 228.0, 'num_tokens_approx': 272.0, 'num_words': 204.0, 'page_number': 10, '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.724869668, 'content': 'Summary for Policymakers\\nA.2.6 Global warming has led to shifts of climate zones in many world regions, including expansion of arid climate zones and contraction of polar climate zones (high confidence). As a consequence, many plant and animal species have experienced changes in their ranges, abundances, and shifts in their seasonal activities (high confidence). {2.2, 3.2.2, 4.4.1}\\nA.2.7 Climate change can exacerbate land degradation processes (high confidence) including through increases in rainfall intensity, flooding, drought frequency and severity, heat stress, dry spells, wind, sea-level rise and wave action, and permafrost thaw with outcomes being modulated by land management. Ongoing coastal erosion is intensifying and impinging on more regions with sea-level rise adding to land use pressure in some regions (medium confidence). {4.2.1, 4.2.2, 4.2.3, 4.4.1, 4.4.2, 4.9.6,', 'reranking_score': 0.9997363686561584, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='Summary for Policymakers\\nA.2.6 Global warming has led to shifts of climate zones in many world regions, including expansion of arid climate zones and contraction of polar climate zones (high confidence). As a consequence, many plant and animal species have experienced changes in their ranges, abundances, and shifts in their seasonal activities (high confidence). {2.2, 3.2.2, 4.4.1}\\nA.2.7 Climate change can exacerbate land degradation processes (high confidence) including through increases in rainfall intensity, flooding, drought frequency and severity, heat stress, dry spells, wind, sea-level rise and wave action, and permafrost thaw with outcomes being modulated by land management. Ongoing coastal erosion is intensifying and impinging on more regions with sea-level rise adding to land use pressure in some regions (medium confidence). {4.2.1, 4.2.2, 4.2.3, 4.4.1, 4.4.2, 4.9.6,'), 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.720580459, '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}', 'reranking_score': 0.9997039437294006, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, 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}'), 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': 13, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9997003078460693, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'), 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': 59, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9996869564056396, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'), 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': 442.0, 'num_tokens': 113.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 13, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts on Ecosystems', '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.714953661, 'content': 'A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}', 'reranking_score': 0.9996391534805298, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}'), Document(metadata={'chunk_type': 'text', 'document_id': 'document4', 'document_number': 4.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', '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': 1209.0, 'num_tokens': 218.0, 'num_tokens_approx': 262.0, 'num_words': 197.0, 'page_number': 24, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'Summary for Policymakers', 'short_name': 'IPCC AR6 WGII SPM', 'source': 'IPCC', 'toc_level0': 'C: Adaptation Measures and Enabling Conditions', 'toc_level1': 'Future Adaptation Options and their Feasibility', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_SummaryForPolicymakers.pdf', 'similarity_score': 0.714823604, 'content': \"C.2.4 Conservation, protection and restoration of terrestrial, freshwater, coastal and ocean ecosystems, together with targeted management to adapt to unavoidable impacts of climate change, reduces the vulnerability of biodiversity to climate change (high confidence). The resilience of species, biological communities and ecosystem processes increases with size of natural area, by restoration of degraded areas and by reducing non-climatic stressors (high confidence). To be effective, conservation and restoration actions will increasingly need to be responsive, as appropriate, to ongoing changes at various scales, and plan for future changes in ecosystem structure, community composition and species' distributions, especially as 1.5degC global warming is approached and even more so if it is exceeded (high confidence). Adaptation options, where circumstances allow, include facilitating the movement of species to new ecologically appropriate locations, particularly through increasing connectivity between conserved or protected areas, targeted intensive management for vulnerable species and protecting refugial areas where species can survive locally (medium confidence). {2.3, 2,6,\", 'reranking_score': 0.9995535016059875, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content=\"C.2.4 Conservation, protection and restoration of terrestrial, freshwater, coastal and ocean ecosystems, together with targeted management to adapt to unavoidable impacts of climate change, reduces the vulnerability of biodiversity to climate change (high confidence). The resilience of species, biological communities and ecosystem processes increases with size of natural area, by restoration of degraded areas and by reducing non-climatic stressors (high confidence). To be effective, conservation and restoration actions will increasingly need to be responsive, as appropriate, to ongoing changes at various scales, and plan for future changes in ecosystem structure, community composition and species' distributions, especially as 1.5degC global warming is approached and even more so if it is exceeded (high confidence). Adaptation options, where circumstances allow, include facilitating the movement of species to new ecologically appropriate locations, particularly through increasing connectivity between conserved or protected areas, targeted intensive management for vulnerable species and protecting refugial areas where species can survive locally (medium confidence). {2.3, 2,6,\"), 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': 13, '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', 'similarity_score': 0.709608436, '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.', 'reranking_score': 0.999546229839325, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, 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.'), 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': 506.0, 'num_tokens': 96.0, 'num_tokens_approx': 116.0, 'num_words': 87.0, 'page_number': 1951, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '14.2.2 Projected Changes in North American Climate', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 14 North America', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.814534, 'content': 'Biodiversity is affected by climate change in this way too. For example, numerous bird populations across North America are estimated to have declined by up to 30% over the past half-century. Multiple human-related factors, including habitat loss and agricultural intensification, contribute to these declines, with climate change as an added stressor. Increasingly extreme events, such as severe storms and wildfires, can decimate local populations of birds, adding to existing ecological threats.', 'reranking_score': 0.9995321035385132, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='Biodiversity is affected by climate change in this way too. For example, numerous bird populations across North America are estimated to have declined by up to 30% over the past half-century. Multiple human-related factors, including habitat loss and agricultural intensification, contribute to these declines, with climate change as an added stressor. Increasingly extreme events, such as severe storms and wildfires, can decimate local populations of birds, adding to existing ecological threats.'), 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': 299.0, 'num_tokens': 63.0, 'num_tokens_approx': 68.0, 'num_words': 51.0, 'page_number': 178, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': '1.2.1.2 Long-Term Perspectives on \\r\\nAnthropogenic Climate Change', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': '1: Framing, Context, and Methods', 'toc_level1': '1.2 Where We Are Now', 'toc_level2': '1.2.2 The Policy and Governance Context', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.782265961, 'content': \"Biodiversity and Ecosystem Services (IPBES, 2019), climate change is a 'direct driver that is increasingly exacerbating the impact of other drivers on nature and human well-being', and 'the adverse impacts of climate change on biodiversity are projected to increase with increasing warming.'\", 'reranking_score': 0.9995050430297852, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content=\"Biodiversity and Ecosystem Services (IPBES, 2019), climate change is a 'direct driver that is increasingly exacerbating the impact of other drivers on nature and human well-being', and 'the adverse impacts of climate change on biodiversity are projected to increase with increasing warming.'\")], 'remaining_questions': []}\n"
+ "---- Retrieve documents ----\n"
]
- },
- {
- "data": {
- "text/plain": [
- "{'user_input': 'What is the impact of climate change on the environment?',\n",
- " 'audience': 'the general public who know the basics in science and climate change and want to learn more about it without technical terms. Still use references to passages.',\n",
- " 'sources_input': ['IPCC'],\n",
- " 'intent': 'search',\n",
- " 'language': 'English',\n",
- " 'query': 'What is the impact of climate change on the environment?',\n",
- " 'remaining_questions': [],\n",
- " 'n_questions': 2,\n",
- " 'recommended_content': [Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_386', 'returned_content': '', 'source': 'OWID', 'subtitle': \"This is shown as a country or region's share of the global mean surface temperature change as a result of its cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contributions-global-temp-change', 'similarity_score': 0.649586797, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.004589226096868515, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'),\n",
- " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_349', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Consumption-based emissions are national emissions that have been adjusted for trade. This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp', 'similarity_score': 0.623827338, 'content': 'Change in CO2 emissions and GDP', 'reranking_score': 0.002260460052639246, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in CO2 emissions and GDP'),\n",
- " Document(metadata={'category': 'Forests & Deforestation', 'doc_id': 'owid_1358', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Net change in forest area measures forest expansion (either through afforestation or natural expansion) minus deforestation', 'url': 'https://ourworldindata.org/grapher/annual-change-forest-area', 'similarity_score': 0.612325966, 'content': 'Annual change in forest area', 'reranking_score': 0.001020866329781711, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Annual change in forest area'),\n",
- " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_351', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This measures fossil fuel and industry emissions. Land-use change is not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp-long-term', 'similarity_score': 0.611927152, 'content': 'Change in per capita CO2 emissions and GDP', 'reranking_score': 0.0006646059919148684, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in per capita CO2 emissions and GDP'),\n",
- " Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_199', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The number of species at risk of losing greater than 25% of their habitat as a result of agricultural expansion under business-as-usual projections to 2050. This is shown for countries with more than 25 species at risk.', 'url': 'https://ourworldindata.org/grapher/habitat-loss-25-species', 'similarity_score': 0.638248205, 'content': 'Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050', 'reranking_score': 0.00037698738742619753, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050'),\n",
- " Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_192', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The bird population index is measured relative to population size in the year 2000 (i.e. the value in 2000 = 100).', 'url': 'https://ourworldindata.org/grapher/bird-populations-eu', 'similarity_score': 0.637129366, 'content': 'Change in bird populations in the EU', 'reranking_score': 0.0002982213336508721, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in bird populations in the EU'),\n",
- " Document(metadata={'category': 'Biodiversity', 'doc_id': 'owid_235', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The projected number of mammal, bird and amphibian species losing a certain extent of habitat by 2050 as a result of cropland expansion globally under a business-as-usual-scenario.', 'url': 'https://ourworldindata.org/grapher/projected-habitat-loss-extent-bau', 'similarity_score': 0.629549921, 'content': 'Number of animal species losing habitat due to cropland expansion by 2050', 'reranking_score': 0.00019150562002323568, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IEA', 'OWID']}, page_content='Number of animal species losing habitat due to cropland expansion by 2050'),\n",
- " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_330', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Data source: Global Carbon Budget (2023)', 'url': 'https://ourworldindata.org/grapher/co2-emissions-fossil-land', 'similarity_score': 0.602846205, 'content': 'CO2 emissions from fossil fuels and land-use change', 'reranking_score': 0.00017391949950251728, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='CO2 emissions from fossil fuels and land-use change'),\n",
- " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_372', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions from land-use change can be positive or negative depending on whether these changes emit (positive) or sequester (negative) carbon.', 'url': 'https://ourworldindata.org/grapher/cumulative-co2-land-use', 'similarity_score': 0.59720397, 'content': 'Cumulative CO2 emissions from land-use change', 'reranking_score': 4.376090510049835e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Cumulative CO2 emissions from land-use change'),\n",
- " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_375', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions include those from fossil fuels and industry, and land-use change. They are measured as the cumulative total since 1850, in tonnes.', 'url': 'https://ourworldindata.org/grapher/cumulative-co2-including-land', 'similarity_score': 0.593179703, 'content': 'Cumulative CO2 emissions including land-use change', 'reranking_score': 2.8351740184007213e-05, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IEA', 'OWID']}, page_content='Cumulative CO2 emissions including land-use change')],\n",
- " 'documents': [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': 442.0, 'num_tokens': 113.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 13, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts on Ecosystems', '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.768190384, 'content': 'A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}', 'reranking_score': 0.9998337030410767, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}'),\n",
- " 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': 830.0, 'num_tokens': 178.0, 'num_tokens_approx': 210.0, 'num_words': 158.0, 'page_number': 16, '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.731245279, 'content': 'Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change ', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='Summary for Policymakers\\nA. Risks to humans and ecosystems from changes in land-based processes as a result of climate change\\nIncreases in global mean surface temperature (GMST), relative to pre-industrial levels, aect processes involved in desertification (water scarcity), land degradation (soil erosion, vegetation loss, wildfire, permafrost thaw) and food security (crop yield and food supply instabilities). Changes in these processes drive risks to food systems, livelihoods, infrastructure, the value of land, and human and ecosystem health. Changes in one process (e.g. wildfire or water scarcity) may result in compound risks. Risks are location-specific and dier by region.\\n A. Risks to humans and ecosystems from changes in land-based processes as a result of climate change '),\n",
- " 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': 1030.0, 'num_tokens': 220.0, 'num_tokens_approx': 265.0, 'num_words': 199.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.728410065, 'content': 'A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result', 'reranking_score': 0.9997828602790833, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='A.2.3 Climate change has caused substantial damages, and increasingly irreversible losses, in terrestrial, freshwater, cryospheric, and coastal and open ocean ecosystems (high confidence). Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes (high confidence) with mass mortality events recorded on land and in the ocean (very high confidence). Impacts on some ecosystems are approaching irreversibility such as the impacts of hydrological changes resulting from the retreat of glaciers, or the changes in some mountain (medium confidence) and Arctic ecosystems driven by permafrost thaw (high confidence). {2.1.2, Figure 2.3} (Figure SPM.1)\\n10 GHG emission levels are rounded to two significant digits; as a consequence, small differences in sums due to rounding may occur. {2.1.1}\\n11 Territorial emissions.\\n12 Acute food insecurity can occur at any time with a severity that threatens lives, livelihoods or both, regardless of the causes, context or duration, as a result'),\n",
- " 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.728101909, '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 Summary for Policymakers ', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 Summary for Policymakers '),\n",
- " Document(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': 547.0, 'num_tokens': 104.0, 'num_tokens_approx': 116.0, 'num_words': 87.0, 'page_number': 839, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '7.6.4.3 Ecological Barriers and Opportunities', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': '7.6 Assessment of Economic, Social and\\xa0Policy Responses', 'toc_level1': 'Box\\xa07.12 | Financing AFOLU Mitigation; What Are the Costs and Who Pays?', '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.789457798, 'content': 'The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).', 'reranking_score': 0.999757707118988, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, page_content='The effects of climate change on ecosystems, including changes in crop yields, shifts in terrestrial ecosystem productivity, vegetation migration, wildfires, and other disturbances also will affect the potential for AFOLU mitigation. Climate is expected to reduce crop yields, increase crop and livestock prices, and increase pressure on undisturbed forest land for food production creating new barriers and increasing costs for implementation of many nature-based mitigation techniques (medium confidence) (IPCC AR6 WGII Chapter 5).'),\n",
- " 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': 899.0, 'num_tokens': 228.0, 'num_tokens_approx': 272.0, 'num_words': 204.0, 'page_number': 10, '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.724869668, 'content': 'Summary for Policymakers\\nA.2.6 Global warming has led to shifts of climate zones in many world regions, including expansion of arid climate zones and contraction of polar climate zones (high confidence). As a consequence, many plant and animal species have experienced changes in their ranges, abundances, and shifts in their seasonal activities (high confidence). {2.2, 3.2.2, 4.4.1}\\nA.2.7 Climate change can exacerbate land degradation processes (high confidence) including through increases in rainfall intensity, flooding, drought frequency and severity, heat stress, dry spells, wind, sea-level rise and wave action, and permafrost thaw with outcomes being modulated by land management. Ongoing coastal erosion is intensifying and impinging on more regions with sea-level rise adding to land use pressure in some regions (medium confidence). {4.2.1, 4.2.2, 4.2.3, 4.4.1, 4.4.2, 4.9.6,', 'reranking_score': 0.9997363686561584, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='Summary for Policymakers\\nA.2.6 Global warming has led to shifts of climate zones in many world regions, including expansion of arid climate zones and contraction of polar climate zones (high confidence). As a consequence, many plant and animal species have experienced changes in their ranges, abundances, and shifts in their seasonal activities (high confidence). {2.2, 3.2.2, 4.4.1}\\nA.2.7 Climate change can exacerbate land degradation processes (high confidence) including through increases in rainfall intensity, flooding, drought frequency and severity, heat stress, dry spells, wind, sea-level rise and wave action, and permafrost thaw with outcomes being modulated by land management. Ongoing coastal erosion is intensifying and impinging on more regions with sea-level rise adding to land use pressure in some regions (medium confidence). {4.2.1, 4.2.2, 4.2.3, 4.4.1, 4.4.2, 4.9.6,'),\n",
- " 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.720580459, '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}', 'reranking_score': 0.9997039437294006, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, 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",
- " 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': 13, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9997003078460693, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'),\n",
- " 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': 59, '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', 'similarity_score': 0.785278857, '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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).', 'reranking_score': 0.9996869564056396, 'query_used_for_retrieval': 'What are the effects of climate change on ecosystems?', 'sources_used': ['IPCC'], 'question_used': 'What are the effects of climate change on ecosystems?', 'index_used': 'Vector'}, 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 sufficient literature to make an assessment. Impacts are evident on ecosystem structure, species geographic ranges and timing of seasonal life cycles (phenology) (for methodology and detailed references to chapters and cross-chapter papers see SMTS.1 and SMTS.1.1).'),\n",
- " 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': 442.0, 'num_tokens': 113.0, 'num_tokens_approx': 133.0, 'num_words': 100.0, 'page_number': 13, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts on Ecosystems', '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.714953661, 'content': 'A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}', 'reranking_score': 0.9996391534805298, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='A.6 Coastal ecosystems are affected by ocean warming, including intensified marine heatwaves, acidification, loss of oxygen, salinity intrusion and sea level rise, in combination with adverse effects from human activities on ocean and land (high confidence). Impacts are already observed on habitat area and biodiversity, as well as ecosystem functioning and services (high confidence). {4.3.2, 4.3.3, 5.3, 5.4.1, 6.4.2, Figure SPM.2}'),\n",
- " Document(metadata={'chunk_type': 'text', 'document_id': 'document4', 'document_number': 4.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', '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': 1209.0, 'num_tokens': 218.0, 'num_tokens_approx': 262.0, 'num_words': 197.0, 'page_number': 24, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'Summary for Policymakers', 'short_name': 'IPCC AR6 WGII SPM', 'source': 'IPCC', 'toc_level0': 'C: Adaptation Measures and Enabling Conditions', 'toc_level1': 'Future Adaptation Options and their Feasibility', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://www.ipcc.ch/report/ar6/wg2/downloads/report/IPCC_AR6_WGII_SummaryForPolicymakers.pdf', 'similarity_score': 0.714823604, 'content': \"C.2.4 Conservation, protection and restoration of terrestrial, freshwater, coastal and ocean ecosystems, together with targeted management to adapt to unavoidable impacts of climate change, reduces the vulnerability of biodiversity to climate change (high confidence). The resilience of species, biological communities and ecosystem processes increases with size of natural area, by restoration of degraded areas and by reducing non-climatic stressors (high confidence). To be effective, conservation and restoration actions will increasingly need to be responsive, as appropriate, to ongoing changes at various scales, and plan for future changes in ecosystem structure, community composition and species' distributions, especially as 1.5degC global warming is approached and even more so if it is exceeded (high confidence). Adaptation options, where circumstances allow, include facilitating the movement of species to new ecologically appropriate locations, particularly through increasing connectivity between conserved or protected areas, targeted intensive management for vulnerable species and protecting refugial areas where species can survive locally (medium confidence). {2.3, 2,6,\", 'reranking_score': 0.9995535016059875, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content=\"C.2.4 Conservation, protection and restoration of terrestrial, freshwater, coastal and ocean ecosystems, together with targeted management to adapt to unavoidable impacts of climate change, reduces the vulnerability of biodiversity to climate change (high confidence). The resilience of species, biological communities and ecosystem processes increases with size of natural area, by restoration of degraded areas and by reducing non-climatic stressors (high confidence). To be effective, conservation and restoration actions will increasingly need to be responsive, as appropriate, to ongoing changes at various scales, and plan for future changes in ecosystem structure, community composition and species' distributions, especially as 1.5degC global warming is approached and even more so if it is exceeded (high confidence). Adaptation options, where circumstances allow, include facilitating the movement of species to new ecologically appropriate locations, particularly through increasing connectivity between conserved or protected areas, targeted intensive management for vulnerable species and protecting refugial areas where species can survive locally (medium confidence). {2.3, 2,6,\"),\n",
- " 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': 13, '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', 'similarity_score': 0.709608436, '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.', 'reranking_score': 0.999546229839325, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, 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",
- " 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': 506.0, 'num_tokens': 96.0, 'num_tokens_approx': 116.0, 'num_words': 87.0, 'page_number': 1951, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '14.2.2 Projected Changes in North American Climate', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 14 North America', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.814534, 'content': 'Biodiversity is affected by climate change in this way too. For example, numerous bird populations across North America are estimated to have declined by up to 30% over the past half-century. Multiple human-related factors, including habitat loss and agricultural intensification, contribute to these declines, with climate change as an added stressor. Increasingly extreme events, such as severe storms and wildfires, can decimate local populations of birds, adding to existing ecological threats.', 'reranking_score': 0.9995321035385132, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content='Biodiversity is affected by climate change in this way too. For example, numerous bird populations across North America are estimated to have declined by up to 30% over the past half-century. Multiple human-related factors, including habitat loss and agricultural intensification, contribute to these declines, with climate change as an added stressor. Increasingly extreme events, such as severe storms and wildfires, can decimate local populations of birds, adding to existing ecological threats.'),\n",
- " 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': 299.0, 'num_tokens': 63.0, 'num_tokens_approx': 68.0, 'num_words': 51.0, 'page_number': 178, 'release_date': 2021.0, 'report_type': 'Full Report', 'section_header': '1.2.1.2 Long-Term Perspectives on \\r\\nAnthropogenic Climate Change', 'short_name': 'IPCC AR6 WGI FR', 'source': 'IPCC', 'toc_level0': '1: Framing, Context, and Methods', 'toc_level1': '1.2 Where We Are Now', 'toc_level2': '1.2.2 The Policy and Governance Context', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf', 'similarity_score': 0.782265961, 'content': \"Biodiversity and Ecosystem Services (IPBES, 2019), climate change is a 'direct driver that is increasingly exacerbating the impact of other drivers on nature and human well-being', and 'the adverse impacts of climate change on biodiversity are projected to increase with increasing warming.'\", 'reranking_score': 0.9995050430297852, 'query_used_for_retrieval': 'How does climate change affect biodiversity and wildlife?', 'sources_used': ['IPCC'], 'question_used': 'How does climate change affect biodiversity and wildlife?', 'index_used': 'Vector'}, page_content=\"Biodiversity and Ecosystem Services (IPBES, 2019), climate change is a 'direct driver that is increasingly exacerbating the impact of other drivers on nature and human well-being', and 'the adverse impacts of climate change on biodiversity are projected to increase with increasing warming.'\")]}"
- ]
- },
- "execution_count": 157,
- "metadata": {},
- "output_type": "execute_result"
}
],
"source": [
"new_state = state.copy()\n",
- "while len(new_state[\"remaining_questions\"])>0: \n",
- " async for temp_state in retriever_node.astream(new_state):\n",
- " new_state.update(temp_state)\n",
- " print(temp_state)\n",
- "new_state"
+ "new_state.update(await retriever_node(state, {}))\n",
+ "# .append(await retriever_node(state,{})"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
+ "outputs": [
+ {
+ "ename": "AttributeError",
+ "evalue": "'function' object has no attribute 'astream'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
+ "Cell \u001b[0;32mIn[19], line 3\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[1;32m 2\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(new_state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mremaining_questions\u001b[39m\u001b[38;5;124m\"\u001b[39m])\u001b[38;5;241m>\u001b[39m\u001b[38;5;241m0\u001b[39m: \n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mfor\u001b[39;00m temp_state \u001b[38;5;129;01min\u001b[39;00m \u001b[43mretriever_node\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mastream\u001b[49m(new_state):\n\u001b[1;32m 4\u001b[0m new_state\u001b[38;5;241m.\u001b[39mupdate(temp_state)\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28mprint\u001b[39m(temp_state)\n",
+ "\u001b[0;31mAttributeError\u001b[0m: 'function' object has no attribute 'astream'"
+ ]
+ }
+ ],
+ "source": [
+ "# new_state = state.copy()\n",
+ "# while len(new_state[\"remaining_questions\"])>0: \n",
+ "# async for temp_state in retriever_node.astream(new_state):\n",
+ "# new_state.update(temp_state)\n",
+ "# print(temp_state)\n",
+ "# new_state"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {},
"outputs": [
{
"name": "stdout",
@@ -653,28 +801,27 @@
"\n",
"\n",
"Answer:\n",
- "Climate change has significant and wide-ranging impacts on the environment, affecting ecosystems, biodiversity, and the services they provide. Here are the key points:\n",
+ "Climate change has had significant and wide-ranging impacts on the environment, affecting various ecosystems across the globe. Here are some key points to understand:\n",
"\n",
"### 1. **Ecosystem Alterations**\n",
- "- Climate change has already led to noticeable changes in terrestrial, freshwater, and ocean ecosystems globally. These changes include shifts in species distributions, alterations in ecosystem structure, and changes in the timing of seasonal life cycles (phenology) [Doc 8, Doc 9].\n",
- "- Coastal ecosystems are particularly vulnerable, facing threats from ocean warming, acidification, and rising sea levels. These factors, combined with human activities, have resulted in habitat loss and declines in biodiversity [Doc 1, Doc 10].\n",
+ "- Climate change has already led to substantial changes in terrestrial, freshwater, and ocean ecosystems. These changes are observable at both regional and local levels, affecting the structure of ecosystems, the geographic ranges of species, and the timing of seasonal life cycles (phenology) [Doc 6, Doc 7].\n",
"\n",
"### 2. **Biodiversity Loss**\n",
- "- Many species are experiencing declines in their populations and geographic ranges due to climate change. For instance, bird populations in North America have reportedly decreased by up to 30% over the past fifty years, with climate change compounding other threats like habitat loss [Doc 13].\n",
- "- The risk of extinction for various species is increasing as ecosystems become more stressed and less resilient to changes [Doc 11].\n",
+ "- There have been hundreds of local species losses driven by extreme heat events, with mass mortality recorded in both land and ocean ecosystems. Some impacts are nearing irreversibility, particularly in areas affected by glacier retreat and permafrost thaw [Doc 3].\n",
+ "\n",
+ "### 3. **Coastal Ecosystems**\n",
+ "- Coastal ecosystems are particularly vulnerable, facing threats from ocean warming, acidification, and rising sea levels. These factors, combined with human activities, have already led to observable impacts on habitat areas, biodiversity, and the functioning of these ecosystems [Doc 1].\n",
"\n",
- "### 3. **Food Security and Land Degradation**\n",
- "- Climate change is impacting agricultural productivity, leading to reduced crop yields and increased food prices. This creates challenges for food security and can exacerbate land degradation processes, such as soil erosion and vegetation loss [Doc 2, Doc 5].\n",
- "- The interplay of climate change with other factors, like wildfires and water scarcity, can create compound risks that threaten livelihoods and infrastructure [Doc 2, Doc 7].\n",
+ "### 4. **Land and Food Security**\n",
+ "- Changes in climate are also affecting land processes, leading to risks such as desertification, soil erosion, and food security challenges. These changes can result in reduced crop yields and increased instability in food supply, which can have serious implications for livelihoods and human health [Doc 2, Doc 5].\n",
"\n",
- "### 4. **Extreme Weather Events**\n",
- "- The frequency and intensity of extreme weather events, such as storms and wildfires, are increasing due to climate change. These events can have devastating effects on local ecosystems and human communities, further stressing biodiversity [Doc 13, Doc 14].\n",
+ "### 5. **Compound Risks**\n",
+ "- The interactions between different climate-related hazards can create compound risks. For example, water scarcity can exacerbate wildfires, leading to further habitat and biodiversity loss, and impacting ecosystem structure and functioning [Doc 4].\n",
"\n",
- "### 5. **Future Risks and Adaptation**\n",
- "- As global temperatures continue to rise, the risks to ecosystems and biodiversity are expected to increase. This includes the potential for irreversible changes in some ecosystems, particularly in sensitive areas like the Arctic and regions affected by glacier retreat [Doc 3, Doc 6].\n",
- "- To mitigate these impacts, conservation and restoration efforts are essential. Strategies may include protecting natural areas, facilitating species movement to suitable habitats, and managing human activities that stress ecosystems [Doc 11].\n",
+ "### 6. **Future Implications**\n",
+ "- As climate change continues, it is expected to further reduce agricultural productivity and increase pressures on natural ecosystems. This could hinder efforts to implement nature-based solutions for climate mitigation, as the demand for land for food production grows [Doc 5].\n",
"\n",
- "In summary, climate change poses a serious threat to the environment, affecting ecosystems, biodiversity, and food security. The need for proactive measures to adapt and mitigate these impacts is critical for the health of our planet and future generations.\n"
+ "In summary, climate change is reshaping our environment in profound ways, leading to biodiversity loss, altered ecosystems, and challenges to food security, with implications that could last for generations.\n"
]
}
],
@@ -685,10 +832,45 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 27,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{'user_input': 'What is the impact of climate change on the environment?',\n",
+ " 'audience': 'the general public who know the basics in science and climate change and want to learn more about it without technical terms. Still use references to passages.',\n",
+ " 'sources_input': ['IPCC']}"
+ ]
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "inial_state"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
"metadata": {},
"outputs": [],
- "source": []
+ "source": [
+ "event_list = app.astream_events(inial_state, version = \"v1\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "\n",
+ "async for event in event_list:\n",
+ " pass"
+ ]
}
],
"metadata": {