diff --git "a/sandbox/20240702 - CQA - Graph Functionality.ipynb" "b/sandbox/20240702 - CQA - Graph Functionality.ipynb" --- "a/sandbox/20240702 - CQA - Graph Functionality.ipynb" +++ "b/sandbox/20240702 - CQA - Graph Functionality.ipynb" @@ -31,24 +31,16 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 1, "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n" - ] - }, { "data": { "text/plain": [ "True" ] }, - "execution_count": 39, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -147,7 +139,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 4, @@ -205,7 +197,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -343,7 +335,7 @@ "4 https://www.iea.org/reports/global-critical-mi... iea_4 IEA " ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -361,7 +353,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -370,7 +362,7 @@ "5355" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -391,7 +383,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -509,7 +501,7 @@ "4 Having access to electricity is defined in int... owid_4 OWID " ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -528,7 +520,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -556,7 +548,7 @@ " 'Water Use & Stress', 'Wildfires'], dtype=object)" ] }, - "execution_count": 9, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -567,7 +559,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -576,7 +568,7 @@ "2202" ] }, - "execution_count": 10, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -596,7 +588,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -605,7 +597,7 @@ "7557" ] }, - "execution_count": 11, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -620,7 +612,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -629,7 +621,7 @@ "Document(metadata={'category': 'Wildfires', 'url': 'https://ourworldindata.org/grapher/annual-burned-area-by-landcover', 'returned_content': '', 'subtitle': 'Total area of forests, savannas, shrublands/grasslands, croplands, and other land that have been burned as a result of wildfires each year.', 'doc_id': 'owid_2201', 'source': 'OWID'}, page_content='Wildfire area burned by land cover type')" ] }, - "execution_count": 12, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -647,9 +639,18 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 17, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:chromadb.telemetry.posthog:Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.\n", + "INFO:chromadb.telemetry.posthog:Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.\n" + ] + } + ], "source": [ "# DO NOT RUN AGAIN (persisted)\n", "# vectorstore_graphs = Chroma.from_documents(documents_all, embeddings_function, persist_directory=f\"{ROOT_DIR}/data/vectorstore\")\n", @@ -658,7 +659,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -677,7 +678,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -689,11 +690,11 @@ " 0.46955245084328956),\n", " (Document(metadata={'category': 'Water Pollution', 'doc_id': 'owid_2151', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Water quality is assessed by means of core physical and chemical parameters that reflect natural water quality. A water body is classified as \"good\" quality if at least 80% of monitoring values meet target quality levels.', 'url': 'https://ourworldindata.org/grapher/water-bodies-good-water-quality'}, page_content='Share of water bodies with good ambient water quality'),\n", " 0.46955245084328956),\n", - " (Document(metadata={'category': 'Clean Water & Sanitation', 'doc_id': 'owid_719', 'returned_content': '', 'source': 'OWID', 'subtitle': 'A basic drinking water service is water from an improved water source that can be collected within a 30-minute round trip, including queuing.', 'url': 'https://ourworldindata.org/grapher/population-using-at-least-basic-drinking-water'}, page_content='Share of population using at least a basic drinking water source'),\n", + " (Document(metadata={'category': 'Clean Water', 'doc_id': 'owid_667', 'returned_content': '', 'source': 'OWID', 'subtitle': 'A basic drinking water service is water from an improved water source that can be collected within a 30-minute round trip, including queuing.', 'url': 'https://ourworldindata.org/grapher/population-using-at-least-basic-drinking-water'}, page_content='Share of population using at least a basic drinking water source'),\n", " 0.43011969078910306)]" ] }, - "execution_count": 15, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -718,7 +719,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -765,7 +766,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -774,7 +775,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -784,17 +785,155 @@ " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_400', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Environmentally sound technologies (ESTs) are technologies that have the potential for significantly improved environmental performance relative to other technologies. This indicator shows the value of imported ESTs in current US-$.', 'url': 'https://ourworldindata.org/grapher/import-of-environmentally-sound-technologies', 'similarity_score': 0.782991886138916, 'content': 'Import of environmentally sound technologies'}, page_content='Import of environmentally sound technologies'),\n", " Document(metadata={'category': 'Energy', 'doc_id': 'owid_1013', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of primary energy by source over the long-term, measured as the percentage of total energy consumption. Primary electricity includes: hydropower, nuclear power, wind, photo\\xadvoltaics, tidal, wave and solar thermal and geothermal (only figures for electricity production are included).', 'url': 'https://ourworldindata.org/grapher/long-term-energy-transitions', 'similarity_score': 0.8692131638526917, 'content': 'Long-term energy transitions'}, page_content='Long-term energy transitions'),\n", " Document(metadata={'category': 'Forests & Deforestation', 'doc_id': 'owid_1376', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Imported deforestation is the amount of deforestation in other countries that is driven by the production of food and forestry products that are imported. This is measured in hectares.', 'url': 'https://ourworldindata.org/grapher/imported-deforestation', 'similarity_score': 0.8846064805984497, 'content': 'Imported deforestation'}, page_content='Imported deforestation'),\n", - " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_401', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This measures the net import-export balance in tonnes of CO₂ per capita. Positive values indicate net importers of CO₂. Negative values indicate net exporters of CO₂.', 'url': 'https://ourworldindata.org/grapher/imported-or-exported-co-emissions-per-capita', 'similarity_score': 0.8937123417854309, 'content': 'Imported or exported CO2 emissions per capita'}, page_content='Imported or exported CO2 emissions per capita'),\n", " Document(metadata={'category': 'Energy', 'doc_id': 'owid_1019', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Net electricity imports are calculated as electricity imports minus exports. Countries with positive values are net importers of electricity; negative values are net exporters. Measured in terawatt-hours.', 'url': 'https://ourworldindata.org/grapher/net-electricity-imports', 'similarity_score': 0.8954001069068909, 'content': 'Net electricity imports'}, page_content='Net electricity imports'),\n", " Document(metadata={'category': 'Energy', 'doc_id': 'owid_983', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Total fossil fuel production - differentiated by coal, oil and natural gas - by country over the long-run, measured in terawatt-hour (TWh) equivalents per year.', 'url': 'https://ourworldindata.org/grapher/fossil-fuel-production-over-the-long-term', 'similarity_score': 0.9086273312568665, 'content': 'Fossil fuel production over the long-term'}, page_content='Fossil fuel production over the long-term'),\n", " Document(metadata={'category': 'Fossil Fuels', 'doc_id': 'owid_1443', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Total fossil fuel production - differentiated by coal, oil and natural gas - by country over the long-run, measured in terawatt-hour (TWh) equivalents per year.', 'url': 'https://ourworldindata.org/grapher/fossil-fuel-production-over-the-long-term', 'similarity_score': 0.9086273312568665, 'content': 'Fossil fuel production over the long-term'}, page_content='Fossil fuel production over the long-term'),\n", " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_379', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Environmentally sound technologies (ESTs) are technologies that have the potential for significantly improved environmental performance relative to other technologies. This indicator shows the value of exported ESTs in current US-$.', 'url': 'https://ourworldindata.org/grapher/export-of-environmentally-sound-technologies', 'similarity_score': 0.9094725847244263, 'content': 'Export of environmentally sound technologies'}, page_content='Export of environmentally sound technologies'),\n", - " Document(metadata={'category': 'Electricity Mix', 'doc_id': 'owid_892', 'returned_content': '', 'source': 'OWID', 'subtitle': \"Net electricity imports are calculated as electricity imports minus exports. This is given as a share of a country's electricity demand. Countries with positive values are net importers of electricity; negative values are net exporters.\", 'url': 'https://ourworldindata.org/grapher/electricity-imports-share-demand', 'similarity_score': 0.9217990636825562, 'content': 'Net electricity imports as a share of electricity demand'}, page_content='Net electricity imports as a share of electricity demand')]" + " Document(metadata={'category': 'Electricity Mix', 'doc_id': 'owid_892', 'returned_content': '', 'source': 'OWID', 'subtitle': \"Net electricity imports are calculated as electricity imports minus exports. This is given as a share of a country's electricity demand. Countries with positive values are net importers of electricity; negative values are net exporters.\", 'url': 'https://ourworldindata.org/grapher/electricity-imports-share-demand', 'similarity_score': 0.9217990636825562, 'content': 'Net electricity imports as a share of electricity demand'}, page_content='Net electricity imports as a share of electricity demand'),\n", + " Document(metadata={'category': 'Energy', 'doc_id': 'owid_1020', 'returned_content': '', 'source': 'OWID', 'subtitle': \"Net electricity imports are calculated as electricity imports minus exports. This is given as a share of a country's electricity demand. Countries with positive values are net importers of electricity; negative values are net exporters.\", 'url': 'https://ourworldindata.org/grapher/electricity-imports-share-demand', 'similarity_score': 0.9217990636825562, 'content': 'Net electricity imports as a share of electricity demand'}, page_content='Net electricity imports as a share of electricity demand')]" ] }, - "execution_count": 18, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=293793a6-6cdd-4e70-ba2d-c1211936330a,id=293793a6-6cdd-4e70-ba2d-c1211936330a\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=83bce3ac-3941-4868-b904-954796b2c87b,id=83bce3ac-3941-4868-b904-954796b2c87b; trace=83bce3ac-3941-4868-b904-954796b2c87b,id=a1e66cdf-541e-45be-a04e-0273eb464bd0; trace=83bce3ac-3941-4868-b904-954796b2c87b,id=aae4ff52-19c8-4d68-8cf3-aa5ef96d90a9\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=83bce3ac-3941-4868-b904-954796b2c87b,id=89c9ee4d-0531-40b3-b7d5-471f2d1d7f72; patch: trace=83bce3ac-3941-4868-b904-954796b2c87b,id=83bce3ac-3941-4868-b904-954796b2c87b; trace=83bce3ac-3941-4868-b904-954796b2c87b,id=aae4ff52-19c8-4d68-8cf3-aa5ef96d90a9\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2f60f3cb-8969-43c1-9be6-a38da876bbeb; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=8abe438d-b623-444e-acf0-01cbe05204d2; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=9641fded-8e17-440c-9be4-651bcf1e62f8; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=dcb0920c-68a9-4663-8f0f-b8d9bb91d9e8; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=be55ec0c-6a79-410b-8fdd-006518ef4839; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e69b8a0c-353f-4cca-a888-bc92c1ab80e8\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=5c8a1a4d-cf91-47a4-a1d1-29def2a546f8; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=80fcf03e-55a9-4910-bf68-773e94166b87; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c55b0d31-4534-4e79-a7dd-9e41e8b60d6f; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=ab9e5151-57c0-47b7-9227-1af10c6edd4d; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=36341116-242a-4979-a0a6-3c6e264213d2; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=19e3b604-d805-4e71-9bb5-040d2fd6ab17; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=720a713f-2ea5-4912-81ac-727205915326; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=cdd69060-8047-44d3-9340-a9523d4a9fd7; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=7cb77350-949b-4800-88fe-cdb91e181a6f; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e6af6666-4615-453b-9b06-f48e85f7ec0b; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=dcb0920c-68a9-4663-8f0f-b8d9bb91d9e8; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e69b8a0c-353f-4cca-a888-bc92c1ab80e8; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=9641fded-8e17-440c-9be4-651bcf1e62f8\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=32397e1b-f5d9-4dbf-9e7a-ec51f6452023; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2e0caf84-9662-4fea-a510-6b8d143dabdf; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=4c472c44-ac2c-4aa0-8931-22be0135d530; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e332817e-ae69-4b92-9e50-05f9f77a410c; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=cdd69060-8047-44d3-9340-a9523d4a9fd7; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e6af6666-4615-453b-9b06-f48e85f7ec0b\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=4904b6c4-b677-4af4-8a6b-bf088dc8a6f9; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c117d6db-6a45-4109-9579-5e609395bcae; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=d6c37d55-5e1d-47d1-bfd2-f56f58da3c83; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e5d01647-1098-4ba5-b0be-5b7b6b086e1b; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e332817e-ae69-4b92-9e50-05f9f77a410c; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2e0caf84-9662-4fea-a510-6b8d143dabdf\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c3110852-8632-4f8d-a4a8-7c798b1cb1d9; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=b9823098-61d1-4aed-9f49-76e82571869c; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c615dedd-9e6f-4250-96ea-c25184cd6a2c; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=0f9e226a-e351-4be0-b769-65ecf20b5de7; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c117d6db-6a45-4109-9579-5e609395bcae; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e5d01647-1098-4ba5-b0be-5b7b6b086e1b; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=720a713f-2ea5-4912-81ac-727205915326\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=95c8f0b6-91ab-426f-b492-07d310b8fd2d; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=0f9e226a-e351-4be0-b769-65ecf20b5de7\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=d39d0b70-ca46-4048-93f9-d60e7c66f60e; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=d4b8077e-99b9-496f-8ef3-a8adaf980fb4; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=3e7aa953-cc67-42f5-a46a-664d4aa61fe1; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c55fad93-769c-4f5a-b716-80362f6bee24; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=31b02c82-76df-43c2-a276-c5bd8d1af58e; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=95c8f0b6-91ab-426f-b492-07d310b8fd2d; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=c615dedd-9e6f-4250-96ea-c25184cd6a2c\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=31b02c82-76df-43c2-a276-c5bd8d1af58e\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=af577682-c2ca-4730-aef8-815cd25be223; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=bed906a2-4e90-4737-ba3e-d073676f75ed; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2932ab68-a73e-4471-a103-7ea64eb92015; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=be7246d2-b55c-4f1e-8805-c6caef632e9a; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=3791cee0-aba4-4f92-89b5-875af21e9dee; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=3e7aa953-cc67-42f5-a46a-664d4aa61fe1; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=d4b8077e-99b9-496f-8ef3-a8adaf980fb4\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=3791cee0-aba4-4f92-89b5-875af21e9dee\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=56ed1b23-c02d-45a9-89db-82ca85fc523f; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=badb4be6-7362-415c-8784-232b7a1710e7; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=62472c2f-e0f1-4cb9-910c-2263beedc8e0; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=b0830d8e-fdc7-470a-87d7-f70485289152; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=b6f642f0-0cfb-450c-9d96-8a0079d220cf; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=e3234978-eaf6-4046-970f-95e412aa889a; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=8aefd625-7233-4022-9f4b-58d8fabb9c43; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=fac8c029-5fb2-4dc8-9fb3-60f4ad9f3e85; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=dd5cc1ab-6ab5-4665-9d5c-37f957ba37eb; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=5ce47723-33ce-4237-91a1-55b885aef68c; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=a9e6125b-d5f6-4743-85b5-3eb2f087578d; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=1575bbfe-f738-4a87-8df8-c57e55435560; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2932ab68-a73e-4471-a103-7ea64eb92015; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=bed906a2-4e90-4737-ba3e-d073676f75ed\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=e8a28082-0011-4e85-a399-9bf6bebd6014; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=6b1a1120-0347-43b1-a0c3-16b53d9da843; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=c0f9923f-791b-4e31-875c-d70a3a7d918e; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=a5aae843-34b2-4f65-ba54-89f09509c737; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=84371741-fb6e-4dfe-9282-c969e3a5d190; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=829425fd-6030-4f2e-aef2-931a9f735554\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=47b58050-adb9-48b0-9c6e-b8a2e22e6123; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=fd05368e-94c9-492f-bc06-90bc13f848d6; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=41e95d82-9788-42e5-a38e-28c929f83208; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=c3480230-c4eb-4fd1-8208-325b22389052; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=0fc6ec9c-5086-4bac-a18d-d6a14eb38a35; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=63e8e2da-c4d9-45c0-b0d0-764915c357eb; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3c3aa0f0-3966-4ba9-b905-1a2365930fba; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=925489ee-37e4-400c-9c29-59cdc99196cc; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=236b7b18-6994-4748-8f19-a4aed1a5f1db; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3dda8146-05e3-4623-aa8c-da935e9dbd3f; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=a5aae843-34b2-4f65-ba54-89f09509c737; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=829425fd-6030-4f2e-aef2-931a9f735554; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=c0f9923f-791b-4e31-875c-d70a3a7d918e\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=892fb4d1-ced5-44d8-a3d6-84a347106ba1; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=09f22061-975e-4395-b8d2-36b3f76ce842; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=da12a1f6-e22f-422f-9f5a-3d3a4b3db8cd; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=42f39dec-a502-4d50-996e-66e9be87fed4; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3dda8146-05e3-4623-aa8c-da935e9dbd3f; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=925489ee-37e4-400c-9c29-59cdc99196cc\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=d0f49dfa-20b7-494c-85c3-74bcebce6c2f; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=6fe4ff60-6861-462a-a11f-d760fa62ab83; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=c033925c-9d09-4bb1-90da-151d16102e85; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=79b16023-c50e-41d0-8fea-e14dcf5cfafa; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=09f22061-975e-4395-b8d2-36b3f76ce842; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=42f39dec-a502-4d50-996e-66e9be87fed4\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=8de99aa7-abfd-4a9f-a784-966679d1f39b; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=790c1454-5451-4476-bab1-9c77fde6a81f; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=065bb675-0ef2-431f-9d33-84cd1bb4935d; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=7933b5ab-f8c9-42b9-8479-f78eceb43224; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=6fe4ff60-6861-462a-a11f-d760fa62ab83; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=79b16023-c50e-41d0-8fea-e14dcf5cfafa; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3c3aa0f0-3966-4ba9-b905-1a2365930fba\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=6482b408-5756-4fe7-baec-a256190f9af7; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=7933b5ab-f8c9-42b9-8479-f78eceb43224\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=eb52c44f-1691-4146-8e69-9711de958cea; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=53b06b0d-dcf7-475b-b6e5-d1930c3cfc52; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=546e246a-66e2-43a5-8181-2678acb61d54; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=248d2e53-c72c-40f0-949c-c5213bb9c3d7; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=8daab8cf-42aa-43e6-8bde-62c60162ccc4; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=065bb675-0ef2-431f-9d33-84cd1bb4935d; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=6482b408-5756-4fe7-baec-a256190f9af7\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=308241ef-550e-4f19-bb73-c2a9e6e36371; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=f2c7aa53-940b-48da-aa63-66944e6a6546; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=c2c6c9d7-5209-41b8-8ed7-c488acaa7d2d; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=b9dd967c-f23e-4f28-82c6-e9b280c656db; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=16957e58-4828-4760-8617-0a1918144467; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8803740c-a15c-4106-a44c-2aace2b47b13\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=8daab8cf-42aa-43e6-8bde-62c60162ccc4\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=896492a1-99bf-4c4a-a65f-25ce2c28b97e; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=2e836817-4ee7-41f2-9bc4-74735d817872; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=bb2ea30d-0240-47ef-a6d8-2598bd4c5709; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=204239d8-f4ea-4190-ad97-1d907465d888; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=1e38b790-68ce-4424-82f2-26255f21c92b; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=cbb331c8-2396-4c46-a849-6c338226f518; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=7a4fcbcf-646e-4e7b-b3f6-ea0ab21ee0ab; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=7eb5634e-3ea6-4c92-8490-1b4879122c08; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8682e1c6-9af5-40da-a206-4653ccb8d239; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8de88615-e0b9-423b-9b4f-1bda7afacfa2; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=769adfd8-cb22-469e-aa4a-7d4e81bc08a9; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=935cab7e-464e-428c-a134-f262c1805fcd; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=546e246a-66e2-43a5-8181-2678acb61d54; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=53b06b0d-dcf7-475b-b6e5-d1930c3cfc52; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=b9dd967c-f23e-4f28-82c6-e9b280c656db; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8803740c-a15c-4106-a44c-2aace2b47b13; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=c2c6c9d7-5209-41b8-8ed7-c488acaa7d2d\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=1e38b790-68ce-4424-82f2-26255f21c92b\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=b34909a7-a575-44cf-89dd-d8fee68f0d8a; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=95e97bc6-9076-4107-aff4-06ca1255e6a3; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=bd1e986a-b723-4ed6-bd49-aeacc994fd85; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3a935932-9bfe-432a-a96c-07aa27272bf9; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=b5e2a72f-4b67-4e33-a6ba-359320db9473; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=2031547a-490f-4751-829a-ef98a23bb023; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=f0c219e2-e5a4-4beb-84f5-85c393914831; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=b36b252f-1f19-4ccd-aa8d-5cd4a98a5112; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=b73c426d-e259-4249-9058-83de3aa73580; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=9e992bbe-63f5-4a35-afd1-e7e5f30ed0fe; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=d095fff9-919e-47c6-a095-15da390156f6; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=0194d7e5-403d-40ac-86ee-b61538d5dcc2; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=bb2ea30d-0240-47ef-a6d8-2598bd4c5709; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=2e836817-4ee7-41f2-9bc4-74735d817872\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=c9750ca1-6135-44c6-b335-eff6ba8cfafa; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=3a5a5526-a619-4505-a578-3ee291080783; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=2836a100-e2e6-40cf-881a-691c470c6092; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=b9ebb6ca-9591-413b-92b2-191f4b0e8cd2; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=58b24ce1-7ff6-40ca-ba6e-cf864fa04a9c; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=10017df8-ecf8-4bda-8c5f-e9a9701a5514; patch: trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=935cab7e-464e-428c-a134-f262c1805fcd; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8de88615-e0b9-423b-9b4f-1bda7afacfa2; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=8682e1c6-9af5-40da-a206-4653ccb8d239\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=74ce6e89-f717-4846-b7a3-a9e32186d041; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=996f55c7-6763-4e92-b5a9-6758d57218e4; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=a4611617-53da-4a93-a1fc-16c76e3ac7d5; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=c8b9d3a0-5e87-4991-810a-59f9d447ffab; patch: trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=b9ebb6ca-9591-413b-92b2-191f4b0e8cd2; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=10017df8-ecf8-4bda-8c5f-e9a9701a5514; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=2836a100-e2e6-40cf-881a-691c470c6092; trace=308241ef-550e-4f19-bb73-c2a9e6e36371,id=308241ef-550e-4f19-bb73-c2a9e6e36371\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=4bfe17a4-c2d7-4b7f-9f81-814ea2e94fa7; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=4eed6d6e-6b18-4605-aa73-0512b6d13408; patch: trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=0194d7e5-403d-40ac-86ee-b61538d5dcc2; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=b5e2a72f-4b67-4e33-a6ba-359320db9473; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=3a935932-9bfe-432a-a96c-07aa27272bf9; trace=e8a28082-0011-4e85-a399-9bf6bebd6014,id=e8a28082-0011-4e85-a399-9bf6bebd6014\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=46398dce-c38f-4b57-9ab8-b70b30ec0711; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=d2212d1f-3b2a-4733-af7b-6194bae1f8a5; patch: trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=1575bbfe-f738-4a87-8df8-c57e55435560; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=b6f642f0-0cfb-450c-9d96-8a0079d220cf; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=b0830d8e-fdc7-470a-87d7-f70485289152; trace=2f60f3cb-8969-43c1-9be6-a38da876bbeb,id=2f60f3cb-8969-43c1-9be6-a38da876bbeb\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f1c330b0-3a72-4fe3-93cf-eb25a66445c0; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=6bfb3608-19d8-469d-9e47-206d72f61bed; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=ee5ed22d-8e5b-496e-8478-2d11506f5b1a; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=c4d5b203-a217-4640-ae9d-417e37a10447; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=15f7947e-48e2-4a1f-ba21-31448bb3f17d; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=2b4b590f-943d-4495-ae0b-212af05bee7f\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=300beffa-9bd9-4084-96cd-a2ad42a2ec6f; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=5c424b33-bda2-4f07-a050-d06943845061; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=574cb640-ed02-4b4d-9b9b-f4ff602292fa; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=00826e0e-7ddd-411a-bfbb-326a438bf771; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f711bbcf-a1ed-4087-a0bf-59b32580127d; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f477ef0b-11b4-4a28-bb09-ecb45b31870f; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=34d3b6b4-2145-49bd-a718-8b7098875cd9; patch: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=2b4b590f-943d-4495-ae0b-212af05bee7f; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=c4d5b203-a217-4640-ae9d-417e37a10447; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=ee5ed22d-8e5b-496e-8478-2d11506f5b1a\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f12b21d7-7f82-4f9c-bee2-e7ea8398fe8e; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=90f2d256-cbeb-48af-b063-ee672167e505; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=221ba585-94c5-46ba-8c84-ce984b2ebd33; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=d9ba91e2-912f-4e47-9420-bb36b7d1cfc7; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=5e591b84-3227-46b3-9601-ddbc814a7ee8; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=7cf59b4f-afe1-4f54-8bb7-d44a7e3ce641; patch: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=34d3b6b4-2145-49bd-a718-8b7098875cd9; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f711bbcf-a1ed-4087-a0bf-59b32580127d; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=00826e0e-7ddd-411a-bfbb-326a438bf771\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=6d4f6338-5d7a-4e6b-b912-28fea3a7fd56; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=d895936e-62eb-435b-939c-7f1be7bde063; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=8748fc16-2544-4513-80ef-c80785a8e68b; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=138a1ded-f2dc-491b-9b37-ec4c0f069d6e; patch: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=d9ba91e2-912f-4e47-9420-bb36b7d1cfc7; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=7cf59b4f-afe1-4f54-8bb7-d44a7e3ce641; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=221ba585-94c5-46ba-8c84-ce984b2ebd33\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=138a1ded-f2dc-491b-9b37-ec4c0f069d6e; trace=f1c330b0-3a72-4fe3-93cf-eb25a66445c0,id=f1c330b0-3a72-4fe3-93cf-eb25a66445c0\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=491f3e66-6b89-4377-8d2b-0567324aa59b; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=b2c086da-93db-4650-9eb2-ed5c40933900; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=ce04256f-5a48-49bc-b35b-705cb40fed33; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=cf90dc89-a96a-442d-b5d4-8bf7781f06d2; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=ae59a011-e2c9-4d4b-82a4-ac9b79440208; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=f8a804e2-c4fa-492c-96bb-78ff7424cf28\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=a7b13e32-9118-409e-8681-20b7b67d3685; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=6f26aba5-5f17-4d71-8578-af3d2a7888e2; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=62a5af0d-8be9-4fb6-9c78-e16654d0bcdc; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=415a3f17-ac3c-42cd-9b4e-5fe90e077649; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=d8ae0cef-b38d-46db-9b75-7d0f08bb3f8d; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=e9c511c0-d35b-4d92-b2d1-cb8ccfb0765b; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=65785df3-40bd-4c31-ad0b-00fa4dec7294; patch: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=cf90dc89-a96a-442d-b5d4-8bf7781f06d2; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=f8a804e2-c4fa-492c-96bb-78ff7424cf28; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=ce04256f-5a48-49bc-b35b-705cb40fed33\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=20f771b7-e32a-42d6-abc9-c519d6bcdc72; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=805436bf-32ef-4c27-9e1a-eb34f8f34f70; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=a2e50c51-d9ad-4a40-bcd6-0672fa7999fe; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=cdda352a-c4e3-426d-82f9-405de1196d78; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=e3bf8d3e-4ae2-466e-8566-d95a8658757c; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=9cbe96b9-7601-4c50-b04f-8f2573cdd73b; patch: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=65785df3-40bd-4c31-ad0b-00fa4dec7294; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=d8ae0cef-b38d-46db-9b75-7d0f08bb3f8d; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=415a3f17-ac3c-42cd-9b4e-5fe90e077649\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=137ad066-c15a-4d60-abf7-e831cedb7ad7; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=502fe608-5374-46cf-bfda-ff8f5d2b0297; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=e39c89c2-72c0-4ddc-8ce3-d20b9c3fa9b5; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=3ff9d270-d6a0-422c-b9e6-0a75f916192d; patch: trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=cdda352a-c4e3-426d-82f9-405de1196d78; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=9cbe96b9-7601-4c50-b04f-8f2573cdd73b; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=a2e50c51-d9ad-4a40-bcd6-0672fa7999fe; trace=491f3e66-6b89-4377-8d2b-0567324aa59b,id=491f3e66-6b89-4377-8d2b-0567324aa59b\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=e2edb52e-5cf3-404b-b3ae-f8830317fda0; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=014f95c4-8fa5-481c-a664-3f459fb1f058; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=61be8c64-2bee-43a2-a107-305d4950e1c4; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=3cc13b0d-bd8f-46c8-8362-74d54f98cdb2; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=8b08484a-0e45-424d-9c34-62775c3c5f9f; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=55bc59e8-e5a3-47ba-b4c7-2062ce102680\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=209e52e1-a9b4-4151-a4e3-8e3af16519cc; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=47e036bd-d91b-44b3-8045-5599c1ef67d2; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=ec44fa1a-ce6b-4b06-adbd-1f85768d1e01; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=ddfa373f-f271-49a8-8602-44a7e6f0679e; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=447540dd-c7ab-49e5-b3b6-18f8f99469c6; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=21ac4f51-cd70-4cf9-9049-e5d84a4b5199; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=edf300c5-c07a-4728-a3ac-c4ee52a9ec6d; patch: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=3cc13b0d-bd8f-46c8-8362-74d54f98cdb2; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=55bc59e8-e5a3-47ba-b4c7-2062ce102680; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=61be8c64-2bee-43a2-a107-305d4950e1c4\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=042fe32d-780d-4518-82e9-1f5d67a094b2; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=36d4d6bf-c37c-4b11-ba2e-5eac1415922e; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=acac7846-6fa0-47c9-9f63-bba4abdadeda; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=5e1dd1b0-f251-4e38-b004-6146ae1d5d5f; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=b6ca0e33-1ad6-4946-9ee5-447c288f2c4f; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=4fcdf5a2-6a73-4ccc-85c6-7883b84cadd6; patch: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=edf300c5-c07a-4728-a3ac-c4ee52a9ec6d; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=447540dd-c7ab-49e5-b3b6-18f8f99469c6; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=ddfa373f-f271-49a8-8602-44a7e6f0679e\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=1bb46244-06fc-408f-a0ed-e6e16d64519e; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=dfbf1bfb-e3d8-4827-9b3c-13cb32ec2c81; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=750a11db-ae8e-424d-9638-037120e8be71; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=7a9ba21a-78bf-48f3-aa87-773016bccfc7; patch: trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=4fcdf5a2-6a73-4ccc-85c6-7883b84cadd6; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=5e1dd1b0-f251-4e38-b004-6146ae1d5d5f; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=acac7846-6fa0-47c9-9f63-bba4abdadeda; trace=e2edb52e-5cf3-404b-b3ae-f8830317fda0,id=e2edb52e-5cf3-404b-b3ae-f8830317fda0\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=02dab163-549d-452b-95f5-357abc76b1ca; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=b2276546-d946-4ad3-a0e9-1badcbb00b2c; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=ba3fd8fd-db9a-4183-b14d-cfe9b8f89d70; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=658fd17b-6872-4ced-80d8-6ec7a5526ef6; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=b48d32e1-b01e-4b88-91a6-fc1b51755cb0; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e9e82ab7-bec0-4505-9169-399202079b30\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=b5e1454c-ed29-4593-825f-d2fbbf551f66; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=7fc5c94e-d8e8-4400-a9f8-15e2f599efaf; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=2b9b3d7f-683f-4e47-9cfa-36a30e0f91dd; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=1b8b1051-bf04-4bab-a8d2-7c6317880b6c; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=d496995e-79fb-48ec-81a9-8435de5284be; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=80de6581-7286-4c29-bc9c-2feddeb94bc8; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c17b7a44-4986-4eba-bcd0-512bcdbbac1a; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=18658beb-1c58-4cc3-9eb7-ba70fe839fab; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=11b7b682-bf75-44aa-940c-28963bdba7b6; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=f2f9b521-b18e-4418-ab71-6b507660bbfa; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=658fd17b-6872-4ced-80d8-6ec7a5526ef6; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e9e82ab7-bec0-4505-9169-399202079b30; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=ba3fd8fd-db9a-4183-b14d-cfe9b8f89d70\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=ea5fbfa7-b672-4313-b656-f3a2774f83d5; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=fac457d6-9b8d-4a61-9049-2cc3fbb85735; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e7bd60d0-596e-4d3e-a0bd-0d84f1e50cd1; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c625ba0b-7a65-4c66-a294-8f85adaf9c76; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=18658beb-1c58-4cc3-9eb7-ba70fe839fab; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=f2f9b521-b18e-4418-ab71-6b507660bbfa\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=ca6df88d-f280-4f24-ac33-f2441c758acc; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=98bf6d3c-bc56-453c-b018-67ea9cdc7e11; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=2c012d2a-bc66-4321-9f8a-7211506e1f25; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e79d0d5c-4f84-4fde-9ee3-29a46110844a; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=fac457d6-9b8d-4a61-9049-2cc3fbb85735; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c625ba0b-7a65-4c66-a294-8f85adaf9c76\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=3c381856-3e4d-4815-ae50-ffdc0644639c; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=6e015dc8-be67-4793-a86e-79d568f77ec7; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=94e4fd64-d54d-423f-9c51-c76f3d5fb2b3; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=7144c5ef-7f1c-4d66-b20a-817834923d6d; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=98bf6d3c-bc56-453c-b018-67ea9cdc7e11; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e79d0d5c-4f84-4fde-9ee3-29a46110844a; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c17b7a44-4986-4eba-bcd0-512bcdbbac1a\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c794e961-8cdc-4bfa-adf2-309c9c392d70; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=7144c5ef-7f1c-4d66-b20a-817834923d6d\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=7a5f6504-348d-4ad5-a8f5-4b8b4e90fe84; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c22f2aae-81ae-4996-80d3-a3b73850b032; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=98fe14eb-c560-42b6-bc14-90956b6fe3a4; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=5e69617c-fd4c-42ba-a589-ac6f145c611e; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=38849e56-fcbb-45a4-96cb-b8fac6efdc0e; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c794e961-8cdc-4bfa-adf2-309c9c392d70; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=94e4fd64-d54d-423f-9c51-c76f3d5fb2b3\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=38849e56-fcbb-45a4-96cb-b8fac6efdc0e\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=ac671d39-be49-46f3-ad7d-215d75551343; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=00f5a628-c403-4924-b172-ca63473a6903; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=1a7ad33d-d834-4908-8cd9-1815c74007b3; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=49d1030f-380b-42e2-9fec-39799575f587; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=58432383-aedc-41e7-8628-7dc0845f757a; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=c22f2aae-81ae-4996-80d3-a3b73850b032; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=98fe14eb-c560-42b6-bc14-90956b6fe3a4\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=58432383-aedc-41e7-8628-7dc0845f757a\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=11c13c61-f3d2-4173-a2fa-659e7948207c; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=b755f27a-bdd9-4fc7-9d33-e5c992541f03; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=935ac438-e3ab-42fc-94bb-e3b4664e5092; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=0d25e7fd-8b83-4f66-9db0-59a371a32ed8; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=aac7dbf2-7a37-4ed3-be8a-a54a45838ab2; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=3c20511d-c43b-4639-8797-c63e47b4cd85; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=e70182ba-4089-4c3e-8f57-5e4c310643db; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=892b2c6c-4547-4d3b-99cc-642f20d2974c; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=673edae4-acc1-4b62-ac3d-99b514498feb; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=08f01bef-fb34-462a-9021-fdb6f2ca626a; patch: trace=02dab163-549d-452b-95f5-357abc76b1ca,id=02dab163-549d-452b-95f5-357abc76b1ca; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=00f5a628-c403-4924-b172-ca63473a6903; trace=02dab163-549d-452b-95f5-357abc76b1ca,id=1a7ad33d-d834-4908-8cd9-1815c74007b3\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=da982506-c769-4e99-8a13-3ba28464e33b; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=803d28f6-b6ea-4cf5-a58a-7dda7d6595b3; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=f6ea6f7c-11e0-4ec0-8246-f17c9e3a1530; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=1df00cc2-16fd-405a-a6c9-6b8145c94831; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=b35ca0a2-f164-4eb6-ad9b-28423952d4e4; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=2ef747d6-4c0c-4815-b129-e48e351ad15d\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=bab40355-b53d-4cd9-8ee9-20290527d34e; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c1990c0d-4619-445a-a520-69512a249b75; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=4ee24498-28c3-44aa-bc41-0172e3a4b1ae; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=9e73082d-b9c3-4c25-84af-70aa7a2f8377; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=4017961e-ad43-4606-be18-af0403b12197; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=e80dd6f0-f708-4b51-8970-938bdaecaa8f; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=b084b76d-4094-4d45-8d14-368d457f32c2; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0e3b9ea0-127d-44ae-969a-0b6f48c8e4ee; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=ab8439f4-6581-4045-857e-0263dbacb2a7; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=2ac275a0-763a-43ca-b933-c0ecd977fd72; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=1df00cc2-16fd-405a-a6c9-6b8145c94831; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=2ef747d6-4c0c-4815-b129-e48e351ad15d; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=f6ea6f7c-11e0-4ec0-8246-f17c9e3a1530\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=2fb7f717-c9a8-4a43-86c2-d85f36e81abf; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=00b153be-2ee7-44a7-aa9e-ec61c6098a38; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=f42be082-2a10-4fcf-a4e6-bb4c497af1ab; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=67f8b219-494c-46fc-8430-8b9a7a52c2ab; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0e3b9ea0-127d-44ae-969a-0b6f48c8e4ee; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=2ac275a0-763a-43ca-b933-c0ecd977fd72\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0905cb29-5bef-4dcc-947e-bd41be9b0ec2; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c4801355-a8c1-4df3-89c0-b44d205f3790; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=e154c1c3-b46d-484b-863e-9eca46ffe0ef; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=4b49816d-34bf-4999-aa9f-f2d87b8e2c5c; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=00b153be-2ee7-44a7-aa9e-ec61c6098a38; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=67f8b219-494c-46fc-8430-8b9a7a52c2ab\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=dc4cdcc8-b4f8-483e-b5ad-a48a0822ebc9; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=903f59e9-15b7-4011-935c-3f722b2c14a8; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=97d142ef-f894-4d7c-873a-58a068ffd16c; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=3686b997-8404-4be7-9ce4-4c1555e5c444; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c4801355-a8c1-4df3-89c0-b44d205f3790; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=4b49816d-34bf-4999-aa9f-f2d87b8e2c5c; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=b084b76d-4094-4d45-8d14-368d457f32c2\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=db8cd743-d6dd-4cfc-b5b4-6b8020e34c8f; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=3686b997-8404-4be7-9ce4-4c1555e5c444\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=1fb6b541-86e8-49d3-a76c-27f51ee91700; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=d5e21461-3554-4392-ba75-1d711b79a62a; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=d0459516-1ced-4de1-9356-7cbc7d4baaec; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c9639f80-afb8-48f8-8d9a-1b501401d6f9; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=98d54136-8f2a-4209-b67d-7ac9b02cb0a9; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=97d142ef-f894-4d7c-873a-58a068ffd16c; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=db8cd743-d6dd-4cfc-b5b4-6b8020e34c8f\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=98d54136-8f2a-4209-b67d-7ac9b02cb0a9\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=f28cfa46-8364-45d0-9714-1a2ad3254cb1; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=bd0eabc6-a234-4592-86be-8f9f5c8b855b; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0bff4eec-387f-484d-8a27-e739d25c3df6; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=6b24c078-4a9b-4e5e-959b-6453d7c95659; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=5b0b1565-7505-4f13-a2ff-92b1260b67cf; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=d5e21461-3554-4392-ba75-1d711b79a62a; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=d0459516-1ced-4de1-9356-7cbc7d4baaec\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=5b0b1565-7505-4f13-a2ff-92b1260b67cf\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=dad8a97a-01d7-42c2-b511-e07843681bf1; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0b20f8a9-eb2e-4874-adbe-821b0d472974; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=a4f0328f-3347-4e88-83c3-db81240d21e8; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=9cfce8f4-12fc-4dfb-902e-f8ebe1f76d5f; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=61373688-556e-4e19-b5be-97b5ce3d6232; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=cc47f4f3-286c-4b88-8692-4345c63abad8; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=b2035953-5c25-4bea-b4ad-57d249c7d1dd; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=daab100c-dcf2-47c5-bf5c-bbfa11184c48; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=090231d4-2f0d-47b8-91ec-204a2899e2b8; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=4fa94396-fe15-47a2-a393-b4d01e579c4b; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=7af40ed7-5329-4432-a158-9daafa6e3768; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c7a9c907-315b-488b-a03a-b9164cc392e4; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=bd0eabc6-a234-4592-86be-8f9f5c8b855b; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=0bff4eec-387f-484d-8a27-e739d25c3df6\n", + "WARNING:langsmith.client:Failed to batch ingest runs: langsmith.utils.LangSmithAuthError: Authentication failed for https://api.smith.langchain.com/runs/batch. HTTPError('401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/batch', '{\"detail\":\"Using legacy API key. Please generate a new API key.\"}')\n", + "post: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=e9b1009a-8388-41e5-9f5d-b23e5d7a0135; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=5d2f00d2-b8f3-423e-b7b5-b6751cd18ee2; patch: trace=da982506-c769-4e99-8a13-3ba28464e33b,id=c7a9c907-315b-488b-a03a-b9164cc392e4; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=61373688-556e-4e19-b5be-97b5ce3d6232; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=9cfce8f4-12fc-4dfb-902e-f8ebe1f76d5f; trace=da982506-c769-4e99-8a13-3ba28464e33b,id=da982506-c769-4e99-8a13-3ba28464e33b\n" + ] } ], "source": [ @@ -810,7 +949,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -941,7 +1080,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -1078,7 +1217,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -1114,7 +1253,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -1123,7 +1262,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -1178,7 +1317,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 28, "metadata": {}, "outputs": [], "source": [ @@ -1335,7 +1474,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -1363,7 +1502,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -1379,7 +1518,7 @@ "{'environment': True}" ] }, - "execution_count": 27, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -1400,7 +1539,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 36, "metadata": {}, "outputs": [ { @@ -1430,9 +1569,18 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 32, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: GET https://api.gradio.app/gradio-messaging/en \"HTTP/1.1 200 OK\"\n", + "/tmp/ipykernel_13585/659967580.py:28: LangChainBetaWarning: This API is in beta and may change in the future.\n", + " result = app.astream_events(inputs,version = \"v1\") #{\"callbacks\":[MyCustomAsyncHandler()]})\n" + ] + }, { "ename": "TypeError", "evalue": "'Metadata' object is not subscriptable", @@ -1440,7 +1588,7 @@ "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[34], line 52\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m steps_display\u001b[38;5;241m.\u001b[39mkeys() \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chain_start\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;66;03m#display steps\u001b[39;00m\n\u001b[1;32m 51\u001b[0m event_description,display_output \u001b[38;5;241m=\u001b[39m steps_display[node]\n\u001b[0;32m---> 52\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(history[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m], \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[43mhistory\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmetadata\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtitle\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m!=\u001b[39m event_description: \u001b[38;5;66;03m# if a new step begins\u001b[39;00m\n\u001b[1;32m 53\u001b[0m history\u001b[38;5;241m.\u001b[39mappend(ChatMessage(role\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124massistant\u001b[39m\u001b[38;5;124m\"\u001b[39m, content \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata\u001b[38;5;241m=\u001b[39m{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtitle\u001b[39m\u001b[38;5;124m'\u001b[39m :event_description}))\n\u001b[1;32m 55\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m!=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtransform_query\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chat_model_stream\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_rag\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_search\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\u001b[38;5;66;03m# if streaming answer\u001b[39;00m\n", + "Cell \u001b[0;32mIn[32], line 52\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m steps_display\u001b[38;5;241m.\u001b[39mkeys() \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chain_start\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;66;03m#display steps\u001b[39;00m\n\u001b[1;32m 51\u001b[0m event_description,display_output \u001b[38;5;241m=\u001b[39m steps_display[node]\n\u001b[0;32m---> 52\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(history[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m], \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[43mhistory\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmetadata\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtitle\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m!=\u001b[39m event_description: \u001b[38;5;66;03m# if a new step begins\u001b[39;00m\n\u001b[1;32m 53\u001b[0m history\u001b[38;5;241m.\u001b[39mappend(ChatMessage(role\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124massistant\u001b[39m\u001b[38;5;124m\"\u001b[39m, content \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata\u001b[38;5;241m=\u001b[39m{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtitle\u001b[39m\u001b[38;5;124m'\u001b[39m :event_description}))\n\u001b[1;32m 55\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m!=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtransform_query\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chat_model_stream\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_rag\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_search\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\u001b[38;5;66;03m# if streaming answer\u001b[39;00m\n", "\u001b[0;31mTypeError\u001b[0m: 'Metadata' object is not subscriptable" ] }, @@ -1475,7 +1623,9 @@ "text": [ "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n" + "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "/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" ] }, { @@ -1483,10 +1633,10 @@ "output_type": "stream", "text": [ "---- Retrieving graphs ----\n", - "Subquestion 0: What is radiative forcing?\n", - "8 graphs retrieved for subquestion 1: [Document(metadata={'category': 'Energy', 'doc_id': 'owid_971', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Energy intensity is measured as primary energy consumption per unit of gross domestic product (GDP), in kilowatt-hours per dollar. GDP is adjusted for inflation and differences in the cost of living between countries.', 'url': 'https://ourworldindata.org/grapher/energy-intensity', 'similarity_score': 0.9688466787338257, 'content': 'Energy intensity', 'reranking_score': 1.0006295269704424e-05, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Energy intensity'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 1.0487818717956543, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 9.884071005217265e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'Ozone Layer', 'doc_id': 'owid_1847', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Ozone-depleting substance emissions are measured in ODP tonnes.', 'url': 'https://ourworldindata.org/grapher/ozone-depleting-substance-emissions', 'similarity_score': 1.0677553415298462, 'content': 'Ozone-depleting substance emissions', 'reranking_score': 9.861145372269675e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Ozone-depleting substance emissions'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_345', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Amount of carbon dioxide emitted per unit of energy production, measured in kilograms of CO₂ per kilowatt-hour.', 'url': 'https://ourworldindata.org/grapher/co2-per-unit-energy', 'similarity_score': 1.072110891342163, 'content': 'Carbon intensity of energy production', 'reranking_score': 9.729433259053621e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon intensity of energy production'), Document(metadata={'category': 'Energy', 'doc_id': 'owid_1013', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of primary energy by source over the long-term, measured as the percentage of total energy consumption. Primary electricity includes: hydropower, nuclear power, wind, photo\\xadvoltaics, tidal, wave and solar thermal and geothermal (only figures for electricity production are included).', 'url': 'https://ourworldindata.org/grapher/long-term-energy-transitions', 'similarity_score': 1.0745391845703125, 'content': 'Long-term energy transitions', 'reranking_score': 9.729433259053621e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Long-term energy transitions'), Document(metadata={'category': 'Energy', 'doc_id': 'owid_1082', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Direct primary energy measures the amount of electricity generated from power plants. Substituted primary energy estimates the amount of energy required by power plants if these sources had the same inefficiencies as fossil fuels. Measured in terawatt-hours.', 'url': 'https://ourworldindata.org/grapher/renewable-nuclear-direct-substitution', 'similarity_score': 1.0793521404266357, 'content': 'Renewable and nuclear energy: direct vs. substituted energy', 'reranking_score': 9.676273293734994e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Renewable and nuclear energy: direct vs. substituted energy'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 1.0885636806488037, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 9.672482519818004e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'Natural Disasters', 'doc_id': 'owid_1728', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Accumulated cyclone energy (ACE) is an index used to measure the activity of a cyclone/hurricane season. It combines the number of hurricane systems, how long they existed and how intense they became.', 'url': 'https://ourworldindata.org/grapher/ace-north-atlantic-hurricanes', 'similarity_score': 1.088597297668457, 'content': 'Accumulated cyclone energy of North Atlantic hurricanes', 'reranking_score': 9.653728739067446e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Accumulated cyclone energy of North Atlantic hurricanes')]\n", - "Subquestion 1: What are the impacts of radiative forcing on the climate?\n", - "7 graphs retrieved for subquestion 2: [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.8161638975143433, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.03297441452741623, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.8179692625999451, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 2.881309228541795e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 0.8352534770965576, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 1.8446306057740003e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8398256301879883, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 1.7488076991867274e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8541404008865356, 'content': 'Global warming contributions by gas and source', 'reranking_score': 1.7253492842428386e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_358', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-to-temp-rise-by-gas', 'similarity_score': 0.8612645864486694, 'content': 'Contribution to global mean surface temperature rise by gas', 'reranking_score': 1.544259794172831e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise by gas'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_384', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/warming-fossil-fuels-land-use', 'similarity_score': 0.8817370533943176, 'content': 'Global warming contributions from fossil fuels and land use', 'reranking_score': 1.4706844012835063e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions from fossil fuels and land use')]\n", + "Subquestion 0: What is radiative forcing and how does it affect climate change?\n", + "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.8423357605934143, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.005384462885558605, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.8526537418365479, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 7.293858652701601e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 0.8662314414978027, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 6.450313958339393e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_358', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-to-temp-rise-by-gas', 'similarity_score': 0.8814464807510376, 'content': 'Contribution to global mean surface temperature rise by gas', 'reranking_score': 2.3544196665170603e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise by gas'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8828883171081543, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 1.724368667055387e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8840625286102295, 'content': 'Global warming contributions by gas and source', 'reranking_score': 1.6588734069955535e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_767', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This is measured at a nominal depth of 20cm, and given relative to the average temperature from the period of 1961 - 1990. Measured in degrees Celsius.', 'url': 'https://ourworldindata.org/grapher/sea-surface-temperature', 'similarity_score': 0.9009610414505005, 'content': 'Global warming: monthly sea surface temperature anomaly', 'reranking_score': 1.570666063344106e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: monthly sea surface temperature anomaly'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_768', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The deviation of a specific year's average surface temperature from the 1991-2020 mean, in degrees Celsius.\", 'url': 'https://ourworldindata.org/grapher/global-yearly-surface-temperature-anomalies', 'similarity_score': 0.9119041562080383, 'content': 'Global yearly surface temperature anomalies', 'reranking_score': 1.5241118489939254e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global yearly surface temperature anomalies')]\n", + "Subquestion 1: What are the different types of radiative forcing and their impacts on the environment?\n", + "7 graphs retrieved for subquestion 2: [Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 0.8055480122566223, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 2.3946791770868003e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'Natural Disasters', 'doc_id': 'owid_1760', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The annual reported number of natural disasters, categorised by type. The number of global reported natural disaster events in any given year. Note that this largely reflects increases in data reporting, and should not be used to assess the total number of events.', 'url': 'https://ourworldindata.org/grapher/natural-disasters-by-type', 'similarity_score': 0.8462469577789307, 'content': 'Global reported natural disasters by type', 'reranking_score': 1.6791396774351597e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Global reported natural disasters by type'), Document(metadata={'category': 'Ozone Layer', 'doc_id': 'owid_1844', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Annual consumption of ozone-depleting substances. Emissions of each gas are given in ODP tonnes, which accounts for the quantity of gas emitted and how \"strong\" it is in terms of depleting ozone.', 'url': 'https://ourworldindata.org/grapher/ozone-depleting-substance-consumption', 'similarity_score': 0.8488471508026123, 'content': 'Emissions of ozone-depleting substances', 'reranking_score': 1.35105183289852e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Emissions of ozone-depleting substances'), Document(metadata={'category': 'Ozone Layer', 'doc_id': 'owid_1847', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Ozone-depleting substance emissions are measured in ODP tonnes.', 'url': 'https://ourworldindata.org/grapher/ozone-depleting-substance-emissions', 'similarity_score': 0.8520827293395996, 'content': 'Ozone-depleting substance emissions', 'reranking_score': 1.2769949535140768e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Ozone-depleting substance emissions'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8670639395713806, 'content': 'Global warming contributions by gas and source', 'reranking_score': 1.2466728549043182e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'Air Pollution', 'doc_id': 'owid_138', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Annual emissions of particulate matter from all human-induced sources. This is measured in terms of PM₁₀ and PM₂.₅, which denotes particulate matter less than 10 and 2.5 microns in diameter, respectively.', 'url': 'https://ourworldindata.org/grapher/emissions-of-particulate-matter', 'similarity_score': 0.8681329488754272, 'content': 'Emissions of particulate matter', 'reranking_score': 1.2325931493251119e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Emissions of particulate matter'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_387', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Greenhouse gas emissions include carbon dioxide, methane and nitrous oxide from all sources, including land-use change. They are measured in tonnes of carbon dioxide-equivalents over a 100-year timescale.', 'url': 'https://ourworldindata.org/grapher/total-ghg-emissions', 'similarity_score': 0.8768877983093262, 'content': 'Greenhouse gas emissions', 'reranking_score': 1.1929207175853662e-05, 'query_used_for_retrieval': 'What are the different types of radiative forcing and their impacts on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Greenhouse gas emissions')]\n", "---- Retrieve documents ----\n" ] }, @@ -1496,8 +1646,8 @@ "text": [ "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 7fa2a01f-9254-4273-ae99-1413a7d105cc.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 7fa2a01f-9254-4273-ae99-1413a7d105cc.')\n" + "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID d589b647-b2b8-4479-8654-0237320b13e7.')\n", + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID d589b647-b2b8-4479-8654-0237320b13e7.')\n" ] }, { @@ -1513,12 +1663,12 @@ "text": [ "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 0910f30c-f64d-4a7b-a032-b269da2e8852.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 0910f30c-f64d-4a7b-a032-b269da2e8852.')\n", + "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 3025729a-c358-4d18-b4eb-7564073fbde4.')\n", + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 3025729a-c358-4d18-b4eb-7564073fbde4.')\n", "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 809958e3-d092-413d-91ad-a52c9de80590.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 809958e3-d092-413d-91ad-a52c9de80590.')\n" + "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 16e0d163-397b-44a4-b854-0962de03abe9.')\n", + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 16e0d163-397b-44a4-b854-0962de03abe9.')\n" ] }, { @@ -1542,17 +1692,25 @@ "\n", "\n", "Answer:\n", - "Radiative forcing is a key concept in understanding climate change. It refers to the balance between energy coming into the Earth's atmosphere and the energy being emitted back out. When there is more energy coming in than going out, it leads to warming, and when there is more energy going out than coming in, it leads to cooling.\n", + "Radiative forcing is a key concept in understanding how human activities affect the Earth's climate. It refers to the change in energy balance in the Earth's atmosphere due to various factors, primarily greenhouse gases (GHGs) and aerosols. Here’s a breakdown of its impact:\n", "\n", - "- Human activities, such as the increase in greenhouse gas concentrations, have caused a significant radiative forcing of 2.72 W m-2 in 2019 compared to 1750 [Doc 1]. This extra energy has warmed the climate system, with most of the warming attributed to greenhouse gases and partially offset by cooling from increased aerosol concentrations.\n", + "### What is Radiative Forcing?\n", + "- **Definition**: Radiative forcing measures how much energy is added to or taken away from the Earth's atmosphere. Positive radiative forcing leads to warming, while negative radiative forcing can cause cooling.\n", + "- **Current Status**: As of 2019, human-caused radiative forcing was estimated at 2.72 watts per square meter (W/m²) compared to pre-industrial levels (1750). This represents a significant increase, primarily due to higher concentrations of greenhouse gases like carbon dioxide (CO2) [Doc 1, Doc 9].\n", "\n", - "- The additional energy accumulated in the climate system due to human-caused radiative forcing has led to an increase in the average rate of heating. From 1971-2006 to 2006-2018, the observed heating of the climate system has increased, with ocean warming being the primary contributor [Doc 3].\n", + "### How Does It Affect the Climate?\n", + "- **Energy Accumulation**: The increase in radiative forcing results in more energy being trapped in the climate system, leading to an overall warming effect. The average rate of heating has risen from 0.50 W/m² (1971-2006) to 0.79 W/m² (2006-2018) [Doc 2].\n", + "- **Ocean Warming**: A large portion (91%) of this energy accumulation is absorbed by the oceans, which leads to rising sea temperatures. Other areas affected include land warming, ice loss, and atmospheric warming [Doc 2].\n", "\n", - "- The impact of radiative forcing can be seen in the global temperature changes observed from 2010-2019 compared to the pre-industrial period. Human activities, particularly greenhouse gas emissions, have been a significant factor contributing to global warming, while aerosols have partially offset this effect [Doc 5].\n", + "### Contributions to Climate Change\n", + "- **Greenhouse Gases**: The primary driver of positive radiative forcing is the increase in greenhouse gases, which trap heat in the atmosphere. Since 2011, the contribution from GHGs has increased by 0.34 W/m² [Doc 1].\n", + "- **Aerosols**: While aerosols can have a cooling effect by reflecting sunlight, their overall impact is less than that of greenhouse gases. Changes in aerosol concentrations and their effects on climate are also being better understood [Doc 1, Doc 4].\n", "\n", - "- It's important to note that radiative forcing can have both warming and cooling effects on the climate system. Positive radiative forcing leads to warming, while negative radiative forcing leads to cooling. The Earth responds to these forcings by adjusting its temperature to restore balance, which can result in additional changes in the climate system known as climate feedbacks [Doc 7].\n", + "### Future Implications\n", + "- **Temperature Projections**: The cumulative emissions of CO2 and other greenhouse gases will determine the likelihood of limiting global warming to critical thresholds, such as 1.5°C above pre-industrial levels [Doc 3, Doc 12].\n", + "- **Policy and Action**: Understanding radiative forcing is crucial for developing effective climate policies aimed at reducing emissions and mitigating climate change impacts.\n", "\n", - "In summary, radiative forcing from human activities has significantly impacted the climate system by causing warming, which has implications for global temperature changes and the overall climate.\n" + "In summary, radiative forcing is a fundamental concept that helps explain how human activities, particularly the release of greenhouse gases, are warming our planet. The ongoing changes in our climate system highlight the urgent need for action to reduce emissions and limit future warming.\n" ] } ], @@ -1672,7 +1830,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -1682,7 +1840,7 @@ "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[31], line 152\u001b[0m\n\u001b[1;32m 150\u001b[0m node \u001b[38;5;241m=\u001b[39m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m\"\u001b[39m][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlanggraph_node\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 151\u001b[0m event_description,display_output \u001b[38;5;241m=\u001b[39m steps_display[node]\n\u001b[0;32m--> 152\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(history[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m], \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[43mhistory\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmetadata\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtitle\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m!=\u001b[39m event_description: \u001b[38;5;66;03m# if a new step begins\u001b[39;00m\n\u001b[1;32m 153\u001b[0m history\u001b[38;5;241m.\u001b[39mappend(ChatMessage(role\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124massistant\u001b[39m\u001b[38;5;124m\"\u001b[39m, content \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata\u001b[38;5;241m=\u001b[39m{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtitle\u001b[39m\u001b[38;5;124m'\u001b[39m :event_description}))\n\u001b[1;32m 155\u001b[0m \u001b[38;5;66;03m# for event_name,(event_description,display_output) in steps_display.items():\u001b[39;00m\n\u001b[1;32m 156\u001b[0m \u001b[38;5;66;03m# if event[\"name\"] == event_name:\u001b[39;00m\n\u001b[1;32m 157\u001b[0m \u001b[38;5;66;03m# if event[\"event\"] == \"on_chain_start\":\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 184\u001b[0m \n\u001b[1;32m 185\u001b[0m \u001b[38;5;66;03m# history = [tuple(x) for x in history]\u001b[39;00m\n", + "Cell \u001b[0;32mIn[33], line 49\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m steps_display\u001b[38;5;241m.\u001b[39mkeys() \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chain_start\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;66;03m#display steps\u001b[39;00m\n\u001b[1;32m 48\u001b[0m event_description,display_output \u001b[38;5;241m=\u001b[39m steps_display[node]\n\u001b[0;32m---> 49\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(history[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m], \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[43mhistory\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmetadata\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtitle\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m!=\u001b[39m event_description: \u001b[38;5;66;03m# if a new step begins\u001b[39;00m\n\u001b[1;32m 50\u001b[0m history\u001b[38;5;241m.\u001b[39mappend(ChatMessage(role\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124massistant\u001b[39m\u001b[38;5;124m\"\u001b[39m, content \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata\u001b[38;5;241m=\u001b[39m{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtitle\u001b[39m\u001b[38;5;124m'\u001b[39m :event_description}))\n\u001b[1;32m 52\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m!=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtransform_query\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m event[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mevent\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon_chat_model_stream\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_rag\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124manswer_search\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\u001b[38;5;66;03m# if streaming answer\u001b[39;00m\n", "\u001b[0;31mTypeError\u001b[0m: 'Metadata' object is not subscriptable" ] }, @@ -1725,58 +1883,13 @@ "output_type": "stream", "text": [ "---- Retrieving graphs ----\n", - "Subquestion 0: What is radiative forcing?\n", - "8 graphs retrieved for subquestion 1: [Document(metadata={'category': 'Energy', 'doc_id': 'owid_971', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Energy intensity is measured as primary energy consumption per unit of gross domestic product (GDP), in kilowatt-hours per dollar. GDP is adjusted for inflation and differences in the cost of living between countries.', 'url': 'https://ourworldindata.org/grapher/energy-intensity', 'similarity_score': 0.9688466787338257, 'content': 'Energy intensity', 'reranking_score': 1.0006295269704424e-05, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Energy intensity'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 1.0487818717956543, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 9.884071005217265e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'Ozone Layer', 'doc_id': 'owid_1847', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Ozone-depleting substance emissions are measured in ODP tonnes.', 'url': 'https://ourworldindata.org/grapher/ozone-depleting-substance-emissions', 'similarity_score': 1.0677553415298462, 'content': 'Ozone-depleting substance emissions', 'reranking_score': 9.861145372269675e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Ozone-depleting substance emissions'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_345', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Amount of carbon dioxide emitted per unit of energy production, measured in kilograms of CO₂ per kilowatt-hour.', 'url': 'https://ourworldindata.org/grapher/co2-per-unit-energy', 'similarity_score': 1.072110891342163, 'content': 'Carbon intensity of energy production', 'reranking_score': 9.729433259053621e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon intensity of energy production'), Document(metadata={'category': 'Energy', 'doc_id': 'owid_1013', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of primary energy by source over the long-term, measured as the percentage of total energy consumption. Primary electricity includes: hydropower, nuclear power, wind, photo\\xadvoltaics, tidal, wave and solar thermal and geothermal (only figures for electricity production are included).', 'url': 'https://ourworldindata.org/grapher/long-term-energy-transitions', 'similarity_score': 1.0745391845703125, 'content': 'Long-term energy transitions', 'reranking_score': 9.729433259053621e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Long-term energy transitions'), Document(metadata={'category': 'Energy', 'doc_id': 'owid_1082', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Direct primary energy measures the amount of electricity generated from power plants. Substituted primary energy estimates the amount of energy required by power plants if these sources had the same inefficiencies as fossil fuels. Measured in terawatt-hours.', 'url': 'https://ourworldindata.org/grapher/renewable-nuclear-direct-substitution', 'similarity_score': 1.0793521404266357, 'content': 'Renewable and nuclear energy: direct vs. substituted energy', 'reranking_score': 9.676273293734994e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Renewable and nuclear energy: direct vs. substituted energy'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 1.0885636806488037, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 9.672482519818004e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'Natural Disasters', 'doc_id': 'owid_1728', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Accumulated cyclone energy (ACE) is an index used to measure the activity of a cyclone/hurricane season. It combines the number of hurricane systems, how long they existed and how intense they became.', 'url': 'https://ourworldindata.org/grapher/ace-north-atlantic-hurricanes', 'similarity_score': 1.088597297668457, 'content': 'Accumulated cyclone energy of North Atlantic hurricanes', 'reranking_score': 9.653728739067446e-06, 'query_used_for_retrieval': 'What is radiative forcing?', 'sources_used': ['IEA', 'OWID']}, page_content='Accumulated cyclone energy of North Atlantic hurricanes')]\n", - "Subquestion 1: What are the impacts of radiative forcing on the climate?\n", - "7 graphs retrieved for subquestion 2: [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.8161638975143433, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.03297441452741623, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.8179692625999451, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 2.881309228541795e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 0.8352534770965576, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 1.8446306057740003e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8398256301879883, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 1.7488076991867274e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8541404008865356, 'content': 'Global warming contributions by gas and source', 'reranking_score': 1.7253492842428386e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_358', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-to-temp-rise-by-gas', 'similarity_score': 0.8612645864486694, 'content': 'Contribution to global mean surface temperature rise by gas', 'reranking_score': 1.544259794172831e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise by gas'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_384', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/warming-fossil-fuels-land-use', 'similarity_score': 0.8817370533943176, 'content': 'Global warming contributions from fossil fuels and land use', 'reranking_score': 1.4706844012835063e-05, 'query_used_for_retrieval': 'What are the impacts of radiative forcing on the climate?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions from fossil fuels and land use')]\n", - "---- Retrieve documents ----\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID fb7dec36-256b-4fd7-9a88-71f23a7c0d02.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID fb7dec36-256b-4fd7-9a88-71f23a7c0d02.')\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Subquestion 0: What is radiative forcing and how does it affect climate change?\n", + "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.8423357605934143, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.005384462885558605, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.8526537418365479, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 7.293858652701601e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_342', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions factors quantify the average CO₂ output per unit of energy. They are measured in kilograms of CO₂ per megawatt-hour (MWh) of energy from various fossil fuel sources.', 'url': 'https://ourworldindata.org/grapher/carbon-dioxide-emissions-factor', 'similarity_score': 0.8662314414978027, 'content': 'Carbon dioxide emissions factors', 'reranking_score': 6.450313958339393e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Carbon dioxide emissions factors'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_358', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-to-temp-rise-by-gas', 'similarity_score': 0.8814464807510376, 'content': 'Contribution to global mean surface temperature rise by gas', 'reranking_score': 2.3544196665170603e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise by gas'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8828883171081543, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 1.724368667055387e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8840625286102295, 'content': 'Global warming contributions by gas and source', 'reranking_score': 1.6588734069955535e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_767', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This is measured at a nominal depth of 20cm, and given relative to the average temperature from the period of 1961 - 1990. Measured in degrees Celsius.', 'url': 'https://ourworldindata.org/grapher/sea-surface-temperature', 'similarity_score': 0.9009610414505005, 'content': 'Global warming: monthly sea surface temperature anomaly', 'reranking_score': 1.570666063344106e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: monthly sea surface temperature anomaly'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_768', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The deviation of a specific year's average surface temperature from the 1991-2020 mean, in degrees Celsius.\", 'url': 'https://ourworldindata.org/grapher/global-yearly-surface-temperature-anomalies', 'similarity_score': 0.9119041562080383, 'content': 'Global yearly surface temperature anomalies', 'reranking_score': 1.5241118489939254e-05, 'query_used_for_retrieval': 'What is radiative forcing and how does it affect climate change?', 'sources_used': ['IEA', 'OWID']}, page_content='Global yearly surface temperature anomalies')]\n", + "Subquestion 1: What are the specific impacts of radiative forcing on global temperatures and weather patterns?\n", + "7 graphs retrieved for subquestion 2: [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.743827223777771, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.02035224437713623, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', '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_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.7458232045173645, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 0.010060282424092293, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_358', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-to-temp-rise-by-gas', 'similarity_score': 0.7628831267356873, 'content': 'Contribution to global mean surface temperature rise by gas', 'reranking_score': 0.0008739086915738881, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise by gas'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_768', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The deviation of a specific year's average surface temperature from the 1991-2020 mean, in degrees Celsius.\", 'url': 'https://ourworldindata.org/grapher/global-yearly-surface-temperature-anomalies', 'similarity_score': 0.7884460687637329, 'content': 'Global yearly surface temperature anomalies', 'reranking_score': 0.000565648078918457, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Global yearly surface temperature anomalies'), Document(metadata={'category': 'Natural Disasters', 'doc_id': 'owid_1759', 'returned_content': '', 'source': 'OWID', 'subtitle': 'This indicator shows annual anomalies compared with the average precipitation from 1901 to 2000 based on rainfall and snowfall measurements from land-based weather stations worldwide.', 'url': 'https://ourworldindata.org/grapher/global-precipitation-anomaly', 'similarity_score': 0.7976844906806946, 'content': 'Global precipitation anomaly', 'reranking_score': 0.00035785927320830524, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Global precipitation anomaly'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_359', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of carbon dioxide, methane, and nitrous oxide. This is for land use and agriculture only.\", 'url': 'https://ourworldindata.org/grapher/global-warming-land', 'similarity_score': 0.8079851269721985, 'content': 'Contribution to global mean surface temperature rise from agriculture and land use', 'reranking_score': 0.00035303618642501533, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise from agriculture and land use'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8176379203796387, 'content': 'Global warming contributions by gas and source', 'reranking_score': 0.00030412289197556674, 'query_used_for_retrieval': 'What are the specific impacts of radiative forcing on global temperatures and weather patterns?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source')]\n", "---- Retrieve documents ----\n" ] }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 4812026a-1015-4c17-89cf-496db5498fad.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 4812026a-1015-4c17-89cf-496db5498fad.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LogStreamCallbackHandler.on_chain_end callback: TracerException('No indexed run ID 9fdebdaf-73d1-4e40-83d6-7ada560f3ebb.')\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 9fdebdaf-73d1-4e40-83d6-7ada560f3ebb.')\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "---- Answer RAG ----\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n" - ] - }, { "name": "stdout", "output_type": "stream", @@ -1784,15 +1897,24 @@ "\n", "\n", "Answer:\n", - "Radiative forcing is a key concept in understanding climate change. It refers to the balance between energy entering and leaving the Earth's atmosphere, which affects the temperature of our planet. When there is a positive radiative forcing, it means there is more energy coming in than going out, leading to warming. Conversely, a negative radiative forcing results in cooling.\n", + "Radiative forcing is a key concept in understanding how human activities affect the Earth's climate. It refers to the change in energy balance in the atmosphere due to various factors, primarily greenhouse gases (GHGs) and aerosols. Here’s a breakdown of its impact:\n", + "\n", + "### Key Points on Radiative Forcing:\n", + "\n", + "- **Human Influence**: Since the mid-18th century, human activities have significantly increased the concentration of greenhouse gases in the atmosphere, leading to a radiative forcing of approximately 2.72 watts per square meter (W/m²) by 2019. This represents a 19% increase since the last major assessment in 2014, primarily due to rising GHG levels [Doc 1, Doc 3].\n", "\n", - "Human activities, such as the release of greenhouse gases and aerosols, have caused a significant increase in radiative forcing over the past century. This additional energy in the climate system has led to warming, with most of the heat being absorbed by the oceans. The warming of the climate system has been observed to increase over time, indicating a buildup of energy in the Earth's system.\n", + "- **Energy Accumulation**: The increase in radiative forcing results in more energy being trapped in the climate system, which leads to warming. The average rate of heating has risen from 0.50 W/m² between 1971 and 2006 to 0.79 W/m² from 2006 to 2018. Most of this heat (91%) is absorbed by the oceans, while land, ice, and the atmosphere account for smaller portions [Doc 2].\n", "\n", - "It's important to note that while greenhouse gases contribute to warming, aerosols have a cooling effect that partially offsets the warming caused by greenhouse gases. This balance between warming and cooling factors is crucial in understanding the overall impact of human activities on climate change.\n", + "- **Cooling Effects**: While GHGs contribute to warming, aerosols (tiny particles in the atmosphere) can have a cooling effect. However, the overall impact of human-caused radiative forcing is still positive, meaning it leads to net warming [Doc 1].\n", "\n", - "In response to changes in radiative forcing, the Earth's climate system undergoes adjustments to restore balance. These adjustments can lead to feedback mechanisms that either amplify or dampen the initial warming effect. For example, the melting of Arctic sea ice contributes to further warming by reducing the amount of sunlight reflected back into space.\n", + "- **Future Implications**: The cumulative emissions of CO2 and other gases will determine how much the Earth warms in the future. For instance, limiting warming to 1.5°C above pre-industrial levels will require significant reductions in emissions [Doc 4, Doc 10].\n", "\n", - "Overall, radiative forcing plays a significant role in driving climate change, with human activities being a major contributor to the changes observed in the Earth's climate system. By understanding and addressing the factors influencing radiative forcing, we can better comprehend and mitigate the impacts of climate change on our planet. [Doc 1, Doc 3, Doc 5, Doc 7]\n" + "### Summary of Impacts:\n", + "- **Increased Global Temperatures**: The rise in radiative forcing is a major driver of global temperature increases, which can lead to more extreme weather events, rising sea levels, and disruptions to ecosystems.\n", + "- **Ocean Warming**: The majority of the heat from increased radiative forcing is absorbed by the oceans, which can affect marine life and weather patterns.\n", + "- **Long-term Climate Change**: Continued radiative forcing will have lasting effects on the climate, making it crucial to understand and mitigate these impacts through reduced emissions and other strategies.\n", + "\n", + "In summary, radiative forcing is a fundamental mechanism by which human activities are changing the climate, primarily through the increase of greenhouse gases, leading to significant warming and associated impacts on the environment and society [Doc 1, Doc 2, Doc 4].\n" ] } ], @@ -2035,7 +2157,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -2077,10 +2199,10 @@ "output_type": "stream", "text": [ "---- Retrieving graphs ----\n", - "Subquestion 0: What are the environmental impacts of being a vegetarian?\n", - "8 graphs retrieved for subquestion 1: [Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1678', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Impacts are measured per liter of milk. These are based on a meta-analysis of food system impact studies across the supply chain which includes land use change, on-farm production, processing, transport, and packaging.', 'url': 'https://ourworldindata.org/grapher/environmental-footprint-milks', 'similarity_score': 0.6826351881027222, 'content': 'Environmental footprints of dairy and plant-based milks', 'reranking_score': 0.025419369339942932, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Environmental footprints of dairy and plant-based milks'), Document(metadata={'category': 'Animal Welfare', 'doc_id': 'owid_174', 'returned_content': '', 'source': 'OWID', 'subtitle': '– Flexitarian: mainly vegetarian, but occasionally eat meat or fish. – Pescetarian: eat fish but do not eat meat or poultry. – Vegetarian: do not eat any meat, poultry, game, fish, or shellfish. – Plant-based / Vegan: do not eat dairy products, eggs, or any other animal product.', 'url': 'https://ourworldindata.org/grapher/dietary-choices-uk', 'similarity_score': 0.7348645925521851, 'content': 'Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom', 'reranking_score': 0.00022837991127744317, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom'), Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1688', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Expressed in tonnes of meat. Data from 1961-2013 is based on published FAO estimates; from 2013-2050 based on FAO projections. Projections are based on future population projections and the expected impacts of regional and national economic growth trends on meat consumption.', 'url': 'https://ourworldindata.org/grapher/global-meat-projections-to-2050', 'similarity_score': 0.7610733509063721, 'content': 'Global meat consumption', 'reranking_score': 5.71148339076899e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Global meat consumption'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_382', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions from the food system are broken down by their stage in the life-cycle, from land use and on-farm production through to consumer waste. Emissions are measured in tonnes of carbon dioxide-equivalents.', 'url': 'https://ourworldindata.org/grapher/food-emissions-life-cycle', 'similarity_score': 0.7992925047874451, 'content': 'Global emissions from food by life-cycle stage', 'reranking_score': 4.49202379968483e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Global emissions from food by life-cycle stage'), Document(metadata={'category': 'Plastic Pollution', 'doc_id': 'owid_1889', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Number of times a given grocery bag type would have to be reused to have an environmental impact as low as a standard single-use plastic bag.', 'url': 'https://ourworldindata.org/grapher/grocery-bag-environmental-impact', 'similarity_score': 0.824555516242981, 'content': 'Environmental impacts of different types of grocery bags', 'reranking_score': 2.8800952350138687e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Environmental impacts of different types of grocery bags'), Document(metadata={'category': 'Environmental Impacts of Food Production', 'doc_id': 'owid_1175', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions are measured in tonnes of carbon dioxide-equivalents.', 'url': 'https://ourworldindata.org/grapher/emissions-from-food', 'similarity_score': 0.8313338756561279, 'content': 'Greenhouse gas emissions from food systems', 'reranking_score': 1.8187101886724122e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Greenhouse gas emissions from food systems'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_483', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Food system emissions include agriculture, land-use change, and supply chain emissions (transport, packaging, food processing, retail, cooking, and waste). Emissions are quantified based on food production, not consumption. This means they do not account for international trade.', 'url': 'https://ourworldindata.org/grapher/share-global-food-emissions', 'similarity_score': 0.8323527574539185, 'content': 'Share of global greenhouse gas emissions from food', 'reranking_score': 1.6353857063222677e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Share of global greenhouse gas emissions from food'), Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1673', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The percentage of global habitable land area needed for agriculture if the total world population was to adopt the average diet of any given country versus annual per capita beef consumption. Globally we use approximately 50% of habitable land for agriculture, as shown by the grey horizontal line.', 'url': 'https://ourworldindata.org/grapher/dietary-land-use-vs-beef-consumption', 'similarity_score': 0.8455410003662109, 'content': 'Dietary land use vs. beef consumption', 'reranking_score': 1.4984153494879138e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Dietary land use vs. beef consumption')]\n", - "Subquestion 1: What are the health benefits of being a vegetarian?\n", - "7 graphs retrieved for subquestion 2: [Document(metadata={'category': 'Animal Welfare', 'doc_id': 'owid_174', 'returned_content': '', 'source': 'OWID', 'subtitle': '– Flexitarian: mainly vegetarian, but occasionally eat meat or fish. – Pescetarian: eat fish but do not eat meat or poultry. – Vegetarian: do not eat any meat, poultry, game, fish, or shellfish. – Plant-based / Vegan: do not eat dairy products, eggs, or any other animal product.', 'url': 'https://ourworldindata.org/grapher/dietary-choices-uk', 'similarity_score': 0.7397687435150146, 'content': 'Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom', 'reranking_score': 0.0008887002477422357, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom'), Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1688', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Expressed in tonnes of meat. Data from 1961-2013 is based on published FAO estimates; from 2013-2050 based on FAO projections. Projections are based on future population projections and the expected impacts of regional and national economic growth trends on meat consumption.', 'url': 'https://ourworldindata.org/grapher/global-meat-projections-to-2050', 'similarity_score': 0.8430077433586121, 'content': 'Global meat consumption', 'reranking_score': 3.41298509738408e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Global meat consumption'), Document(metadata={'category': 'Animal Welfare', 'doc_id': 'owid_168', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The survey measured attitudes towards animal farming with around 1,500 adults in the United States, census-balanced to be representative of age, gender, region, ethnicity, and income.', 'url': 'https://ourworldindata.org/grapher/survey-dietary-choices-sentience', 'similarity_score': 0.8580029010772705, 'content': 'Public attitudes to dietary choices and meat-eating in the United States', 'reranking_score': 1.3065436178294476e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Public attitudes to dietary choices and meat-eating in the United States'), Document(metadata={'category': 'Diet Compositions', 'doc_id': 'owid_849', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Recommended intakes of animal products in the EAT-Lancet diet are shown relative to average daily per capita supply by country. The EAT-Lancet diet is a diet recommended to balance the goals of healthy nutrition and environmental sustainability for a global population.', 'url': 'https://ourworldindata.org/grapher/eat-lancet-diet-animal-products', 'similarity_score': 0.8636244535446167, 'content': 'Consumption of animal products in the EAT-Lancet diet', 'reranking_score': 1.1884163541253656e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Consumption of animal products in the EAT-Lancet diet'), Document(metadata={'category': 'Food Supply', 'doc_id': 'owid_1310', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Daily meat consumption is shown relative to the expected EU average of 165g per person in 2030. This projection comes from the livestock antibiotic scenarios from Van Boeckel et al. (2017).', 'url': 'https://ourworldindata.org/grapher/daily-meat-consumption-per-person', 'similarity_score': 0.876916766166687, 'content': 'Daily meat consumption per person', 'reranking_score': 1.1853918294946197e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Daily meat consumption per person'), Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1673', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The percentage of global habitable land area needed for agriculture if the total world population was to adopt the average diet of any given country versus annual per capita beef consumption. Globally we use approximately 50% of habitable land for agriculture, as shown by the grey horizontal line.', 'url': 'https://ourworldindata.org/grapher/dietary-land-use-vs-beef-consumption', 'similarity_score': 0.9062429666519165, 'content': 'Dietary land use vs. beef consumption', 'reranking_score': 1.1840336810564622e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Dietary land use vs. beef consumption'), Document(metadata={'category': 'Food Supply', 'doc_id': 'owid_1316', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Daily per capita protein supply is measured in grams per person per day. Protein of animal origin includes protein from all meat commodities, eggs and dairy products, and fish & seafood.', 'url': 'https://ourworldindata.org/grapher/daily-protein-supply-from-animal-and-plant-based-foods', 'similarity_score': 0.9169386029243469, 'content': 'Daily protein supply from animal and plant-based foods', 'reranking_score': 1.122933372244006e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Daily protein supply from animal and plant-based foods')]\n", + "Subquestion 0: What are the effects of climate change on the environment?\n", + "8 graphs retrieved for subquestion 1: [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.7941333055496216, 'content': 'Change in CO2 emissions and GDP', 'reranking_score': 0.279598593711853, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in CO2 emissions and GDP'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.7979490756988525, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 0.012760520912706852, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_756', 'returned_content': '', 'source': 'OWID', 'subtitle': 'National adaptation plans are a means of identifying medium- and long-term climate change adaptation needs and developing and implementing strategies and programmes to address those needs.', 'url': 'https://ourworldindata.org/grapher/countries-with-national-adaptation-plans-for-climate-change', 'similarity_score': 0.7981775999069214, 'content': 'Countries with national adaptation plans for climate change', 'reranking_score': 0.004124350380152464, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with national adaptation plans for climate change'), 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.7989407181739807, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.0036289971321821213, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', '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_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8071538805961609, 'content': 'Global warming contributions by gas and source', 'reranking_score': 0.0016414257697761059, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_350', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Consumption-based emissions include those from fossil fuels and industry. Land-use change emissions are not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp-per-capita', 'similarity_score': 0.8269157409667969, 'content': 'Change in per capita CO2 emissions and GDP', 'reranking_score': 0.00023705528292339295, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in per capita CO2 emissions and GDP'), 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.8301026225090027, 'content': 'Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050', 'reranking_score': 7.497359911212698e-05, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', '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': 'Climate Change', 'doc_id': 'owid_782', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of young people in each surveyed country that responded \"yes\" to each statement about climate change. 1,000 young people, aged 16 to 25 years old, were surveyed in each country.', 'url': 'https://ourworldindata.org/grapher/opinions-young-people-climate', 'similarity_score': 0.8306424617767334, 'content': 'Opinions of young people on the threats of climate change', 'reranking_score': 2.747046346485149e-05, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Opinions of young people on the threats of climate change')]\n", + "Subquestion 1: How does climate change affect human health and society?\n", + "7 graphs retrieved for subquestion 2: [Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_789', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Participants were asked to score beliefs on a scale from 0 to 100 on four questions: whether action was necessary to avoid a global catastrophe; humans were causing climate change; it was a serious threat to humanity; and was a global emergency.', 'url': 'https://ourworldindata.org/grapher/share-believe-climate', 'similarity_score': 0.7580230236053467, 'content': \"Share of people who believe in climate change and think it's a serious threat to humanity\", 'reranking_score': 0.005214352160692215, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content=\"Share of people who believe in climate change and think it's a serious threat to humanity\"), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_782', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of young people in each surveyed country that responded \"yes\" to each statement about climate change. 1,000 young people, aged 16 to 25 years old, were surveyed in each country.', 'url': 'https://ourworldindata.org/grapher/opinions-young-people-climate', 'similarity_score': 0.8168312311172485, 'content': 'Opinions of young people on the threats of climate change', 'reranking_score': 0.004852706100791693, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Opinions of young people on the threats of climate change'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_756', 'returned_content': '', 'source': 'OWID', 'subtitle': 'National adaptation plans are a means of identifying medium- and long-term climate change adaptation needs and developing and implementing strategies and programmes to address those needs.', 'url': 'https://ourworldindata.org/grapher/countries-with-national-adaptation-plans-for-climate-change', 'similarity_score': 0.8196202516555786, 'content': 'Countries with national adaptation plans for climate change', 'reranking_score': 0.0012044497998431325, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with national adaptation plans for climate change'), 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.8402930498123169, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.00041706717456690967, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming: Contributions to the change in global mean surface temperature'), Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.8433299660682678, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 0.00030759291257709265, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8584674596786499, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 0.00025533974985592067, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'), Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_317', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Percentage change in gross domestic product (GDP), population, and carbon dioxide (CO₂) emissions.', 'url': 'https://ourworldindata.org/grapher/co2-gdp-pop-growth', 'similarity_score': 0.8730868697166443, 'content': 'Annual change in GDP, population and CO2 emissions', 'reranking_score': 0.0002404096449026838, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Annual change in GDP, population and CO2 emissions')]\n", "---- Retrieve documents ----\n" ] }, @@ -2089,7 +2211,7 @@ "output_type": "stream", "text": [ "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID b439ad93-10d3-4bae-9602-d52a39984115.')\n" + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID aa00a789-394b-42e1-922b-28d51bd4c441.')\n" ] }, { @@ -2104,9 +2226,9 @@ "output_type": "stream", "text": [ "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID ba88b5a4-c204-4eeb-ac33-ff2f0645403f.')\n", + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 511833e2-a8c6-4d5f-ace1-cb7978dcf3e7.')\n", "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_start callback: ValidationError(model='Run', errors=[{'loc': ('__root__',), 'msg': \"argument of type 'NoneType' is not iterable\", 'type': 'type_error'}])\n", - "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID ea4e9940-b59a-4468-9781-b8c56be151a7.')\n" + "WARNING:langchain_core.callbacks.manager:Error in LangChainTracer.on_chain_end callback: TracerException('No indexed run ID 561b415c-c77e-4ed7-82c8-9963ec1d1c7d.')\n" ] }, { @@ -2130,54 +2252,100 @@ "\n", "\n", "Answer:\n", - "I could not find any specific passages in the IPCC/IPBES reports that directly address whether individuals should be vegetarian. This could be due to the search engine limitations, and not because the information is not there. \n", + "Climate change has profound and multifaceted impacts on both human systems and the natural environment, with significant implications for health, biodiversity, agriculture, and infrastructure. Here are the key impacts:\n", + "\n", + "### 1. **Human Health**\n", + "- **Physical and Mental Health**: Climate change adversely affects physical health globally, leading to increased mortality and morbidity due to extreme heat events. It also exacerbates mental health issues, particularly in vulnerable populations [Doc 1, Doc 11].\n", + "- **Disease Dynamics**: There is a notable increase in climate-related diseases, including vector-borne diseases (e.g., malaria, dengue) due to the expansion of disease vectors. Additionally, the incidence of water- and food-borne diseases has risen, influenced by higher temperatures and increased rainfall, which can lead to outbreaks of diseases like cholera [Doc 1, Doc 13].\n", + "- **Food Security and Nutrition**: Climate change impacts food production through altered agricultural yields, which can lead to malnutrition and food insecurity, particularly in regions already facing challenges [Doc 2, Doc 6].\n", + "\n", + "### 2. **Biodiversity and Ecosystems**\n", + "- **Species and Habitat Changes**: Climate change drives shifts in species ranges, habitat locations, and seasonal timing, which can lead to biodiversity loss. Many species are unable to adapt or migrate quickly enough to cope with the rapid changes [Doc 4, Doc 9].\n", + "- **Ecosystem Functionality**: Changes in climate affect critical ecosystem functions such as water regulation, food production, and carbon sequestration. This can lead to decreased resilience of ecosystems and increased vulnerability to other stressors like pollution and habitat degradation [Doc 5, Doc 9].\n", "\n", - "However, from a climate science perspective, reducing meat consumption, especially red meat, can have positive environmental impacts. Livestock farming is a significant contributor to greenhouse gas emissions, deforestation, and water pollution. By choosing a plant-based diet or reducing meat consumption, individuals can help reduce their carbon footprint and lessen the pressure on natural resources.\n", + "### 3. **Agriculture and Food Production**\n", + "- **Agricultural Yields**: Climate change directly affects agricultural productivity through changes in temperature, precipitation patterns, and CO2 concentrations. These changes can lead to reduced crop yields and increased pest populations, further threatening food security [Doc 6, Doc 10].\n", + "- **Land Degradation**: The interaction of climate change with other drivers of land degradation is expected to exacerbate the extent and severity of land degradation, complicating restoration efforts and necessitating new adaptive strategies [Doc 6].\n", "\n", - "If you have specific questions related to the environmental impacts of meat consumption or sustainable diets, please reformulate your question to be more specific to the IPCC/IPBES reports. Remember that individual dietary choices can play a role in addressing climate change, but it is important to consider a variety of factors when making decisions about your diet.\n" + "### 4. **Infrastructure and Urban Areas**\n", + "- **Impact on Cities**: Urban areas are particularly vulnerable to climate change, experiencing intensified heatwaves, flooding, and other extreme weather events. These impacts can compromise infrastructure, disrupt services, and lead to significant economic losses, disproportionately affecting marginalized communities [Doc 11, Doc 10].\n", + "- **Economic Implications**: The economic sectors are also at risk, with climate change causing damage to cities and infrastructure, which can hinder development and adaptation efforts [Doc 2, Doc 10].\n", + "\n", + "### 5. **Interconnectedness of Impacts**\n", + "- The effects of climate change are compounded by interactions with other environmental, socio-cultural, political, and economic drivers, making the challenges more complex and requiring integrated approaches for mitigation and adaptation [Doc 12, Doc 10].\n", + "\n", + "In summary, climate change poses significant risks across various domains, necessitating urgent action to mitigate its impacts and adapt to the changing conditions. The interplay between health, biodiversity, agriculture, and infrastructure highlights the need for comprehensive strategies to address these interconnected challenges.\n" ] }, { "data": { "text/plain": [ - "{'user_input': 'should I be a vegetarian ?',\n", + "{'user_input': 'what is the impact of climate change ?',\n", " 'language': 'English',\n", " 'intent': 'search',\n", - " 'query': 'should I be a vegetarian ?',\n", + " 'query': 'what is the impact of climate change ?',\n", " 'remaining_questions': [],\n", " 'n_questions': 2,\n", - " 'answer': 'I could not find any specific passages in the IPCC/IPBES reports that directly address whether individuals should be vegetarian. This could be due to the search engine limitations, and not because the information is not there. \\n\\nHowever, from a climate science perspective, reducing meat consumption, especially red meat, can have positive environmental impacts. Livestock farming is a significant contributor to greenhouse gas emissions, deforestation, and water pollution. By choosing a plant-based diet or reducing meat consumption, individuals can help reduce their carbon footprint and lessen the pressure on natural resources.\\n\\nIf you have specific questions related to the environmental impacts of meat consumption or sustainable diets, please reformulate your question to be more specific to the IPCC/IPBES reports. Remember that individual dietary choices can play a role in addressing climate change, but it is important to consider a variety of factors when making decisions about your diet.',\n", - " 'documents': [Document(metadata={'chunk_type': 'text', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 367.0, 'num_tokens': 99.0, 'num_tokens_approx': 110.0, 'num_words': 83.0, 'page_number': 24, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'BACKGROUND', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.62691462, 'content': 'healthy diets (established but incomplete) {2.3.4.2}. Shifting diets towards a diversity of foods, including fish, fruit, nuts and vegetables, significantly reduces the risk of certain preventable non-communicable diseases, which are currently responsible for 20 per cent of premature mortality globally (well established) {2.3.4.2, 2.3.5.2 (NCP 2 and 12)}.', 'reranking_score': 0.06392419338226318, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='healthy diets (established but incomplete) {2.3.4.2}. Shifting diets towards a diversity of foods, including fish, fruit, nuts and vegetables, significantly reduces the risk of certain preventable non-communicable diseases, which are currently responsible for 20 per cent of premature mortality globally (well established) {2.3.4.2, 2.3.5.2 (NCP 2 and 12)}.'),\n", - " Document(metadata={'chunk_type': 'text', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 213.0, 'num_tokens': 57.0, 'num_tokens_approx': 62.0, 'num_words': 47.0, 'page_number': 44, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'interventions, or levers, and eight leverage points that \\r\\nare key for achieving transformative change (Figure ', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.615191042, 'content': 'reduce food waste, overconsumption, and the demand for animal products that are produced unsustainably, which could have synergistic benefits for human health (established but incomplete) {5.3.2.1, 6.3.2.1}.', 'reranking_score': 0.020161613821983337, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='reduce food waste, overconsumption, and the demand for animal products that are produced unsustainably, which could have synergistic benefits for human health (established but incomplete) {5.3.2.1, 6.3.2.1}.'),\n", - " Document(metadata={'chunk_type': 'text', 'document_id': 'document24', 'document_number': 24.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 60.0, 'name': 'Summary for Policymakers. Global assessment report on biodiversity and ecosystem services of the IPBES (Version 1)', 'num_characters': 684.0, 'num_tokens': 202.0, 'num_tokens_approx': 237.0, 'num_words': 178.0, 'page_number': 24, 'release_date': 2019.0, 'report_type': 'SPM', 'section_header': 'BACKGROUND', 'short_name': 'IPBES GAR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3553579/files/ipbes_global_assessment_report_summary_for_policymakers.pdf', 'similarity_score': 0.600360632, 'content': \"2 Many of nature's contributions to people are essential for human health (well established) and their decline thus threatens a good quality of life (established but incomplete) {2.3.4}. Nature provides a broad diversity of nutritious foods, medicines and clean water (well established) {2.3.5.2, 3.3.2.1, 3.3.2.2 (Sustainable Development Goal 3)}; can help to regulate disease and the immune system {2.3.4.2}; can reduce levels of certain air pollutants (established but incomplete) {2.3.4.2, 3.3.2.2}; and can improve mental and physical health through exposure to natural areas (inconclusive), among other contributions {2.3.2.2, 2.3.4.2, 3.3.2.2 (Sustainable\", 'reranking_score': 0.01197810098528862, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content=\"2 Many of nature's contributions to people are essential for human health (well established) and their decline thus threatens a good quality of life (established but incomplete) {2.3.4}. Nature provides a broad diversity of nutritious foods, medicines and clean water (well established) {2.3.5.2, 3.3.2.1, 3.3.2.2 (Sustainable Development Goal 3)}; can help to regulate disease and the immune system {2.3.4.2}; can reduce levels of certain air pollutants (established but incomplete) {2.3.4.2, 3.3.2.2}; and can improve mental and physical health through exposure to natural areas (inconclusive), among other contributions {2.3.2.2, 2.3.4.2, 3.3.2.2 (Sustainable\"),\n", - " Document(metadata={'chunk_type': 'text', 'document_id': 'document30', 'document_number': 30.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for the Americas', 'num_characters': 1017.0, 'num_tokens': 219.0, 'num_tokens_approx': 242.0, 'num_words': 182.0, 'page_number': 26, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': '* The Delphi method is a structured and iterative evaluation process that uses expert panels to establish consensus regarding the assessment of a specifi c topic.', 'short_name': 'IPBES RAR AM SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3236292/files/ipbes_assessment_spm_americas_EN.pdf', 'similarity_score': 0.593067527, 'content': 'Human health depends directly and indirectly on nature. Biodiversity is a source of medicines and other products that contribute to human health and have high potential for the development of pharmacological products (well established) {2.2.4, 2.4}. In some areas outside of North America, the commercial development of medicinal products has been weak. In the Americas, many opportunities remain for further development of products from nature that can contribute to human health, including through bioprospecting, in accordance with national legislation {2.2.4, 2.4}.\\nHealth benefits from biodiversity and access to nature are well documented (established but incomplete). Examples include diets based on diverse natural products improve health and nearness to green space has been linked to reduced childhood obesity in some urban areas {1.3.2, 2.3.4}. On the other hand, ecosystem contaminants and pollutants transferred to humans via food supplies have been linked to widespread', 'reranking_score': 0.011911126784980297, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='Human health depends directly and indirectly on nature. Biodiversity is a source of medicines and other products that contribute to human health and have high potential for the development of pharmacological products (well established) {2.2.4, 2.4}. In some areas outside of North America, the commercial development of medicinal products has been weak. In the Americas, many opportunities remain for further development of products from nature that can contribute to human health, including through bioprospecting, in accordance with national legislation {2.2.4, 2.4}.\\nHealth benefits from biodiversity and access to nature are well documented (established but incomplete). Examples include diets based on diverse natural products improve health and nearness to green space has been linked to reduced childhood obesity in some urban areas {1.3.2, 2.3.4}. On the other hand, ecosystem contaminants and pollutants transferred to humans via food supplies have been linked to widespread'),\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': 880.0, 'num_tokens': 215.0, 'num_tokens_approx': 212.0, 'num_words': 159.0, 'page_number': 816, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'Agriculture, Forestry and Other Land Uses (AFOLU) ', 'short_name': 'IPCC AR6 WGIII FR', 'source': 'IPCC', 'toc_level0': '7.4 Assessment of AFOLU Mitigation Measures Including Trade-offs and Synergies', 'toc_level1': '7.4.5 Demand-side Measures', '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.694379687, 'content': 'a transition towards more plant-based consumption and reduced consumption of animal-based foods, particularly from ruminant animals, could reduce pressure on forests and land used for feed, support the preservation of biodiversity and planetary health (FAO 2018c; Theurl et al. 2020), and contribute to preventing forms of malnutrition (i.e., undernutrition, micronutrient deficiency, and obesity) in developing countries (Section 12.4). Other co-benefits include lowering the risk of cardiovascular disease, type 2 diabetes, and reducing mortality from diet-related non-communicable diseases (Toumpanakis et al. 2018; Satija and Hu 2018; Faber et al. 2020; Magkos et al. 2020). However, transition towards sustainable healthy diets could have adverse impacts on the economic stability of the agricultural sector (MacDiarmid 2013; Aschemann-Witzel 2015;', 'reranking_score': 0.010761579498648643, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='a transition towards more plant-based consumption and reduced consumption of animal-based foods, particularly from ruminant animals, could reduce pressure on forests and land used for feed, support the preservation of biodiversity and planetary health (FAO 2018c; Theurl et al. 2020), and contribute to preventing forms of malnutrition (i.e., undernutrition, micronutrient deficiency, and obesity) in developing countries (Section 12.4). Other co-benefits include lowering the risk of cardiovascular disease, type 2 diabetes, and reducing mortality from diet-related non-communicable diseases (Toumpanakis et al. 2018; Satija and Hu 2018; Faber et al. 2020; Magkos et al. 2020). However, transition towards sustainable healthy diets could have adverse impacts on the economic stability of the agricultural sector (MacDiarmid 2013; Aschemann-Witzel 2015;'),\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': 227.0, 'num_tokens': 59.0, 'num_tokens_approx': 61.0, 'num_words': 46.0, 'page_number': 524, 'release_date': 2018.0, 'report_type': 'Full Report', 'section_header': '4.6.1.3 Drivers of nutrient pollution', '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.6 Drivers and effects of pollution ', 'toc_level2': '4.6.1 Nutrient pollution ', 'toc_level3': '4.6.1.3 Drivers of nutrient pollution', 'url': 'https://zenodo.org/record/3237429/files/ipbes_assessment_report_eca_EN.pdf', 'similarity_score': 0.667931199, 'content': 'Vegetarianism is a cultural driver with a high potential: a 50% reduction in the consumption of animal products would lead to at least a 10%-reduction in nitrogen pollution in the EU-27 (Van Grinsven et al., 2015).\\n466466', 'reranking_score': 0.010324961505830288, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='Vegetarianism is a cultural driver with a high potential: a 50% reduction in the consumption of animal products would lead to at least a 10%-reduction in nitrogen pollution in the EU-27 (Van Grinsven et al., 2015).\\n466466'),\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': 916.0, 'num_tokens': 192.0, 'num_tokens_approx': 236.0, 'num_words': 177.0, 'page_number': 1059, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'Observed Impacts', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 7 Health, Wellbeing and the Changing Structure of Communities', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.666556418, 'content': 'Transitioning towards equitable, low-carbon societies has multiple benefits for health and well-being (very high confidence). Benefits for health and well-being can be gained from wide-spread, equitable access to affordable renewable energy (high confidence); active transport (e.g., walking and cycling) (high confidence); green buildings and nature-based solutions, such as green and blue urban infrastructure (high confidence); and by transitioning to a low-carbon, well-being-oriented and equity-oriented economy consistent with the aims of the SDGs (high confidence). Plant-rich diets consistent with international recommendations for healthy diets could contribute to lower GHG emissions while also generating health co-benefits, such as reducing ill health related to over-consumption of animal-based products (high confidence) {7.4.2; Cross-Chapter Box HEALTH in Chapter 7; 7.4.4}.', 'reranking_score': 0.010074242949485779, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IPCC', 'IPOS', 'IPBES'], 'question_used': 'What are the health benefits of being a vegetarian?', 'index_used': 'Vector'}, page_content='Transitioning towards equitable, low-carbon societies has multiple benefits for health and well-being (very high confidence). Benefits for health and well-being can be gained from wide-spread, equitable access to affordable renewable energy (high confidence); active transport (e.g., walking and cycling) (high confidence); green buildings and nature-based solutions, such as green and blue urban infrastructure (high confidence); and by transitioning to a low-carbon, well-being-oriented and equity-oriented economy consistent with the aims of the SDGs (high confidence). Plant-rich diets consistent with international recommendations for healthy diets could contribute to lower GHG emissions while also generating health co-benefits, such as reducing ill health related to over-consumption of animal-based products (high confidence) {7.4.2; Cross-Chapter Box HEALTH in Chapter 7; 7.4.4}.')],\n", - " 'recommended_content': [Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1678', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Impacts are measured per liter of milk. These are based on a meta-analysis of food system impact studies across the supply chain which includes land use change, on-farm production, processing, transport, and packaging.', 'url': 'https://ourworldindata.org/grapher/environmental-footprint-milks', 'similarity_score': 0.6826351881027222, 'content': 'Environmental footprints of dairy and plant-based milks', 'reranking_score': 0.025419369339942932, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Environmental footprints of dairy and plant-based milks'),\n", - " Document(metadata={'category': 'Animal Welfare', 'doc_id': 'owid_174', 'returned_content': '', 'source': 'OWID', 'subtitle': '– Flexitarian: mainly vegetarian, but occasionally eat meat or fish. – Pescetarian: eat fish but do not eat meat or poultry. – Vegetarian: do not eat any meat, poultry, game, fish, or shellfish. – Plant-based / Vegan: do not eat dairy products, eggs, or any other animal product.', 'url': 'https://ourworldindata.org/grapher/dietary-choices-uk', 'similarity_score': 0.7397687435150146, 'content': 'Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom', 'reranking_score': 0.0008887002477422357, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Vegans, vegetarians and meat-eaters: self-reported dietary choices, United Kingdom'),\n", - " Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1688', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Expressed in tonnes of meat. Data from 1961-2013 is based on published FAO estimates; from 2013-2050 based on FAO projections. Projections are based on future population projections and the expected impacts of regional and national economic growth trends on meat consumption.', 'url': 'https://ourworldindata.org/grapher/global-meat-projections-to-2050', 'similarity_score': 0.7610733509063721, 'content': 'Global meat consumption', 'reranking_score': 5.71148339076899e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Global meat consumption'),\n", - " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_382', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions from the food system are broken down by their stage in the life-cycle, from land use and on-farm production through to consumer waste. Emissions are measured in tonnes of carbon dioxide-equivalents.', 'url': 'https://ourworldindata.org/grapher/food-emissions-life-cycle', 'similarity_score': 0.7992925047874451, 'content': 'Global emissions from food by life-cycle stage', 'reranking_score': 4.49202379968483e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Global emissions from food by life-cycle stage'),\n", - " Document(metadata={'category': 'Plastic Pollution', 'doc_id': 'owid_1889', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Number of times a given grocery bag type would have to be reused to have an environmental impact as low as a standard single-use plastic bag.', 'url': 'https://ourworldindata.org/grapher/grocery-bag-environmental-impact', 'similarity_score': 0.824555516242981, 'content': 'Environmental impacts of different types of grocery bags', 'reranking_score': 2.8800952350138687e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Environmental impacts of different types of grocery bags'),\n", - " Document(metadata={'category': 'Environmental Impacts of Food Production', 'doc_id': 'owid_1175', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Emissions are measured in tonnes of carbon dioxide-equivalents.', 'url': 'https://ourworldindata.org/grapher/emissions-from-food', 'similarity_score': 0.8313338756561279, 'content': 'Greenhouse gas emissions from food systems', 'reranking_score': 1.8187101886724122e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Greenhouse gas emissions from food systems'),\n", - " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_483', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Food system emissions include agriculture, land-use change, and supply chain emissions (transport, packaging, food processing, retail, cooking, and waste). Emissions are quantified based on food production, not consumption. This means they do not account for international trade.', 'url': 'https://ourworldindata.org/grapher/share-global-food-emissions', 'similarity_score': 0.8323527574539185, 'content': 'Share of global greenhouse gas emissions from food', 'reranking_score': 1.6353857063222677e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Share of global greenhouse gas emissions from food'),\n", - " Document(metadata={'category': 'Meat & Dairy Production', 'doc_id': 'owid_1673', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The percentage of global habitable land area needed for agriculture if the total world population was to adopt the average diet of any given country versus annual per capita beef consumption. Globally we use approximately 50% of habitable land for agriculture, as shown by the grey horizontal line.', 'url': 'https://ourworldindata.org/grapher/dietary-land-use-vs-beef-consumption', 'similarity_score': 0.8455410003662109, 'content': 'Dietary land use vs. beef consumption', 'reranking_score': 1.4984153494879138e-05, 'query_used_for_retrieval': 'What are the environmental impacts of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Dietary land use vs. beef consumption'),\n", - " Document(metadata={'category': 'Animal Welfare', 'doc_id': 'owid_168', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The survey measured attitudes towards animal farming with around 1,500 adults in the United States, census-balanced to be representative of age, gender, region, ethnicity, and income.', 'url': 'https://ourworldindata.org/grapher/survey-dietary-choices-sentience', 'similarity_score': 0.8580029010772705, 'content': 'Public attitudes to dietary choices and meat-eating in the United States', 'reranking_score': 1.3065436178294476e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Public attitudes to dietary choices and meat-eating in the United States'),\n", - " Document(metadata={'category': 'Diet Compositions', 'doc_id': 'owid_849', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Recommended intakes of animal products in the EAT-Lancet diet are shown relative to average daily per capita supply by country. The EAT-Lancet diet is a diet recommended to balance the goals of healthy nutrition and environmental sustainability for a global population.', 'url': 'https://ourworldindata.org/grapher/eat-lancet-diet-animal-products', 'similarity_score': 0.8636244535446167, 'content': 'Consumption of animal products in the EAT-Lancet diet', 'reranking_score': 1.1884163541253656e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Consumption of animal products in the EAT-Lancet diet'),\n", - " Document(metadata={'category': 'Food Supply', 'doc_id': 'owid_1310', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Daily meat consumption is shown relative to the expected EU average of 165g per person in 2030. This projection comes from the livestock antibiotic scenarios from Van Boeckel et al. (2017).', 'url': 'https://ourworldindata.org/grapher/daily-meat-consumption-per-person', 'similarity_score': 0.876916766166687, 'content': 'Daily meat consumption per person', 'reranking_score': 1.1853918294946197e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Daily meat consumption per person'),\n", - " Document(metadata={'category': 'Food Supply', 'doc_id': 'owid_1316', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Daily per capita protein supply is measured in grams per person per day. Protein of animal origin includes protein from all meat commodities, eggs and dairy products, and fish & seafood.', 'url': 'https://ourworldindata.org/grapher/daily-protein-supply-from-animal-and-plant-based-foods', 'similarity_score': 0.9169386029243469, 'content': 'Daily protein supply from animal and plant-based foods', 'reranking_score': 1.122933372244006e-05, 'query_used_for_retrieval': 'What are the health benefits of being a vegetarian?', 'sources_used': ['IEA', 'OWID']}, page_content='Daily protein supply from animal and plant-based foods')]}" + " 'answer': 'Climate change has profound and multifaceted impacts on both human systems and the natural environment, with significant implications for health, biodiversity, agriculture, and infrastructure. Here are the key impacts:\\n\\n### 1. **Human Health**\\n- **Physical and Mental Health**: Climate change adversely affects physical health globally, leading to increased mortality and morbidity due to extreme heat events. It also exacerbates mental health issues, particularly in vulnerable populations [Doc 1, Doc 11].\\n- **Disease Dynamics**: There is a notable increase in climate-related diseases, including vector-borne diseases (e.g., malaria, dengue) due to the expansion of disease vectors. Additionally, the incidence of water- and food-borne diseases has risen, influenced by higher temperatures and increased rainfall, which can lead to outbreaks of diseases like cholera [Doc 1, Doc 13].\\n- **Food Security and Nutrition**: Climate change impacts food production through altered agricultural yields, which can lead to malnutrition and food insecurity, particularly in regions already facing challenges [Doc 2, Doc 6].\\n\\n### 2. **Biodiversity and Ecosystems**\\n- **Species and Habitat Changes**: Climate change drives shifts in species ranges, habitat locations, and seasonal timing, which can lead to biodiversity loss. Many species are unable to adapt or migrate quickly enough to cope with the rapid changes [Doc 4, Doc 9].\\n- **Ecosystem Functionality**: Changes in climate affect critical ecosystem functions such as water regulation, food production, and carbon sequestration. This can lead to decreased resilience of ecosystems and increased vulnerability to other stressors like pollution and habitat degradation [Doc 5, Doc 9].\\n\\n### 3. **Agriculture and Food Production**\\n- **Agricultural Yields**: Climate change directly affects agricultural productivity through changes in temperature, precipitation patterns, and CO2 concentrations. These changes can lead to reduced crop yields and increased pest populations, further threatening food security [Doc 6, Doc 10].\\n- **Land Degradation**: The interaction of climate change with other drivers of land degradation is expected to exacerbate the extent and severity of land degradation, complicating restoration efforts and necessitating new adaptive strategies [Doc 6].\\n\\n### 4. **Infrastructure and Urban Areas**\\n- **Impact on Cities**: Urban areas are particularly vulnerable to climate change, experiencing intensified heatwaves, flooding, and other extreme weather events. These impacts can compromise infrastructure, disrupt services, and lead to significant economic losses, disproportionately affecting marginalized communities [Doc 11, Doc 10].\\n- **Economic Implications**: The economic sectors are also at risk, with climate change causing damage to cities and infrastructure, which can hinder development and adaptation efforts [Doc 2, Doc 10].\\n\\n### 5. **Interconnectedness of Impacts**\\n- The effects of climate change are compounded by interactions with other environmental, socio-cultural, political, and economic drivers, making the challenges more complex and requiring integrated approaches for mitigation and adaptation [Doc 12, Doc 10].\\n\\nIn summary, climate change poses significant risks across various domains, necessitating urgent action to mitigate its impacts and adapt to the changing conditions. The interplay between health, biodiversity, agriculture, and infrastructure highlights the need for comprehensive strategies to address these interconnected challenges.',\n", + " 'audience': 'scientifique',\n", + " 'documents': [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': 1223.0, 'num_tokens': 225.0, 'num_tokens_approx': 272.0, 'num_words': 204.0, 'page_number': 11, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': '(b) Observed impacts of climate change on human systems', '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', 'similarity_score': 0.783784747, 'content': 'B.1.4 Climate change has adversely affected physical health of people globally (very high confidence) and mental health of people in the assessed regions (very high confidence). Climate change impacts on health are mediated through natural and human systems, including economic and social conditions and disruptions (high confidence). In all regions extreme heat events have resulted in human mortality and morbidity (very high confidence). The occurrence of climate-related food-borne and water-borne diseases has increased (very high confidence). The incidence of vector-borne diseases has increased from range expansion and/or increased reproduction of disease vectors (high confidence). Animal and human diseases, including zoonoses, are emerging in new areas (high confidence). Water and food-borne disease risks have increased regionally from climate-sensitive aquatic pathogens, including Vibrio spp. (high confidence), and from toxic substances from harmful freshwater cyanobacteria (medium confidence). Although diarrheal diseases have decreased globally, higher temperatures, increased rain and flooding have increased the occurrence of diarrheal diseases, including cholera (very high confidence)', 'reranking_score': 0.9999046325683594, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='B.1.4 Climate change has adversely affected physical health of people globally (very high confidence) and mental health of people in the assessed regions (very high confidence). Climate change impacts on health are mediated through natural and human systems, including economic and social conditions and disruptions (high confidence). In all regions extreme heat events have resulted in human mortality and morbidity (very high confidence). The occurrence of climate-related food-borne and water-borne diseases has increased (very high confidence). The incidence of vector-borne diseases has increased from range expansion and/or increased reproduction of disease vectors (high confidence). Animal and human diseases, including zoonoses, are emerging in new areas (high confidence). Water and food-borne disease risks have increased regionally from climate-sensitive aquatic pathogens, including Vibrio spp. (high confidence), and from toxic substances from harmful freshwater cyanobacteria (medium confidence). Although diarrheal diseases have decreased globally, higher temperatures, increased rain and flooding have increased the occurrence of diarrheal diseases, including cholera (very high confidence)'),\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': 10, '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', 'similarity_score': 0.753355443, '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.\", 'reranking_score': 0.9998388290405273, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, 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", + " 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': 416.0, 'num_tokens': 74.0, 'num_tokens_approx': 84.0, 'num_words': 63.0, 'page_number': 13, '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.739644825, 'content': 'Adverse impacts from human-caused climate change will continue to intensify\\na) Observed widespread and substantial impacts and related losses and damages attributed to climate change\\nHealth and well-being\\nWater availability and food production \\nCities, settlements and infrastructure\\nb) Impacts are driven by changes in multiple physical climate conditions, which are increasingly attributed to human influence', 'reranking_score': 0.9997883439064026, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='Adverse impacts from human-caused climate change will continue to intensify\\na) Observed widespread and substantial impacts and related losses and damages attributed to climate change\\nHealth and well-being\\nWater availability and food production \\nCities, settlements and infrastructure\\nb) Impacts are driven by changes in multiple physical climate conditions, which are increasingly attributed to human influence'),\n", + " Document(metadata={'chunk_type': 'text', 'document_id': 'document34', 'document_number': 34.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 52.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for Europe and Central Asia', 'num_characters': 827.0, 'num_tokens': 206.0, 'num_tokens_approx': 226.0, 'num_words': 170.0, 'page_number': 30, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': \"Figure SPM 8 Trends in direct drivers of biodiversity and nature's contributions to people in the \\r\\nlast 20 years.\", 'short_name': 'IPBES RAR ECA SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3237468/files/ipbes_assessment_spm_eca_EN.pdf', 'similarity_score': 0.742851615, 'content': 'Climate change shifts seasonal timing, growth and productivity, species ranges and habitat location, which affects biodiversity, agriculture, forestry, and fisheries (well \\nestablished) {4.7.1.1, 4.7.1.3}. Many species will not migrate or adapt fast enough to keep pace with projected rates of climate change (established but incomplete) {4.7.1}. Droughts decrease biomass productivity, increase biodiversity loss and net carbon flux to the atmosphere, and decrease water quality in aquatic systems (established but incomplete) {4.7.1.2, 5.2}. Climate change causes ocean acidification, rising sea levels and changes ocean stratification, reducing biodiversity, growth and productivity, impairing fisheries and increasing CO2 release into the atmosphere (established but incomplete) {4.7.1.1, 4.7.1.3}.', 'reranking_score': 0.9997496008872986, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content='Climate change shifts seasonal timing, growth and productivity, species ranges and habitat location, which affects biodiversity, agriculture, forestry, and fisheries (well \\nestablished) {4.7.1.1, 4.7.1.3}. Many species will not migrate or adapt fast enough to keep pace with projected rates of climate change (established but incomplete) {4.7.1}. Droughts decrease biomass productivity, increase biodiversity loss and net carbon flux to the atmosphere, and decrease water quality in aquatic systems (established but incomplete) {4.7.1.2, 5.2}. Climate change causes ocean acidification, rising sea levels and changes ocean stratification, reducing biodiversity, growth and productivity, impairing fisheries and increasing CO2 release into the atmosphere (established but incomplete) {4.7.1.1, 4.7.1.3}.'),\n", + " Document(metadata={'chunk_type': 'text', 'document_id': 'document30', 'document_number': 30.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for the Americas', 'num_characters': 886.0, 'num_tokens': 173.0, 'num_tokens_approx': 194.0, 'num_words': 146.0, 'page_number': 15, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': \"C. DRIVERS OF TRENDS IN \\r\\nBIODIVERSITY AND NATURE'S \\r\\nCONTRIBUTIONS TO PEOPLE\", 'short_name': 'IPBES RAR AM SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3236292/files/ipbes_assessment_spm_americas_EN.pdf', 'similarity_score': 0.734894216, 'content': \"C4 Human-induced climate change is becoming an increasingly important direct driver, amplifying the impacts of other drivers (i.e., habitat degradation, pollution, invasive species and overexploitation) through changes in temperature, precipitation and the nature of some extreme events. Regional changes in temperature of the atmosphere and the ocean will be accompanied by changes in glacial extent, rainfall, river discharge, wind and ocean currents and sea level, among many other environmental features, which, on balance, have had adverse impacts on biodiversity and nature's contributions to people. The majority of ecosystems in the Americas have already experienced increased mean and extreme temperatures and/or, in some places, mean and \\nextreme precipitation, causing changes in species distributions and interactions and in ecosystem boundaries.\", 'reranking_score': 0.9997311234474182, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content=\"C4 Human-induced climate change is becoming an increasingly important direct driver, amplifying the impacts of other drivers (i.e., habitat degradation, pollution, invasive species and overexploitation) through changes in temperature, precipitation and the nature of some extreme events. Regional changes in temperature of the atmosphere and the ocean will be accompanied by changes in glacial extent, rainfall, river discharge, wind and ocean currents and sea level, among many other environmental features, which, on balance, have had adverse impacts on biodiversity and nature's contributions to people. The majority of ecosystems in the Americas have already experienced increased mean and extreme temperatures and/or, in some places, mean and \\nextreme precipitation, causing changes in species distributions and interactions and in ecosystem boundaries.\"),\n", + " Document(metadata={'chunk_type': 'text', 'document_id': 'document36', 'document_number': 36.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 48.0, 'name': 'Summary for Policymakers. Assessment Report on Land Degradation and Restoration', 'num_characters': 978.0, 'num_tokens': 211.0, 'num_tokens_approx': 248.0, 'num_words': 186.0, 'page_number': 34, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': 'Figure SPM 11 Illustration of the biodiversity impacts of international trade in 2000. ', 'short_name': 'IPBES AR LDR SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/records/3237411/files/ipbes_assessment_spm_ldra_EN.pdf?download=1', 'similarity_score': 0.727124453, 'content': '25 Climate change threatens to become an increasingly important driver of land degradation throughout the twenty-first century, exacerbating both the extent and severity of land degradation as well as reducing the effectiveness and sustainability of restoration options {3.4}. Climate change can have a direct effect on agricultural yields, through changes in the means and extremes of temperature, precipitation and CO2 concentrations, as well as on species distributions and population dynamics, for instance, pest species {3.4.1, 3.4.2, 3.4.4, 4.2.8, 7.2.6}. However, the greatest effects of climate change on land is likely to come from interactions with other degradation drivers {3.4.5}. Long-established sustainable land management and restoration practices may no longer be viable under future climatic regimes in the places where they were developed, requiring rapid adaptation and innovation, but also opening new opportunities {3.5}.', 'reranking_score': 0.9997143149375916, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content='25 Climate change threatens to become an increasingly important driver of land degradation throughout the twenty-first century, exacerbating both the extent and severity of land degradation as well as reducing the effectiveness and sustainability of restoration options {3.4}. Climate change can have a direct effect on agricultural yields, through changes in the means and extremes of temperature, precipitation and CO2 concentrations, as well as on species distributions and population dynamics, for instance, pest species {3.4.1, 3.4.2, 3.4.4, 4.2.8, 7.2.6}. However, the greatest effects of climate change on land is likely to come from interactions with other degradation drivers {3.4.5}. Long-established sustainable land management and restoration practices may no longer be viable under future climatic regimes in the places where they were developed, requiring rapid adaptation and innovation, but also opening new opportunities {3.5}.'),\n", + " Document(metadata={'chunk_type': 'text', 'document_id': 'document30', 'document_number': 30.0, 'element_id': 'N/A', 'figure_code': 'N/A', 'file_size': 'N/A', 'image_path': 'N/A', 'n_pages': 44.0, 'name': 'Summary for Policymakers. Regional Assessment Report on Biodiversity and Ecosystem Services for the Americas', 'num_characters': 290.0, 'num_tokens': 65.0, 'num_tokens_approx': 77.0, 'num_words': 58.0, 'page_number': 29, 'release_date': 2018.0, 'report_type': 'SPM', 'section_header': \"C. Drivers of trends in biodiversity \\r\\nand nature's contributions to people \", 'short_name': 'IPBES RAR AM SPM', 'source': 'IPBES', 'toc_level0': 'N/A', 'toc_level1': 'N/A', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://zenodo.org/record/3236292/files/ipbes_assessment_spm_americas_EN.pdf', 'similarity_score': 0.725049078, 'content': 'is also associated with trends of accelerated tree mortality in tropical forests {4.4.3}. Climate change is likely to have a substantial impact on mangrove ecosystems through factors including sea level rise, changing ocean currents increased temperature and others {4.4.3, 5.4.11}.', 'reranking_score': 0.9997047781944275, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content='is also associated with trends of accelerated tree mortality in tropical forests {4.4.3}. Climate change is likely to have a substantial impact on mangrove ecosystems through factors including sea level rise, changing ocean currents increased temperature and others {4.4.3, 5.4.11}.'),\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.721349299, '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.9997047781944275, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', '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': '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': 530, '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', 'similarity_score': 0.767219245, 'content': \"4.7 DRIVERS AND EFFECTS OF CLIMATE CHANGE \\n4.7.1 Effects of climate change on biodiversity\\n4.7.1 Effects of climate change on biodiversity\\n 4.7.1 Effects of climate change on biodiversity \\n\\nand modulate important ecosystem functions and processes that underpin human livelihoods and nature's contributions to people, such as water regulation, food production, and carbon sequestration (CBD, 2016; Gallardo et al., 2015; IPBES, 2016a; IPCC, 2014a; MEA, 2005a).\\nClimate change is a complex driver of ecosystem change, consisting of changes in precipitation and temperature patterns which lead to changes in drought, flood, and fire risk, ocean-atmosphere interchange, marine circulation and stratification, and the concentrations and distribution of O2 and CO2 in the atmosphere and in the ocean (IPCC, 2014a). These impacts affect species and influence\", 'reranking_score': 0.9996898174285889, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content=\"4.7 DRIVERS AND EFFECTS OF CLIMATE CHANGE \\n4.7.1 Effects of climate change on biodiversity\\n4.7.1 Effects of climate change on biodiversity\\n 4.7.1 Effects of climate change on biodiversity \\n\\nand modulate important ecosystem functions and processes that underpin human livelihoods and nature's contributions to people, such as water regulation, food production, and carbon sequestration (CBD, 2016; Gallardo et al., 2015; IPBES, 2016a; IPCC, 2014a; MEA, 2005a).\\nClimate change is a complex driver of ecosystem change, consisting of changes in precipitation and temperature patterns which lead to changes in drought, flood, and fire risk, ocean-atmosphere interchange, marine circulation and stratification, and the concentrations and distribution of O2 and CO2 in the atmosphere and in the ocean (IPCC, 2014a). These impacts affect species and influence\"),\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': 743.0, 'num_tokens': 243.0, 'num_tokens_approx': 282.0, 'num_words': 212.0, 'page_number': 9, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': 'Observed Impacts from Climate Change', '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', 'similarity_score': 0.737967908, 'content': 'B.1 Human-induced climate change, including more frequent and intense extreme events, has caused widespread adverse impacts and related losses and damages to nature and people, beyond natural climate variability. Some development and adaptation efforts have reduced vulnerability. Across sectors and regions the most vulnerable people and systems are ob\\x02served to be disproportionately affected. The rise in weather and climate extremes has led to some irreversible impacts as natural and human systems are pushed beyond their ability to adapt. (high confidence) (Figure SPM.2) {TS B.1, Figure TS.5, 1.3, 2.3, 2.4, 2.6, 3.3, 3.4, 3.5, 4.2, 4.3, 5.2, 5.12, 6.2, 7.2, 8.2, 9.6, 9.8, 9.10, 9.11, 10.4, 11.3, 12.3, 12.4, 13.10, 14.4, 14.5,', 'reranking_score': 0.9996700286865234, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='B.1 Human-induced climate change, including more frequent and intense extreme events, has caused widespread adverse impacts and related losses and damages to nature and people, beyond natural climate variability. Some development and adaptation efforts have reduced vulnerability. Across sectors and regions the most vulnerable people and systems are ob\\x02served to be disproportionately affected. The rise in weather and climate extremes has led to some irreversible impacts as natural and human systems are pushed beyond their ability to adapt. (high confidence) (Figure SPM.2) {TS B.1, Figure TS.5, 1.3, 2.3, 2.4, 2.6, 3.3, 3.4, 3.5, 4.2, 4.3, 5.2, 5.12, 6.2, 7.2, 8.2, 9.6, 9.8, 9.10, 9.11, 10.4, 11.3, 12.3, 12.4, 13.10, 14.4, 14.5,'),\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': 989.0, 'num_tokens': 226.0, 'num_tokens_approx': 273.0, 'num_words': 205.0, 'page_number': 11, 'release_date': 2022.0, 'report_type': 'SPM', 'section_header': '(b) Observed impacts of climate change on human systems', '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', 'similarity_score': 0.725235641, 'content': 'B.1.5 In urban settings, observed climate change has caused impacts on human health, livelihoods and key infrastructure (high confidence). Multiple climate and non-climate hazards impact cities, settlements and infrastructure and sometimes coincide, magnifying damage (high confidence). Hot extremes including heatwaves have intensified in cities (high confidence), where they have also aggravated air pollution events (medium confidence) and limited functioning of key infrastructure (high confidence). Observed impacts are concentrated amongst the economically and socially marginalized urban residents, e.g., in informal settlements (high confidence). Infrastructure, including transportation, water, sanitation and energy systems have been compromised by extreme and slow-onset events, with resulting economic losses, disruptions of services and impacts to well-being (high confidence). {4.3, 6.2, 7.1, 7.2, 9.9, 10.4, 11.3, 12.3, 13.6, 14.5, 15.3, CCP2.2, CCP4.2, CCP5.2}', 'reranking_score': 0.9996700286865234, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='B.1.5 In urban settings, observed climate change has caused impacts on human health, livelihoods and key infrastructure (high confidence). Multiple climate and non-climate hazards impact cities, settlements and infrastructure and sometimes coincide, magnifying damage (high confidence). Hot extremes including heatwaves have intensified in cities (high confidence), where they have also aggravated air pollution events (medium confidence) and limited functioning of key infrastructure (high confidence). Observed impacts are concentrated amongst the economically and socially marginalized urban residents, e.g., in informal settlements (high confidence). Infrastructure, including transportation, water, sanitation and energy systems have been compromised by extreme and slow-onset events, with resulting economic losses, disruptions of services and impacts to well-being (high confidence). {4.3, 6.2, 7.1, 7.2, 9.9, 10.4, 11.3, 12.3, 13.6, 14.5, 15.3, CCP2.2, CCP4.2, CCP5.2}'),\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': 307.0, 'num_tokens': 66.0, 'num_tokens_approx': 76.0, 'num_words': 57.0, 'page_number': 516, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'Environmental drivers', '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', 'similarity_score': 0.748966157, 'content': '- The effects of climate change are compounded and complicated by interactions with other environmental, socio-cultural, political, and economic drivers (established but incomplete) {4.2.1.2}.\\nBiological hazards: Zoonotic disease and the use of wild species are interconnected. Species for wild meat', 'reranking_score': 0.9996500015258789, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'What are the effects of climate change on the environment?', 'index_used': 'Vector'}, page_content='- The effects of climate change are compounded and complicated by interactions with other environmental, socio-cultural, political, and economic drivers (established but incomplete) {4.2.1.2}.\\nBiological hazards: Zoonotic disease and the use of wild species are interconnected. Species for wild meat'),\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': 1158.0, 'num_tokens': 221.0, 'num_tokens_approx': 274.0, 'num_words': 206.0, 'page_number': 1138, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': 'FAQ 7.1 | How will climate change affect physical and mental health and well-being?', 'short_name': 'IPCC AR6 WGII FR', 'source': 'IPCC', 'toc_level0': 'Chapters and Cross-Chapter Papers ', 'toc_level1': 'Chapter 7 Health, Wellbeing and the Changing Structure of Communities', 'toc_level2': 'N/A', 'toc_level3': 'N/A', 'url': 'https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf', 'similarity_score': 0.825700223, 'content': 'Climate change will affect human health and well-being in a variety of direct and indirect ways that depend on exposure to hazards and vulnerabilities that are heterogeneous and vary within societies, and that are influenced by social, economic and geographical factors and individual differences (see Figure FAQ7.1.1). Changes in the magnitude, frequency and intensity of extreme climate events (e.g., storms, floods, wildfires, heatwaves and dust storms) will expose people to increased risks of climate-sensitive illnesses and injuries and, in the worst cases, higher mortality rates. Increased risks for mental health and well-being are associated with changes caused by the impacts of climate change on climate-sensitive health outcomes and systems (see Figure FAQ7.1.2). Higher temperatures and changing geographical and seasonal precipitation patterns will facilitate the spread of mosquito- and tick-borne diseases, such as Lyme disease and dengue fever, and water- and food-borne diseases. An increase in the frequency of extreme heat events will exacerbate health risks associated with cardiovascular disease and affect access to', 'reranking_score': 0.9996476173400879, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='Climate change will affect human health and well-being in a variety of direct and indirect ways that depend on exposure to hazards and vulnerabilities that are heterogeneous and vary within societies, and that are influenced by social, economic and geographical factors and individual differences (see Figure FAQ7.1.1). Changes in the magnitude, frequency and intensity of extreme climate events (e.g., storms, floods, wildfires, heatwaves and dust storms) will expose people to increased risks of climate-sensitive illnesses and injuries and, in the worst cases, higher mortality rates. Increased risks for mental health and well-being are associated with changes caused by the impacts of climate change on climate-sensitive health outcomes and systems (see Figure FAQ7.1.2). Higher temperatures and changing geographical and seasonal precipitation patterns will facilitate the spread of mosquito- and tick-borne diseases, such as Lyme disease and dengue fever, and water- and food-borne diseases. An increase in the frequency of extreme heat events will exacerbate health risks associated with cardiovascular disease and affect access to'),\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': 493.0, 'num_tokens': 96.0, 'num_tokens_approx': 114.0, 'num_words': 86.0, 'page_number': 2483, 'release_date': 2022.0, 'report_type': 'Full Report', 'section_header': '16.5.4 RKR Interactions', '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.791373491, 'content': 'and international trade. Such disturbances to socioecological systems and economies pose climate-related risks to human health (RKR-E) as well as to peace and human mobility (RKR-H). Indeed, while health is concerned with direct influence of climate change, for example through hotter air temperatures impacting morbidity and mortality or the spatial distribution of disease vectors such as mosquitos, it is also at risk of being stressed by direct and secondary climate impacts on', 'reranking_score': 0.9995015859603882, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IPOS', 'IPCC', 'IPBES'], 'question_used': 'How does climate change affect human health and society?', 'index_used': 'Vector'}, page_content='and international trade. Such disturbances to socioecological systems and economies pose climate-related risks to human health (RKR-E) as well as to peace and human mobility (RKR-H). Indeed, while health is concerned with direct influence of climate change, for example through hotter air temperatures impacting morbidity and mortality or the spatial distribution of disease vectors such as mosquitos, it is also at risk of being stressed by direct and secondary climate impacts on')],\n", + " 'recommended_content': [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.7941333055496216, 'content': 'Change in CO2 emissions and GDP', 'reranking_score': 0.279598593711853, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Change in CO2 emissions and GDP'),\n", + " Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_780', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Nationally determined contributions (NDCs) embody efforts by each country to reduce national emissions and adapt to the impacts of climate change. The Paris Agreement requires each of the 193 Parties to prepare, communicate and maintain NDCs outlining what they intend to achieve. NDCs must be updated every five years.', 'url': 'https://ourworldindata.org/grapher/nationally-determined-contributions', 'similarity_score': 0.7979490756988525, 'content': 'Nationally determined contributions to climate change', 'reranking_score': 0.012760520912706852, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Nationally determined contributions to climate change'),\n", + " Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_789', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Participants were asked to score beliefs on a scale from 0 to 100 on four questions: whether action was necessary to avoid a global catastrophe; humans were causing climate change; it was a serious threat to humanity; and was a global emergency.', 'url': 'https://ourworldindata.org/grapher/share-believe-climate', 'similarity_score': 0.7580230236053467, 'content': \"Share of people who believe in climate change and think it's a serious threat to humanity\", 'reranking_score': 0.005214352160692215, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content=\"Share of people who believe in climate change and think it's a serious threat to humanity\"),\n", + " Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_782', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Share of young people in each surveyed country that responded \"yes\" to each statement about climate change. 1,000 young people, aged 16 to 25 years old, were surveyed in each country.', 'url': 'https://ourworldindata.org/grapher/opinions-young-people-climate', 'similarity_score': 0.8168312311172485, 'content': 'Opinions of young people on the threats of climate change', 'reranking_score': 0.004852706100791693, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Opinions of young people on the threats of climate change'),\n", + " Document(metadata={'category': 'Climate Change', 'doc_id': 'owid_756', 'returned_content': '', 'source': 'OWID', 'subtitle': 'National adaptation plans are a means of identifying medium- and long-term climate change adaptation needs and developing and implementing strategies and programmes to address those needs.', 'url': 'https://ourworldindata.org/grapher/countries-with-national-adaptation-plans-for-climate-change', 'similarity_score': 0.7981775999069214, 'content': 'Countries with national adaptation plans for climate change', 'reranking_score': 0.004124350380152464, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with national adaptation plans for climate change'),\n", + " 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.7989407181739807, 'content': 'Global warming: Contributions to the change in global mean surface temperature', 'reranking_score': 0.0036289971321821213, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', '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_383', 'returned_content': '', 'source': 'OWID', 'subtitle': 'The global mean surface temperature change as a result of the cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.', 'url': 'https://ourworldindata.org/grapher/global-warming-by-gas-and-source', 'similarity_score': 0.8071538805961609, 'content': 'Global warming contributions by gas and source', 'reranking_score': 0.0016414257697761059, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Global warming contributions by gas and source'),\n", + " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_357', 'returned_content': '', 'source': 'OWID', 'subtitle': \"The global mean surface temperature change as a result of a country or region's cumulative emissions of three gases – carbon dioxide, methane, and nitrous oxide.\", 'url': 'https://ourworldindata.org/grapher/contribution-temp-rise-degrees', 'similarity_score': 0.8584674596786499, 'content': 'Contribution to global mean surface temperature rise', 'reranking_score': 0.00025533974985592067, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Contribution to global mean surface temperature rise'),\n", + " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_317', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Percentage change in gross domestic product (GDP), population, and carbon dioxide (CO₂) emissions.', 'url': 'https://ourworldindata.org/grapher/co2-gdp-pop-growth', 'similarity_score': 0.8730868697166443, 'content': 'Annual change in GDP, population and CO2 emissions', 'reranking_score': 0.0002404096449026838, 'query_used_for_retrieval': 'How does climate change affect human health and society?', 'sources_used': ['IEA', 'OWID']}, page_content='Annual change in GDP, population and CO2 emissions'),\n", + " Document(metadata={'category': 'CO2 & Greenhouse Gas Emissions', 'doc_id': 'owid_350', 'returned_content': '', 'source': 'OWID', 'subtitle': 'Consumption-based emissions include those from fossil fuels and industry. Land-use change emissions are not included.', 'url': 'https://ourworldindata.org/grapher/co2-emissions-and-gdp-per-capita', 'similarity_score': 0.8269157409667969, 'content': 'Change in per capita CO2 emissions and GDP', 'reranking_score': 0.00023705528292339295, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', '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.8301026225090027, 'content': 'Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050', 'reranking_score': 7.497359911212698e-05, 'query_used_for_retrieval': 'What are the effects of climate change on the environment?', 'sources_used': ['IEA', 'OWID']}, page_content='Countries with more than 25 species at risk of losing more than 25% of their habitat by 2050')]}" ] }, - "execution_count": 35, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "output = await app.ainvoke({\"user_input\": \"should I be a vegetarian ?\"})\n", + "# output = await app.ainvoke({\"user_input\": \"should I be a vegetarian ?\"})\n", + "output = await app.ainvoke({\"user_input\": \"what is the impact of climate change ?\", \"audience\": \"scientifique\", \"sources\": [\"IPCC\", \"IPBES\", \"IPOS\"]})\n", "output" ] }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['user_input', 'language', 'intent', 'query', 'remaining_questions', 'n_questions', 'answer', 'audience', 'documents', 'recommended_content'])" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "output.keys()" + ] + }, { "cell_type": "code", "execution_count": 36,