エージェント周りもどんどん整備が進んでいるような。アーキテクチャもどんどん出てきています。
今回はこちらのサンプルで説明されているマルチエージェントネットワーク。
ネットワークの説明はこちら。後で他のアーキテクチャも勉強しよう。
ネットワーク
このアーキテクチャでは、エージェントはグラフのノードとして定義されます。それぞれのエージェントは他のすべてのエージェントとコミュニケーションを行い、どのエージェントを次に呼び出すのかを決定することができます。このアーキテクチャは、明確なエージェントの階層構造を持たない問題や、エージェントの呼び出しに特定の順序がない問題に適しています。
以下でノートブックを実行していきますが、LMやMLflow連携などで手を入れています。
マルチエージェントネットワーク
単一のエージェントは、通常、単一のドメイン内でいくつかのツールを使用して効果的に動作できますが、gpt-4
のような強力なモデルを使用しても、多くのツールを使用するのは効果的ではない場合があります。
複雑なタスクに取り組む一つの方法は、「分割統治」アプローチです。各タスクやドメインに特化したエージェントを作成し、タスクを適切な「専門家」にルーティングします。これはマルチエージェントネットワークアーキテクチャの一例です。
このノートブックは、Wuらによる論文AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationに触発され、LangGraphを使用してこれを行う方法の一例を示しています。
結果として得られるグラフは、次の図のようになります:
始める前に一言:この他のマルチエージェントノートブックは、LangGraphで特定のデザインパターンを実装する方法を示すために設計されています。このパターンがニーズに合う場合は、最高のパフォーマンスを得るために、ドキュメントの他の基本的なパターンと組み合わせることをお勧めします。
セットアップ
まず、必要なパッケージをインストールし、APIキーを設定しましょう:
%%capture --no-stderr
%pip install -U langchain_community langchain_openai langchain_experimental matplotlib langgraph mlflow
%restart_python
import os
os.environ['OPENAI_API_KEY'] = dbutils.secrets.get("demo-token-takaaki.yayoi", "openai_api_key")
os.environ['TAVILY_API_KEY'] = "TAVILYのAPIキー"
import getpass
import os
def _set_if_undefined(var: str):
if not os.environ.get(var):
os.environ[var] = getpass.getpass(f"Please provide your {var}")
_set_if_undefined("OPENAI_API_KEY")
_set_if_undefined("TAVILY_API_KEY")
元々はLangSmithの設定が説明されていますが、DatabricksなのでMLflow Tracing使います。
import mlflow
mlflow.langchain.autolog()
ツールの定義
将来的にエージェントが使用するいくつかのツールも定義します。
from typing import Annotated
from langchain_community.tools.tavily_search import TavilySearchResults
from langchain_core.tools import tool
from langchain_experimental.utilities import PythonREPL
tavily_tool = TavilySearchResults(max_results=5)
# 警告: これはローカルでコードを実行します。サンドボックス化されていない場合は安全でない可能性があります
repl = PythonREPL()
@tool
def python_repl_tool(
code: Annotated[str, "チャートを生成するために実行するPythonコード。"],
):
"""これを使用してPythonコードを実行します。値の出力を確認したい場合は、
`print(...)`で出力してください。これはユーザーに表示されます。"""
try:
result = repl.run(code)
except BaseException as e:
return f"実行に失敗しました。エラー: {repr(e)}"
result_str = f"正常に実行されました:\n```python\n{code}\n```\n標準出力: {result}"
return (
result_str + "\n\nすべてのタスクが完了した場合は、FINAL ANSWERと応答してください。"
)
グラフの作成
ツールを定義し、いくつかのヘルパー関数を作成したので、以下に個々のエージェントを作成し、LangGraphを使用してそれらがどのように通信するかを指定します。
エージェントノードの定義
次に、ノードを定義する必要があります。
まず、各エージェントのシステムプロンプトを作成するユーティリティを作成します。
def make_system_prompt(suffix: str) -> str:
return (
"あなたは他のアシスタントと協力している有能なAIアシスタントです。"
" 提供されたツールを使用して、質問に答えるために進めてください。"
" 完全に答えられない場合は問題ありません。別のツールを持つ他のアシスタントが"
" あなたが残したところから助けてくれます。進捗を得るために実行できることを実行してください。"
" あなたまたは他のアシスタントが最終的な答えや成果物を持っている場合は、"
" チームが停止することを知るために、応答の先頭にFINAL ANSWERと付けてください。"
f"\n{suffix}"
)
from typing import Literal
from langchain_core.messages import BaseMessage, HumanMessage
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langgraph.graph import MessagesState, END
from langgraph.types import Command
llm = ChatOpenAI(model="gpt-4o-mini")
def get_next_node(last_message: BaseMessage, goto: str):
if "FINAL ANSWER" in last_message.content:
# どのエージェントも作業が完了したと判断した場合
return END
return goto
# リサーチエージェントとノード
research_agent = create_react_agent(
llm,
tools=[tavily_tool],
prompt=make_system_prompt(
"あなたはリサーチのみを行います。チャート生成を行う同僚と協力しています。"
),
)
def research_node(
state: MessagesState,
) -> Command[Literal["chart_generator", END]]:
result = research_agent.invoke(state)
goto = get_next_node(result["messages"][-1], "chart_generator")
# 人間のメッセージでラップします。すべてのプロバイダーが
# 入力メッセージリストの最後にAIメッセージを許可するわけではありません
result["messages"][-1] = HumanMessage(
content=result["messages"][-1].content, name="researcher"
)
return Command(
update={
# リサーチエージェントの内部メッセージ履歴を他のエージェントと共有
"messages": result["messages"],
},
goto=goto,
)
# チャート生成エージェントとノード
# 注意: これは任意のコード実行を行います。サンドボックス化されていない場合は安全でない可能性があります
chart_agent = create_react_agent(
llm,
[python_repl_tool],
prompt=make_system_prompt(
"あなたはチャートのみを生成できます。リサーチを行う同僚と協力しています。"
),
)
def chart_node(state: MessagesState) -> Command[Literal["researcher", END]]:
result = chart_agent.invoke(state)
goto = get_next_node(result["messages"][-1], "researcher")
# 人間のメッセージでラップします。すべてのプロバイダーが
# 入力メッセージリストの最後にAIメッセージを許可するわけではありません
result["messages"][-1] = HumanMessage(
content=result["messages"][-1].content, name="chart_generator"
)
return Command(
update={
# チャートエージェントの内部メッセージ履歴を他のエージェントと共有
"messages": result["messages"],
},
goto=goto,
)
グラフの定義
これで、すべてをまとめてグラフを定義できます!
from langgraph.graph import StateGraph, START
workflow = StateGraph(MessagesState)
workflow.add_node("researcher", research_node)
workflow.add_node("chart_generator", chart_node)
workflow.add_edge(START, "researcher")
graph = workflow.compile()
from IPython.display import Image, display
try:
display(Image(graph.get_graph().draw_mermaid_png()))
except Exception:
# This requires some extra dependencies and is optional
pass
呼び出し
グラフが作成されたので、それを呼び出すことができます!私たちのためにいくつかの統計をチャートにしてみましょう。
events = graph.stream(
{
"messages": [
(
"user",
"過去5年間の英国のGDPを取得し、それをラインチャートにしてください。"
"チャートを作成したら、終了してください。",
)
],
},
# グラフにおける最大ステップ数
{"recursion_limit": 150},
)
for s in events:
print(s)
print("----")
{'researcher': {'messages': [HumanMessage(content='過去5年間の英国のGDPを取得し、それをラインチャートにしてください。チャートを作成したら、終了してください。', additional_kwargs={}, response_metadata={}, id='46ab958f-93b9-4fd8-8e99-1fcf896fcb67'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_xOvO5XwfXasELJYhA9UZxz2o', 'function': {'arguments': '{"query":"UK GDP last 5 years data"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 25, 'prompt_tokens': 289, 'total_tokens': 314, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_b8bc95a0ac', 'id': 'chatcmpl-BEnL5Yw8ZgOgdI79zx5MIzRcqEHhe', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-38bbdfe3-922e-4f08-ba59-b114549af7ab-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP last 5 years data'}, 'id': 'call_xOvO5XwfXasELJYhA9UZxz2o', 'type': 'tool_call'}], usage_metadata={'input_tokens': 289, 'output_tokens': 25, 'total_tokens': 314, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}}), ToolMessage(content='[{"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "GDP of the UK 1948-2023\\nPublished by D. Clark, Jan 6, 2025\\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] Office for National Statistics (UK), Gross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) Statista, https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/ (last visited February 08, 2025)\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) [Graph], Office for National Statistics (UK), December 23, 2024. [Online]. Available: https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "score": 0.8548001}, {"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", "score": 0.8025714}, {"title": "United Kingdom Full Year Gdp Growth - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/full-year-gdp-growth", "content": "Full Year GDP Growth in the United Kingdom averaged 2.45 percent from 1949 until 2023, reaching an all time high of 8.60 percent in 2021 and a record low of -10.30 percent in 2020. This page includes a chart with historical data for the United Kingdom Full Year Gdp Growth. United Kingdom Full Year Gdp Growth - values, historical data and charts - was last updated on February of 2025. [...] | GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP Growth Rate YoY | 0.90 | 0.70 | percent | Sep 2024 |\\n| GDP Constant Prices | 639452.00 | 639269.00 | GBP Million | Sep 2024 |\\n| GDP from Agriculture | 4254.00 | 4215.00 | GBP Million | Sep 2024 |\\n| GDP from Construction | 35420.00 | 35185.00 | GBP Million | Sep 2024 |\\n| GDP from Manufacturing | 51358.00 | 51399.00 | GBP Million | Sep 2024 |\\n| GDP from Mining | 8272.00 | 8300.00 | GBP Million | Sep 2024 | [...] Full Year GDP Growth in the United Kingdom is expected to reach 1.20 percent by the end of 2024, according to Trading Economics global macro models and analysts expectations. In the long-term, the United Kingdom Full Year Gdp Growth is projected to trend around 1.40 percent in 2025 and 1.60 percent in 2026, according to our econometric models.\\n| Related | Last | Previous | Unit | Reference |\\n| --- | --- | --- | --- | --- |\\n| Full Year GDP Growth | 0.30 | 4.80 | percent | Dec 2023 |", "score": 0.7999589}, {"title": "U.K. GDP Growth Rate 1961-2025 | MacroTrends", "url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-growth-rate", "content": "U.K. gdp growth rate for 2023 was 0.10%, a 4.24% decline from 2022.\\nU.K. gdp growth rate for 2022 was 4.35%, a 4.33% decline from 2021.\\nU.K. gdp growth rate for 2021 was 8.67%, a 19.03% increase from 2020.\\nU.K. gdp growth rate for 2020 was -10.36%, a 12% decline from 2019. [...] | Ireland | -3.20% |\\n| U.K. GDP Growth Rate - Historical Data |\\n| --- |\\n| Year | GDP Growth (%) | Annual Change |\\n| --- | --- | --- |\\n| 2023 | 0.10% | -4.24% |\\n| 2022 | 4.35% | -4.33% |\\n| 2021 | 8.67% | 19.03% |\\n| 2020 | -10.36% | -12.00% |\\n| 2019 | 1.64% | 0.24% |\\n| 2018 | 1.40% | -1.25% |\\n| 2017 | 2.66% | 0.73% |\\n| 2016 | 1.92% | -0.30% |\\n| 2015 | 2.22% | -0.98% |\\n| 2014 | 3.20% | 1.40% |\\n| 2013 | 1.79% | 0.28% |\\n| 2012 | 1.51% | 0.37% |\\n| 2011 | 1.15% | -1.09% |\\n| 2010 | 2.24% | 6.85% |", "score": 0.78214747}, {"title": "Gross Domestic Product (GDP) - Office for National Statistics", "url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp", "content": "GDP quarterly national accounts, UK: July to September 2024\\nRevised quarterly estimate of gross domestic product (GDP) for the UK. Uses additional data to provide a more precise indication of economic growth than the first estimate.\\n\\n\\nGDP first quarterly estimate, UK: July to September 2024\\nFirst quarterly estimate of gross domestic product (GDP). Contains current and constant price data on the value of goods and services to indicate the economic performance of the UK. [...] UK real gross domestic product (GDP) is estimated to have shown no growth in Quarter 3 (July to Sept) 2024, revised down from the first estimate increase of 0.1%.\\nThe quarterly path of real GDP at an aggregate level is unchanged from Quarter 1 (Jan to Mar) 2023 to Quarter 1 2024, however, there have been downward revisions of 0.1 percentage points in Quarter 2 (Apr to June) and Quarter 3 2024. [...] Read this statistical bulletin\\nMore publications\\nBack to top\\nTime series related to Gross Domestic Product (GDP)\\n\\n\\nGross Domestic Product: chained volume measures: Seasonally adjusted £m\\nChained Volume Measures (CVM)\\n£ 639,452 m 2024 Q3\\nRelease date:\\n23 December 2024\\nNext release:\\n28 March 2025\\n\\n\\nGross Domestic Product: Quarter on Quarter growth: CVM SA %\\nChained Volume Measures (CVM)\\n0 % 2024 Q3\\nRelease date:\\n23 December 2024\\nNext release:\\n13 February 2025", "score": 0.70944256}]', name='tavily_search_results_json', id='4c05d35f-668c-48ce-8daa-073c05636abf', tool_call_id='call_xOvO5XwfXasELJYhA9UZxz2o', artifact={'query': 'UK GDP last 5 years data', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'GDP of the UK 1948-2023\nPublished by D. Clark, Jan 6, 2025\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] Office for National Statistics (UK), Gross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) Statista, https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/ (last visited February 08, 2025)\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) [Graph], Office for National Statistics (UK), December 23, 2024. [Online]. Available: https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'score': 0.8548001, 'raw_content': None}, {'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': 'The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |', 'score': 0.8025714, 'raw_content': None}, {'url': 'https://tradingeconomics.com/united-kingdom/full-year-gdp-growth', 'title': 'United Kingdom Full Year Gdp Growth - Trading Economics', 'content': 'Full Year GDP Growth in the United Kingdom averaged 2.45 percent from 1949 until 2023, reaching an all time high of 8.60 percent in 2021 and a record low of -10.30 percent in 2020. This page includes a chart with historical data for the United Kingdom Full Year Gdp Growth. United Kingdom Full Year Gdp Growth - values, historical data and charts - was last updated on February of 2025. [...] | GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP Growth Rate YoY | 0.90 | 0.70 | percent | Sep 2024 |\n| GDP Constant Prices | 639452.00 | 639269.00 | GBP Million | Sep 2024 |\n| GDP from Agriculture | 4254.00 | 4215.00 | GBP Million | Sep 2024 |\n| GDP from Construction | 35420.00 | 35185.00 | GBP Million | Sep 2024 |\n| GDP from Manufacturing | 51358.00 | 51399.00 | GBP Million | Sep 2024 |\n| GDP from Mining | 8272.00 | 8300.00 | GBP Million | Sep 2024 | [...] Full Year GDP Growth in the United Kingdom is expected to reach 1.20 percent by the end of 2024, according to Trading Economics global macro models and analysts expectations. In the long-term, the United Kingdom Full Year Gdp Growth is projected to trend around 1.40 percent in 2025 and 1.60 percent in 2026, according to our econometric models.\n| Related | Last | Previous | Unit | Reference |\n| --- | --- | --- | --- | --- |\n| Full Year GDP Growth | 0.30 | 4.80 | percent | Dec 2023 |', 'score': 0.7999589, 'raw_content': None}, {'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-growth-rate', 'title': 'U.K. GDP Growth Rate 1961-2025 | MacroTrends', 'content': 'U.K. gdp growth rate for 2023 was 0.10%, a 4.24% decline from 2022.\nU.K. gdp growth rate for 2022 was 4.35%, a 4.33% decline from 2021.\nU.K. gdp growth rate for 2021 was 8.67%, a 19.03% increase from 2020.\nU.K. gdp growth rate for 2020 was -10.36%, a 12% decline from 2019. [...] | Ireland | -3.20% |\n| U.K. GDP Growth Rate - Historical Data |\n| --- |\n| Year | GDP Growth (%) | Annual Change |\n| --- | --- | --- |\n| 2023 | 0.10% | -4.24% |\n| 2022 | 4.35% | -4.33% |\n| 2021 | 8.67% | 19.03% |\n| 2020 | -10.36% | -12.00% |\n| 2019 | 1.64% | 0.24% |\n| 2018 | 1.40% | -1.25% |\n| 2017 | 2.66% | 0.73% |\n| 2016 | 1.92% | -0.30% |\n| 2015 | 2.22% | -0.98% |\n| 2014 | 3.20% | 1.40% |\n| 2013 | 1.79% | 0.28% |\n| 2012 | 1.51% | 0.37% |\n| 2011 | 1.15% | -1.09% |\n| 2010 | 2.24% | 6.85% |', 'score': 0.78214747, 'raw_content': None}, {'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp', 'title': 'Gross Domestic Product (GDP) - Office for National Statistics', 'content': 'GDP quarterly national accounts, UK: July to September 2024\nRevised quarterly estimate of gross domestic product (GDP) for the UK. Uses additional data to provide a more precise indication of economic growth than the first estimate.\n\n\nGDP first quarterly estimate, UK: July to September 2024\nFirst quarterly estimate of gross domestic product (GDP). Contains current and constant price data on the value of goods and services to indicate the economic performance of the UK. [...] UK real gross domestic product (GDP) is estimated to have shown no growth in Quarter 3 (July to Sept) 2024, revised down from the first estimate increase of 0.1%.\nThe quarterly path of real GDP at an aggregate level is unchanged from Quarter 1 (Jan to Mar) 2023 to Quarter 1 2024, however, there have been downward revisions of 0.1 percentage points in Quarter 2 (Apr to June) and Quarter 3 2024. [...] Read this statistical bulletin\nMore publications\nBack to top\nTime series related to Gross Domestic Product (GDP)\n\n\nGross Domestic Product: chained volume measures: Seasonally adjusted £m\nChained Volume Measures (CVM)\n£ 639,452 m 2024 Q3\nRelease date:\n23 December 2024\nNext release:\n28 March 2025\n\n\nGross Domestic Product: Quarter on Quarter growth: CVM SA %\nChained Volume Measures (CVM)\n0 % 2024 Q3\nRelease date:\n23 December 2024\nNext release:\n13 February 2025', 'score': 0.70944256, 'raw_content': None}], 'response_time': 1.92}), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_ZiESWZal23RsQPPPCLRj4tSd', 'function': {'arguments': '{"query": "UK GDP data 2019-2023"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}, {'id': 'call_SNiD1PeC7VyOpLcBAkPY1X71', 'function': {'arguments': '{"query": "UK GDP historical data"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 64, 'prompt_tokens': 2496, 'total_tokens': 2560, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 2432}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_b8bc95a0ac', 'id': 'chatcmpl-BEnL9mCmmJDp5G22f5BjFu4z7Hfgo', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-9662d4e6-8837-4c81-91d3-e0910c146cff-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP data 2019-2023'}, 'id': 'call_ZiESWZal23RsQPPPCLRj4tSd', 'type': 'tool_call'}, {'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP historical data'}, 'id': 'call_SNiD1PeC7VyOpLcBAkPY1X71', 'type': 'tool_call'}], usage_metadata={'input_tokens': 2496, 'output_tokens': 64, 'total_tokens': 2560, 'input_token_details': {'audio': 0, 'cache_read': 2432}, 'output_token_details': {'audio': 0, 'reasoning': 0}}), ToolMessage(content='[{"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 | [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025.", "score": 0.9311691}, {"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "GDP of the UK 1948-2023\\nPublished by D. Clark, Jan 6, 2025\\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] Although on an annual basis, the UK economy grew slightly in 2023, the UK entered 2024 in recession following two quarters of\xa0negative economic growth at the end of 2023. After a huge 10.4 percent fall in GDP in 2020, economic growth rates were relatively strong during a period of economic recovery, with GDP growing by 8.7 percent in 2021, and 4.3 percent in 2022. This recovery has clearly stalled somewhat in 2023, however, with monthly growth figures indicating that the UK\xa0economy has been", "score": 0.92260116}, {"title": "UK monthly GDP growth 2025 - Statista", "url": "https://www.statista.com/statistics/941233/monthly-gdp-growth-uk/", "content": "Due to two consecutive quarters of negative economic growth, in late 2023 the UK economy ended the year in recession. After not growing at all in the second quarter of 2023, UK GDP fell by 0.1 percent in the third quarter, and then by 0.3 percent in the last quarter. For the whole of 2023, the economy grew by 0.4 percent compared to 2022, and for 2024 is forecast to have grown by 1.1 percent. During the first two quarters of 2024, UK GDP grew by 0.7 percent, and 0.4 percent, with this [...] Other statistics that may interest you Economy of the UK\\nGross domestic product\\n8\\n\\nBasic Statistic GDP of the UK 1948-2023\\nBasic Statistic Annual GDP growth in the UK 1949-2023\\nPremium Statistic GDP growth forecast for the UK 2000-2029\\nBasic Statistic Quarterly GDP of the UK 2019-2024\\nBasic Statistic Quarterly GDP growth of the UK 2019-2024\\nBasic Statistic Monthly GDP of the UK 2019-2024\\nBasic Statistic Monthly GDP growth of the UK 2022-2024\\nBasic Statistic GDP per capita in the UK 1955-2023 [...] GDP of the UK 1948-2023\\nAnnual GDP growth in the UK 1949-2023\\nGDP growth forecast for the UK 2000-2029\\nQuarterly GDP of the UK 2019-2024\\nQuarterly GDP growth of the UK 2019-2024\\nMonthly GDP of the UK 2019-2024\\nMonthly GDP growth of the UK 2022-2024\\nGDP per capita in the UK 1955-2023\\n\\nThe most important statistics", "score": 0.7272211}, {"title": "United Kingdom - IMF DataMapper", "url": "https://www.imf.org/external/datamapper/profile/GBR", "content": "AI Preparedness Index\\nIndex\\n0.73\\n2023\\nUnited Kingdom\\nDigital Infrastructure\\nIndex\\n0.18\\n2023\\nUnited Kingdom\\nInnovation and Economic Integration\\nIndex\\n0.16\\n2023\\nUnited Kingdom\\nHuman Capital and Labor Market Policies\\nIndex\\n0.17\\n2023\\nUnited Kingdom\\nPublic Finances in Modern History 8 indicators, 1800 - 2023 Show all\\nGovernment revenue, percent of GDP\\n% of GDP\\n38.21\\n2023\\nUnited Kingdom\\nGovernment expenditure, percent of GDP\\n% of GDP\\n44.17\\n2023\\nUnited Kingdom [...] Government primary expenditure, percent of GDP\\n% of GDP\\n41.09\\n2023\\nUnited Kingdom\\nInterest paid on public debt, percent of GDP\\n% of GDP\\n3.08\\n2023\\nUnited Kingdom\\nFiscal Rules and Fiscal Councils 2 indicators, 1985 - 2021\\nFiscal Rule Indicator\\nIndex\\n1\\n2021\\nUnited Kingdom\\nFiscal Council Indicator\\nIndex\\n2010\\n2021\\nUnited Kingdom\\n1. Gender Budgeting and 2. Gender Equality Indices 3 indicators, 1980 - 2015\\nGender Budgeting Indicator\\nIndex\\nno data\\n2025\\nUnited Kingdom", "score": 0.7163977}, {"title": "Gross Domestic Product (GDP) - Office for National Statistics", "url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp", "content": "Summary of changes to data table structure in Blue Book 2023\\nChanges to the structure of tables within Blue Book 2023 to meet accessibility standards.\\n\\n\\nCoronavirus and the impact on output in the UK economy\\nAnalysis of growth for the production, services and construction industries in the UK economy between February 2020 and August 2021, highlighting the impact of the coronavirus (COVID-19) pandemic. [...] GDP, UK regions and countries: July to September 2022\\nQuarterly economic activity within the countries of the UK (England, Wales, Scotland and Northern Ireland) and the nine English regions (North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East and South West).\\n\\n\\nView all related statistical bulletins\\nArticles [...] Health volume adjustments and contribution to GDP growth\\nVolume estimates for the NHS Test and Trace services and vaccine programmes and their impact on real GDP.\\n\\n\\nGDP output approach, Blue Book 2023 indicative data\\nDetailed industry level data. Includes monthly low-level aggregates of output gross value added (GVA) on a chained volume measure. Seasonally adjusted.", "score": 0.657033}]', name='tavily_search_results_json', id='24d43b12-7340-4d01-a70b-4bc205f1596f', tool_call_id='call_ZiESWZal23RsQPPPCLRj4tSd', artifact={'query': 'UK GDP data 2019-2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': 'The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 | [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025.', 'score': 0.9311691, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'GDP of the UK 1948-2023\nPublished by D. Clark, Jan 6, 2025\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] Although on an annual basis, the UK economy grew slightly in 2023, the UK entered 2024 in recession following two quarters of\xa0negative economic growth at the end of 2023. After a huge 10.4 percent fall in GDP in 2020, economic growth rates were relatively strong during a period of economic recovery, with GDP growing by 8.7 percent in 2021, and 4.3 percent in 2022. This recovery has clearly stalled somewhat in 2023, however, with monthly growth figures indicating that the UK\xa0economy has been', 'score': 0.92260116, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/941233/monthly-gdp-growth-uk/', 'title': 'UK monthly GDP growth 2025 - Statista', 'content': 'Due to two consecutive quarters of negative economic growth, in late 2023 the UK economy ended the year in recession. After not growing at all in the second quarter of 2023, UK GDP fell by 0.1 percent in the third quarter, and then by 0.3 percent in the last quarter. For the whole of 2023, the economy grew by 0.4 percent compared to 2022, and for 2024 is forecast to have grown by 1.1 percent. During the first two quarters of 2024, UK GDP grew by 0.7 percent, and 0.4 percent, with this [...] Other statistics that may interest you Economy of the UK\nGross domestic product\n8\n\nBasic Statistic GDP of the UK 1948-2023\nBasic Statistic Annual GDP growth in the UK 1949-2023\nPremium Statistic GDP growth forecast for the UK 2000-2029\nBasic Statistic Quarterly GDP of the UK 2019-2024\nBasic Statistic Quarterly GDP growth of the UK 2019-2024\nBasic Statistic Monthly GDP of the UK 2019-2024\nBasic Statistic Monthly GDP growth of the UK 2022-2024\nBasic Statistic GDP per capita in the UK 1955-2023 [...] GDP of the UK 1948-2023\nAnnual GDP growth in the UK 1949-2023\nGDP growth forecast for the UK 2000-2029\nQuarterly GDP of the UK 2019-2024\nQuarterly GDP growth of the UK 2019-2024\nMonthly GDP of the UK 2019-2024\nMonthly GDP growth of the UK 2022-2024\nGDP per capita in the UK 1955-2023\n\nThe most important statistics', 'score': 0.7272211, 'raw_content': None}, {'url': 'https://www.imf.org/external/datamapper/profile/GBR', 'title': 'United Kingdom - IMF DataMapper', 'content': 'AI Preparedness Index\nIndex\n0.73\n2023\nUnited Kingdom\nDigital Infrastructure\nIndex\n0.18\n2023\nUnited Kingdom\nInnovation and Economic Integration\nIndex\n0.16\n2023\nUnited Kingdom\nHuman Capital and Labor Market Policies\nIndex\n0.17\n2023\nUnited Kingdom\nPublic Finances in Modern History 8 indicators, 1800 - 2023 Show all\nGovernment revenue, percent of GDP\n% of GDP\n38.21\n2023\nUnited Kingdom\nGovernment expenditure, percent of GDP\n% of GDP\n44.17\n2023\nUnited Kingdom [...] Government primary expenditure, percent of GDP\n% of GDP\n41.09\n2023\nUnited Kingdom\nInterest paid on public debt, percent of GDP\n% of GDP\n3.08\n2023\nUnited Kingdom\nFiscal Rules and Fiscal Councils 2 indicators, 1985 - 2021\nFiscal Rule Indicator\nIndex\n1\n2021\nUnited Kingdom\nFiscal Council Indicator\nIndex\n2010\n2021\nUnited Kingdom\n1. Gender Budgeting and 2. Gender Equality Indices 3 indicators, 1980 - 2015\nGender Budgeting Indicator\nIndex\nno data\n2025\nUnited Kingdom', 'score': 0.7163977, 'raw_content': None}, {'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp', 'title': 'Gross Domestic Product (GDP) - Office for National Statistics', 'content': 'Summary of changes to data table structure in Blue Book 2023\nChanges to the structure of tables within Blue Book 2023 to meet accessibility standards.\n\n\nCoronavirus and the impact on output in the UK economy\nAnalysis of growth for the production, services and construction industries in the UK economy between February 2020 and August 2021, highlighting the impact of the coronavirus (COVID-19) pandemic. [...] GDP, UK regions and countries: July to September 2022\nQuarterly economic activity within the countries of the UK (England, Wales, Scotland and Northern Ireland) and the nine English regions (North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East and South West).\n\n\nView all related statistical bulletins\nArticles [...] Health volume adjustments and contribution to GDP growth\nVolume estimates for the NHS Test and Trace services and vaccine programmes and their impact on real GDP.\n\n\nGDP output approach, Blue Book 2023 indicative data\nDetailed industry level data. Includes monthly low-level aggregates of output gross value added (GVA) on a chained volume measure. Seasonally adjusted.', 'score': 0.657033, 'raw_content': None}], 'response_time': 1.59}), ToolMessage(content='[{"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] United Kingdom GDP\\nThe gross domestic product (GDP) measures of national income and output for a given country\'s economy. The gross domestic product (GDP) is equal to the total expenditures for all final goods and services produced within the country in a stipulated period of time.\\n| | Actual | Previous | Highest | Lowest | Dates | Unit | Frequency | |\\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\\n| | 3340.03 | 3088.84 | 3340.03 | 73.23 | 1960 - 2023 | USD Billion | Yearly | [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", "score": 0.8775715}, {"title": "U.K. GDP 1960-2025 - Macrotrends", "url": "https://www.macrotrends.net/global-metrics/countries/gbr/united-kingdom/gdp-gross-domestic-product", "content": "| Seychelles | $2.14B |\\n| Antigua and Barbuda | $2.03B |\\n| Sint Maarten (Dutch part) | $1.62B |\\n| Turks and Caicos Islands | $1.40B |\\n| St. Kitts and Nevis | $1.08B |\\n| Palau | $0.26B |\\n| U.K. GDP - Historical Data |\\n| --- |\\n| Year | GDP | Per Capita | Growth |\\n| --- | --- | --- | --- |\\n| 2023 | $3,340.03B | $48,867 | 0.10% |\\n| 2022 | $3,088.84B | $45,564 | 4.35% |\\n| 2021 | $3,141.51B | $46,870 | 8.67% |\\n| 2020 | $2,697.81B | $40,217 | -10.36% |\\n| 2019 | $2,851.41B | $42,663 | 1.64% | [...] | 2018 | $2,871.34B | $43,204 | 1.40% |\\n| 2017 | $2,680.15B | $40,572 | 2.66% |\\n| 2016 | $2,689.11B | $40,985 | 1.92% |\\n| 2015 | $2,927.91B | $44,964 | 2.22% |\\n| 2014 | $3,064.71B | $47,440 | 3.20% |\\n| 2013 | $2,784.85B | $43,426 | 1.79% |\\n| 2012 | $2,707.09B | $42,497 | 1.51% |\\n| 2011 | $2,663.81B | $42,110 | 1.15% |\\n| 2010 | $2,485.48B | $39,599 | 2.24% |\\n| 2009 | $2,412.84B | $38,744 | -4.62% |\\n| 2008 | $2,929.41B | $47,396 | -0.23% |\\n| 2007 | $3,090.51B | $50,398 | 2.62% | [...] | 2006 | $2,708.44B | $44,512 | 2.39% |\\n| 2005 | $2,543.18B | $42,105 | 2.74% |\\n| 2004 | $2,421.53B | $40,367 | 2.43% |\\n| 2003 | $2,054.42B | $34,443 | 3.15% |\\n| 2002 | $1,785.73B | $30,078 | 1.79% |\\n| 2001 | $1,649.83B | $27,907 | 2.58% |\\n| 2000 | $1,665.53B | $28,281 | 4.32% |\\n| 1999 | $1,687.83B | $28,762 | 3.07% |\\n| 1998 | $1,653.69B | $28,275 | 3.41% |\\n| 1997 | $1,560.91B | $26,766 | 4.92% |\\n| 1996 | $1,419.65B | $24,406 | 2.58% |\\n| 1995 | $1,344.24B | $23,169 | 2.53% |", "score": 0.8655088}, {"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] | 2008 | 2,134,571 |\\n| 2007 | 2,139,895 |\\n| 2006 | 2,085,162 |\\n| 2005 | 2,036,675 |\\n| 2004 | 1,982,500 |\\n| 2003 | 1,934,941 |\\n| 2002 | 1,875,809 |\\n| 2001 | 1,842,720 |\\n| 2000 | 1,796,500 |\\n| 1999 | 1,721,748 |\\n| 1998 | 1,670,654 |\\n| 1997 | 1,615,678 |\\n| 1996 | 1,539,846 |\\n| 1995 | 1,501,088 |\\n| 1994 | 1,466,101 |\\n| 1993 | 1,417,763 |\\n| 1992 | 1,386,437 |\\n| 1991 | 1,383,043 |\\n| 1990 | 1,402,748 |\\n| 1989 | 1,394,928 |\\n| 1988 | 1,362,204 |\\n| 1987 | 1,292,703 |\\n| 1986 | 1,226,237 | [...] | 1985 | 1,189,278 |\\n| 1984 | 1,142,579 |\\n| 1983 | 1,117,759 |\\n| 1982 | 1,073,055 |\\n| 1981 | 1,052,374 |\\n| 1980 | 1,059,660 |\\n| 1979 | 1,081,838 |\\n| 1978 | 1,042,953 |\\n| 1977 | 1,001,004 |\\n| 1976 | 976,967 |\\n| 1975 | 948,361 |\\n| 1974 | 962,880 |\\n| 1973 | 987,527 |\\n| 1972 | 927,226 |\\n| 1971 | 888,485 |\\n| 1970 | 857,471 |\\n| 1969 | 834,903 |\\n| 1968 | 819,239 |\\n| 1967 | 776,859 |\\n| 1966 | 756,036 |\\n| 1965 | 744,486 |\\n| 1964 | 729,071 |\\n| 1963 | 689,724 |\\n| 1962 | 657,951 |\\n| 1961 | 650,974 |", "score": 0.8338803}, {"title": "United Kingdom, GDP, Real - Economic Data Series - FRED", "url": "https://fred.stlouisfed.org/tags/series?t=gdp%3Breal%3Bunited+kingdom", "content": "National Accounts: GDP by Expenditure: Constant Prices: Gross Fixed Capital Formation for United Kingdom\\n\xa0\\n\xa0\\nSeasonally Adjusted\\nPound Sterling, Quarterly\\nQ1 1960 to Q3 2023 (2024-01-12)\\nPound Sterling, Annual\\n1960 to 2022 (2024-01-12)\\nIndex 2015=100, Quarterly\\nQ1 1960 to Q3 2023 (2024-01-12)\\nGrowth rate previous period, Quarterly\\nQ2 1955 to Q3 2024 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15) [...] 1956 to 2023 (Jan 15)\\nPound Sterling, Annual\\n1995 to 2022 (2024-01-12)\\nGrowth rate previous period, Quarterly\\nQ2 1955 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Annual\\n1956 to 2023 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nReal GDP at Constant National Prices for United Kingdom\\n\xa0\\n\xa0\\nMillions of 2017 U.S. Dollars, Annual, Not Seasonally Adjusted\\n1950 to 2019 (2021-11-08) [...] Q1 1960 to Q3 2023 (2024-01-12)\\nGrowth rate previous period, Annual\\n1956 to 2023 (Jan 15)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Annual\\n1956 to 2023 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nReal Gross Domestic Product at Market Prices in the United Kingdom\\n\xa0\\n\xa0\\nMillions of 1938 British Pounds, Monthly, Seasonally Adjusted\\nJan 1920 to Dec 1938 (2016-07-07)", "score": 0.67192334}, {"title": "Gross Domestic Product for United Kingdom (UKNGDP) - FRED", "url": "https://fred.stlouisfed.org/series/UKNGDP", "content": "Categories > International Data > Countries > United Kingdom\\nGross Domestic Product for United Kingdom (UKNGDP)\\nObservations\\nQ3 2024: 712,652 | Millions of Pounds | Quarterly\\nUpdated: Dec 23, 2024 2:46 PM CST\\nNext Release Date: Feb 13, 2025\\nObservations\\nQ3 2024: 712,652\\nUpdated: Dec 23, 2024 2:46 PM CST\\nNext Release Date: Feb 13, 2025\\nQ3 2024:\xa0712,652\xa0Q2 2024:\xa0704,470\xa0Q1 2024:\xa0697,617\xa0Q4 2023:\xa0685,749\xa0Q3 2023:\xa0685,035\xa0View All\\nUnits:\\nMillions of Pounds,\\nSeasonally Adjusted\\nFrequency:\\nQuarterly", "score": 0.65861565}]', name='tavily_search_results_json', id='f82e1077-11e2-4b9a-a48c-6d514476a4c0', tool_call_id='call_SNiD1PeC7VyOpLcBAkPY1X71', artifact={'query': 'UK GDP historical data', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': "GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] United Kingdom GDP\nThe gross domestic product (GDP) measures of national income and output for a given country's economy. The gross domestic product (GDP) is equal to the total expenditures for all final goods and services produced within the country in a stipulated period of time.\n| | Actual | Previous | Highest | Lowest | Dates | Unit | Frequency | |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| | 3340.03 | 3088.84 | 3340.03 | 73.23 | 1960 - 2023 | USD Billion | Yearly | [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", 'score': 0.8775715, 'raw_content': None}, {'url': 'https://www.macrotrends.net/global-metrics/countries/gbr/united-kingdom/gdp-gross-domestic-product', 'title': 'U.K. GDP 1960-2025 - Macrotrends', 'content': '| Seychelles | $2.14B |\n| Antigua and Barbuda | $2.03B |\n| Sint Maarten (Dutch part) | $1.62B |\n| Turks and Caicos Islands | $1.40B |\n| St. Kitts and Nevis | $1.08B |\n| Palau | $0.26B |\n| U.K. GDP - Historical Data |\n| --- |\n| Year | GDP | Per Capita | Growth |\n| --- | --- | --- | --- |\n| 2023 | $3,340.03B | $48,867 | 0.10% |\n| 2022 | $3,088.84B | $45,564 | 4.35% |\n| 2021 | $3,141.51B | $46,870 | 8.67% |\n| 2020 | $2,697.81B | $40,217 | -10.36% |\n| 2019 | $2,851.41B | $42,663 | 1.64% | [...] | 2018 | $2,871.34B | $43,204 | 1.40% |\n| 2017 | $2,680.15B | $40,572 | 2.66% |\n| 2016 | $2,689.11B | $40,985 | 1.92% |\n| 2015 | $2,927.91B | $44,964 | 2.22% |\n| 2014 | $3,064.71B | $47,440 | 3.20% |\n| 2013 | $2,784.85B | $43,426 | 1.79% |\n| 2012 | $2,707.09B | $42,497 | 1.51% |\n| 2011 | $2,663.81B | $42,110 | 1.15% |\n| 2010 | $2,485.48B | $39,599 | 2.24% |\n| 2009 | $2,412.84B | $38,744 | -4.62% |\n| 2008 | $2,929.41B | $47,396 | -0.23% |\n| 2007 | $3,090.51B | $50,398 | 2.62% | [...] | 2006 | $2,708.44B | $44,512 | 2.39% |\n| 2005 | $2,543.18B | $42,105 | 2.74% |\n| 2004 | $2,421.53B | $40,367 | 2.43% |\n| 2003 | $2,054.42B | $34,443 | 3.15% |\n| 2002 | $1,785.73B | $30,078 | 1.79% |\n| 2001 | $1,649.83B | $27,907 | 2.58% |\n| 2000 | $1,665.53B | $28,281 | 4.32% |\n| 1999 | $1,687.83B | $28,762 | 3.07% |\n| 1998 | $1,653.69B | $28,275 | 3.41% |\n| 1997 | $1,560.91B | $26,766 | 4.92% |\n| 1996 | $1,419.65B | $24,406 | 2.58% |\n| 1995 | $1,344.24B | $23,169 | 2.53% |', 'score': 0.8655088, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] | 2008 | 2,134,571 |\n| 2007 | 2,139,895 |\n| 2006 | 2,085,162 |\n| 2005 | 2,036,675 |\n| 2004 | 1,982,500 |\n| 2003 | 1,934,941 |\n| 2002 | 1,875,809 |\n| 2001 | 1,842,720 |\n| 2000 | 1,796,500 |\n| 1999 | 1,721,748 |\n| 1998 | 1,670,654 |\n| 1997 | 1,615,678 |\n| 1996 | 1,539,846 |\n| 1995 | 1,501,088 |\n| 1994 | 1,466,101 |\n| 1993 | 1,417,763 |\n| 1992 | 1,386,437 |\n| 1991 | 1,383,043 |\n| 1990 | 1,402,748 |\n| 1989 | 1,394,928 |\n| 1988 | 1,362,204 |\n| 1987 | 1,292,703 |\n| 1986 | 1,226,237 | [...] | 1985 | 1,189,278 |\n| 1984 | 1,142,579 |\n| 1983 | 1,117,759 |\n| 1982 | 1,073,055 |\n| 1981 | 1,052,374 |\n| 1980 | 1,059,660 |\n| 1979 | 1,081,838 |\n| 1978 | 1,042,953 |\n| 1977 | 1,001,004 |\n| 1976 | 976,967 |\n| 1975 | 948,361 |\n| 1974 | 962,880 |\n| 1973 | 987,527 |\n| 1972 | 927,226 |\n| 1971 | 888,485 |\n| 1970 | 857,471 |\n| 1969 | 834,903 |\n| 1968 | 819,239 |\n| 1967 | 776,859 |\n| 1966 | 756,036 |\n| 1965 | 744,486 |\n| 1964 | 729,071 |\n| 1963 | 689,724 |\n| 1962 | 657,951 |\n| 1961 | 650,974 |', 'score': 0.8338803, 'raw_content': None}, {'url': 'https://fred.stlouisfed.org/tags/series?t=gdp%3Breal%3Bunited+kingdom', 'title': 'United Kingdom, GDP, Real - Economic Data Series - FRED', 'content': 'National Accounts: GDP by Expenditure: Constant Prices: Gross Fixed Capital Formation for United Kingdom\n\xa0\n\xa0\nSeasonally Adjusted\nPound Sterling, Quarterly\nQ1 1960 to Q3 2023 (2024-01-12)\nPound Sterling, Annual\n1960 to 2022 (2024-01-12)\nIndex 2015=100, Quarterly\nQ1 1960 to Q3 2023 (2024-01-12)\nGrowth rate previous period, Quarterly\nQ2 1955 to Q3 2024 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15) [...] 1956 to 2023 (Jan 15)\nPound Sterling, Annual\n1995 to 2022 (2024-01-12)\nGrowth rate previous period, Quarterly\nQ2 1955 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Annual\n1956 to 2023 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nReal GDP at Constant National Prices for United Kingdom\n\xa0\n\xa0\nMillions of 2017 U.S. Dollars, Annual, Not Seasonally Adjusted\n1950 to 2019 (2021-11-08) [...] Q1 1960 to Q3 2023 (2024-01-12)\nGrowth rate previous period, Annual\n1956 to 2023 (Jan 15)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Annual\n1956 to 2023 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nReal Gross Domestic Product at Market Prices in the United Kingdom\n\xa0\n\xa0\nMillions of 1938 British Pounds, Monthly, Seasonally Adjusted\nJan 1920 to Dec 1938 (2016-07-07)', 'score': 0.67192334, 'raw_content': None}, {'url': 'https://fred.stlouisfed.org/series/UKNGDP', 'title': 'Gross Domestic Product for United Kingdom (UKNGDP) - FRED', 'content': 'Categories > International Data > Countries > United Kingdom\nGross Domestic Product for United Kingdom (UKNGDP)\nObservations\nQ3 2024: 712,652 | Millions of Pounds | Quarterly\nUpdated: Dec 23, 2024 2:46 PM CST\nNext Release Date: Feb 13, 2025\nObservations\nQ3 2024: 712,652\nUpdated: Dec 23, 2024 2:46 PM CST\nNext Release Date: Feb 13, 2025\nQ3 2024:\xa0712,652\xa0Q2 2024:\xa0704,470\xa0Q1 2024:\xa0697,617\xa0Q4 2023:\xa0685,749\xa0Q3 2023:\xa0685,035\xa0View All\nUnits:\nMillions of Pounds,\nSeasonally Adjusted\nFrequency:\nQuarterly', 'score': 0.65861565, 'raw_content': None}], 'response_time': 1.17}), HumanMessage(content='過去5年間の英国のGDPデータは以下の通りです(単位:百万ポンド):\n\n- **2019年**: 2,474,245\n- **2020年**: 2,219,474\n- **2021年**: 2,409,815\n- **2022年**: 2,526,428\n- **2023年**: 2,536,090\n\n次に、これらのデータをラインチャートにする準備をします。', additional_kwargs={}, response_metadata={}, name='researcher', id='f9f53a74-a442-40e2-becf-371c32e29cbd')]}}
----
{'chart_generator': {'messages': [HumanMessage(content='過去5年間の英国のGDPを取得し、それをラインチャートにしてください。チャートを作成したら、終了してください。', additional_kwargs={}, response_metadata={}, id='46ab958f-93b9-4fd8-8e99-1fcf896fcb67'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_xOvO5XwfXasELJYhA9UZxz2o', 'function': {'arguments': '{"query":"UK GDP last 5 years data"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 25, 'prompt_tokens': 289, 'total_tokens': 314, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_b8bc95a0ac', 'id': 'chatcmpl-BEnL5Yw8ZgOgdI79zx5MIzRcqEHhe', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-38bbdfe3-922e-4f08-ba59-b114549af7ab-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP last 5 years data'}, 'id': 'call_xOvO5XwfXasELJYhA9UZxz2o', 'type': 'tool_call'}], usage_metadata={'input_tokens': 289, 'output_tokens': 25, 'total_tokens': 314, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}}), ToolMessage(content='[{"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "GDP of the UK 1948-2023\\nPublished by D. Clark, Jan 6, 2025\\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] Office for National Statistics (UK), Gross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) Statista, https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/ (last visited February 08, 2025)\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) [Graph], Office for National Statistics (UK), December 23, 2024. [Online]. Available: https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "score": 0.8548001}, {"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", "score": 0.8025714}, {"title": "United Kingdom Full Year Gdp Growth - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/full-year-gdp-growth", "content": "Full Year GDP Growth in the United Kingdom averaged 2.45 percent from 1949 until 2023, reaching an all time high of 8.60 percent in 2021 and a record low of -10.30 percent in 2020. This page includes a chart with historical data for the United Kingdom Full Year Gdp Growth. United Kingdom Full Year Gdp Growth - values, historical data and charts - was last updated on February of 2025. [...] | GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP Growth Rate YoY | 0.90 | 0.70 | percent | Sep 2024 |\\n| GDP Constant Prices | 639452.00 | 639269.00 | GBP Million | Sep 2024 |\\n| GDP from Agriculture | 4254.00 | 4215.00 | GBP Million | Sep 2024 |\\n| GDP from Construction | 35420.00 | 35185.00 | GBP Million | Sep 2024 |\\n| GDP from Manufacturing | 51358.00 | 51399.00 | GBP Million | Sep 2024 |\\n| GDP from Mining | 8272.00 | 8300.00 | GBP Million | Sep 2024 | [...] Full Year GDP Growth in the United Kingdom is expected to reach 1.20 percent by the end of 2024, according to Trading Economics global macro models and analysts expectations. In the long-term, the United Kingdom Full Year Gdp Growth is projected to trend around 1.40 percent in 2025 and 1.60 percent in 2026, according to our econometric models.\\n| Related | Last | Previous | Unit | Reference |\\n| --- | --- | --- | --- | --- |\\n| Full Year GDP Growth | 0.30 | 4.80 | percent | Dec 2023 |", "score": 0.7999589}, {"title": "U.K. GDP Growth Rate 1961-2025 | MacroTrends", "url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-growth-rate", "content": "U.K. gdp growth rate for 2023 was 0.10%, a 4.24% decline from 2022.\\nU.K. gdp growth rate for 2022 was 4.35%, a 4.33% decline from 2021.\\nU.K. gdp growth rate for 2021 was 8.67%, a 19.03% increase from 2020.\\nU.K. gdp growth rate for 2020 was -10.36%, a 12% decline from 2019. [...] | Ireland | -3.20% |\\n| U.K. GDP Growth Rate - Historical Data |\\n| --- |\\n| Year | GDP Growth (%) | Annual Change |\\n| --- | --- | --- |\\n| 2023 | 0.10% | -4.24% |\\n| 2022 | 4.35% | -4.33% |\\n| 2021 | 8.67% | 19.03% |\\n| 2020 | -10.36% | -12.00% |\\n| 2019 | 1.64% | 0.24% |\\n| 2018 | 1.40% | -1.25% |\\n| 2017 | 2.66% | 0.73% |\\n| 2016 | 1.92% | -0.30% |\\n| 2015 | 2.22% | -0.98% |\\n| 2014 | 3.20% | 1.40% |\\n| 2013 | 1.79% | 0.28% |\\n| 2012 | 1.51% | 0.37% |\\n| 2011 | 1.15% | -1.09% |\\n| 2010 | 2.24% | 6.85% |", "score": 0.78214747}, {"title": "Gross Domestic Product (GDP) - Office for National Statistics", "url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp", "content": "GDP quarterly national accounts, UK: July to September 2024\\nRevised quarterly estimate of gross domestic product (GDP) for the UK. Uses additional data to provide a more precise indication of economic growth than the first estimate.\\n\\n\\nGDP first quarterly estimate, UK: July to September 2024\\nFirst quarterly estimate of gross domestic product (GDP). Contains current and constant price data on the value of goods and services to indicate the economic performance of the UK. [...] UK real gross domestic product (GDP) is estimated to have shown no growth in Quarter 3 (July to Sept) 2024, revised down from the first estimate increase of 0.1%.\\nThe quarterly path of real GDP at an aggregate level is unchanged from Quarter 1 (Jan to Mar) 2023 to Quarter 1 2024, however, there have been downward revisions of 0.1 percentage points in Quarter 2 (Apr to June) and Quarter 3 2024. [...] Read this statistical bulletin\\nMore publications\\nBack to top\\nTime series related to Gross Domestic Product (GDP)\\n\\n\\nGross Domestic Product: chained volume measures: Seasonally adjusted £m\\nChained Volume Measures (CVM)\\n£ 639,452 m 2024 Q3\\nRelease date:\\n23 December 2024\\nNext release:\\n28 March 2025\\n\\n\\nGross Domestic Product: Quarter on Quarter growth: CVM SA %\\nChained Volume Measures (CVM)\\n0 % 2024 Q3\\nRelease date:\\n23 December 2024\\nNext release:\\n13 February 2025", "score": 0.70944256}]', name='tavily_search_results_json', id='4c05d35f-668c-48ce-8daa-073c05636abf', tool_call_id='call_xOvO5XwfXasELJYhA9UZxz2o', artifact={'query': 'UK GDP last 5 years data', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'GDP of the UK 1948-2023\nPublished by D. Clark, Jan 6, 2025\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] Office for National Statistics (UK), Gross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) Statista, https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/ (last visited February 08, 2025)\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP) [Graph], Office for National Statistics (UK), December 23, 2024. [Online]. Available: https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'score': 0.8548001, 'raw_content': None}, {'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': 'The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |', 'score': 0.8025714, 'raw_content': None}, {'url': 'https://tradingeconomics.com/united-kingdom/full-year-gdp-growth', 'title': 'United Kingdom Full Year Gdp Growth - Trading Economics', 'content': 'Full Year GDP Growth in the United Kingdom averaged 2.45 percent from 1949 until 2023, reaching an all time high of 8.60 percent in 2021 and a record low of -10.30 percent in 2020. This page includes a chart with historical data for the United Kingdom Full Year Gdp Growth. United Kingdom Full Year Gdp Growth - values, historical data and charts - was last updated on February of 2025. [...] | GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP Growth Rate YoY | 0.90 | 0.70 | percent | Sep 2024 |\n| GDP Constant Prices | 639452.00 | 639269.00 | GBP Million | Sep 2024 |\n| GDP from Agriculture | 4254.00 | 4215.00 | GBP Million | Sep 2024 |\n| GDP from Construction | 35420.00 | 35185.00 | GBP Million | Sep 2024 |\n| GDP from Manufacturing | 51358.00 | 51399.00 | GBP Million | Sep 2024 |\n| GDP from Mining | 8272.00 | 8300.00 | GBP Million | Sep 2024 | [...] Full Year GDP Growth in the United Kingdom is expected to reach 1.20 percent by the end of 2024, according to Trading Economics global macro models and analysts expectations. In the long-term, the United Kingdom Full Year Gdp Growth is projected to trend around 1.40 percent in 2025 and 1.60 percent in 2026, according to our econometric models.\n| Related | Last | Previous | Unit | Reference |\n| --- | --- | --- | --- | --- |\n| Full Year GDP Growth | 0.30 | 4.80 | percent | Dec 2023 |', 'score': 0.7999589, 'raw_content': None}, {'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-growth-rate', 'title': 'U.K. GDP Growth Rate 1961-2025 | MacroTrends', 'content': 'U.K. gdp growth rate for 2023 was 0.10%, a 4.24% decline from 2022.\nU.K. gdp growth rate for 2022 was 4.35%, a 4.33% decline from 2021.\nU.K. gdp growth rate for 2021 was 8.67%, a 19.03% increase from 2020.\nU.K. gdp growth rate for 2020 was -10.36%, a 12% decline from 2019. [...] | Ireland | -3.20% |\n| U.K. GDP Growth Rate - Historical Data |\n| --- |\n| Year | GDP Growth (%) | Annual Change |\n| --- | --- | --- |\n| 2023 | 0.10% | -4.24% |\n| 2022 | 4.35% | -4.33% |\n| 2021 | 8.67% | 19.03% |\n| 2020 | -10.36% | -12.00% |\n| 2019 | 1.64% | 0.24% |\n| 2018 | 1.40% | -1.25% |\n| 2017 | 2.66% | 0.73% |\n| 2016 | 1.92% | -0.30% |\n| 2015 | 2.22% | -0.98% |\n| 2014 | 3.20% | 1.40% |\n| 2013 | 1.79% | 0.28% |\n| 2012 | 1.51% | 0.37% |\n| 2011 | 1.15% | -1.09% |\n| 2010 | 2.24% | 6.85% |', 'score': 0.78214747, 'raw_content': None}, {'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp', 'title': 'Gross Domestic Product (GDP) - Office for National Statistics', 'content': 'GDP quarterly national accounts, UK: July to September 2024\nRevised quarterly estimate of gross domestic product (GDP) for the UK. Uses additional data to provide a more precise indication of economic growth than the first estimate.\n\n\nGDP first quarterly estimate, UK: July to September 2024\nFirst quarterly estimate of gross domestic product (GDP). Contains current and constant price data on the value of goods and services to indicate the economic performance of the UK. [...] UK real gross domestic product (GDP) is estimated to have shown no growth in Quarter 3 (July to Sept) 2024, revised down from the first estimate increase of 0.1%.\nThe quarterly path of real GDP at an aggregate level is unchanged from Quarter 1 (Jan to Mar) 2023 to Quarter 1 2024, however, there have been downward revisions of 0.1 percentage points in Quarter 2 (Apr to June) and Quarter 3 2024. [...] Read this statistical bulletin\nMore publications\nBack to top\nTime series related to Gross Domestic Product (GDP)\n\n\nGross Domestic Product: chained volume measures: Seasonally adjusted £m\nChained Volume Measures (CVM)\n£ 639,452 m 2024 Q3\nRelease date:\n23 December 2024\nNext release:\n28 March 2025\n\n\nGross Domestic Product: Quarter on Quarter growth: CVM SA %\nChained Volume Measures (CVM)\n0 % 2024 Q3\nRelease date:\n23 December 2024\nNext release:\n13 February 2025', 'score': 0.70944256, 'raw_content': None}], 'response_time': 1.92}), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_ZiESWZal23RsQPPPCLRj4tSd', 'function': {'arguments': '{"query": "UK GDP data 2019-2023"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}, {'id': 'call_SNiD1PeC7VyOpLcBAkPY1X71', 'function': {'arguments': '{"query": "UK GDP historical data"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 64, 'prompt_tokens': 2496, 'total_tokens': 2560, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 2432}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_b8bc95a0ac', 'id': 'chatcmpl-BEnL9mCmmJDp5G22f5BjFu4z7Hfgo', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-9662d4e6-8837-4c81-91d3-e0910c146cff-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP data 2019-2023'}, 'id': 'call_ZiESWZal23RsQPPPCLRj4tSd', 'type': 'tool_call'}, {'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP historical data'}, 'id': 'call_SNiD1PeC7VyOpLcBAkPY1X71', 'type': 'tool_call'}], usage_metadata={'input_tokens': 2496, 'output_tokens': 64, 'total_tokens': 2560, 'input_token_details': {'audio': 0, 'cache_read': 2432}, 'output_token_details': {'audio': 0, 'reasoning': 0}}), ToolMessage(content='[{"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 | [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025.", "score": 0.9311691}, {"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "GDP of the UK 1948-2023\\nPublished by D. Clark, Jan 6, 2025\\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] Although on an annual basis, the UK economy grew slightly in 2023, the UK entered 2024 in recession following two quarters of\xa0negative economic growth at the end of 2023. After a huge 10.4 percent fall in GDP in 2020, economic growth rates were relatively strong during a period of economic recovery, with GDP growing by 8.7 percent in 2021, and 4.3 percent in 2022. This recovery has clearly stalled somewhat in 2023, however, with monthly growth figures indicating that the UK\xa0economy has been", "score": 0.92260116}, {"title": "UK monthly GDP growth 2025 - Statista", "url": "https://www.statista.com/statistics/941233/monthly-gdp-growth-uk/", "content": "Due to two consecutive quarters of negative economic growth, in late 2023 the UK economy ended the year in recession. After not growing at all in the second quarter of 2023, UK GDP fell by 0.1 percent in the third quarter, and then by 0.3 percent in the last quarter. For the whole of 2023, the economy grew by 0.4 percent compared to 2022, and for 2024 is forecast to have grown by 1.1 percent. During the first two quarters of 2024, UK GDP grew by 0.7 percent, and 0.4 percent, with this [...] Other statistics that may interest you Economy of the UK\\nGross domestic product\\n8\\n\\nBasic Statistic GDP of the UK 1948-2023\\nBasic Statistic Annual GDP growth in the UK 1949-2023\\nPremium Statistic GDP growth forecast for the UK 2000-2029\\nBasic Statistic Quarterly GDP of the UK 2019-2024\\nBasic Statistic Quarterly GDP growth of the UK 2019-2024\\nBasic Statistic Monthly GDP of the UK 2019-2024\\nBasic Statistic Monthly GDP growth of the UK 2022-2024\\nBasic Statistic GDP per capita in the UK 1955-2023 [...] GDP of the UK 1948-2023\\nAnnual GDP growth in the UK 1949-2023\\nGDP growth forecast for the UK 2000-2029\\nQuarterly GDP of the UK 2019-2024\\nQuarterly GDP growth of the UK 2019-2024\\nMonthly GDP of the UK 2019-2024\\nMonthly GDP growth of the UK 2022-2024\\nGDP per capita in the UK 1955-2023\\n\\nThe most important statistics", "score": 0.7272211}, {"title": "United Kingdom - IMF DataMapper", "url": "https://www.imf.org/external/datamapper/profile/GBR", "content": "AI Preparedness Index\\nIndex\\n0.73\\n2023\\nUnited Kingdom\\nDigital Infrastructure\\nIndex\\n0.18\\n2023\\nUnited Kingdom\\nInnovation and Economic Integration\\nIndex\\n0.16\\n2023\\nUnited Kingdom\\nHuman Capital and Labor Market Policies\\nIndex\\n0.17\\n2023\\nUnited Kingdom\\nPublic Finances in Modern History 8 indicators, 1800 - 2023 Show all\\nGovernment revenue, percent of GDP\\n% of GDP\\n38.21\\n2023\\nUnited Kingdom\\nGovernment expenditure, percent of GDP\\n% of GDP\\n44.17\\n2023\\nUnited Kingdom [...] Government primary expenditure, percent of GDP\\n% of GDP\\n41.09\\n2023\\nUnited Kingdom\\nInterest paid on public debt, percent of GDP\\n% of GDP\\n3.08\\n2023\\nUnited Kingdom\\nFiscal Rules and Fiscal Councils 2 indicators, 1985 - 2021\\nFiscal Rule Indicator\\nIndex\\n1\\n2021\\nUnited Kingdom\\nFiscal Council Indicator\\nIndex\\n2010\\n2021\\nUnited Kingdom\\n1. Gender Budgeting and 2. Gender Equality Indices 3 indicators, 1980 - 2015\\nGender Budgeting Indicator\\nIndex\\nno data\\n2025\\nUnited Kingdom", "score": 0.7163977}, {"title": "Gross Domestic Product (GDP) - Office for National Statistics", "url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp", "content": "Summary of changes to data table structure in Blue Book 2023\\nChanges to the structure of tables within Blue Book 2023 to meet accessibility standards.\\n\\n\\nCoronavirus and the impact on output in the UK economy\\nAnalysis of growth for the production, services and construction industries in the UK economy between February 2020 and August 2021, highlighting the impact of the coronavirus (COVID-19) pandemic. [...] GDP, UK regions and countries: July to September 2022\\nQuarterly economic activity within the countries of the UK (England, Wales, Scotland and Northern Ireland) and the nine English regions (North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East and South West).\\n\\n\\nView all related statistical bulletins\\nArticles [...] Health volume adjustments and contribution to GDP growth\\nVolume estimates for the NHS Test and Trace services and vaccine programmes and their impact on real GDP.\\n\\n\\nGDP output approach, Blue Book 2023 indicative data\\nDetailed industry level data. Includes monthly low-level aggregates of output gross value added (GVA) on a chained volume measure. Seasonally adjusted.", "score": 0.657033}]', name='tavily_search_results_json', id='24d43b12-7340-4d01-a70b-4bc205f1596f', tool_call_id='call_ZiESWZal23RsQPPPCLRj4tSd', artifact={'query': 'UK GDP data 2019-2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': 'The Gross Domestic Product (GDP) in the United Kingdom was worth 3340.03 billion US dollars in 2023, according to official data from the World Bank. The GDP value of the United Kingdom represents 3.17 percent of the world economy. source: World Bank [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 | [...] GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025.', 'score': 0.9311691, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'GDP of the UK 1948-2023\nPublished by D. Clark, Jan 6, 2025\nThe gross domestic product of the United Kingdom in 2023 was just under 2.54 trillion British pounds, a slight increase when compared to the previous year. The significant drop in GDP between 2019 and 2020 was brought about by the COVID-19 pandemic and subsequent lockdowns, which caused severe damage to many industries, particularly in the service sector upon which the UK economy is heavily reliant. [...] Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] Although on an annual basis, the UK economy grew slightly in 2023, the UK entered 2024 in recession following two quarters of\xa0negative economic growth at the end of 2023. After a huge 10.4 percent fall in GDP in 2020, economic growth rates were relatively strong during a period of economic recovery, with GDP growing by 8.7 percent in 2021, and 4.3 percent in 2022. This recovery has clearly stalled somewhat in 2023, however, with monthly growth figures indicating that the UK\xa0economy has been', 'score': 0.92260116, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/941233/monthly-gdp-growth-uk/', 'title': 'UK monthly GDP growth 2025 - Statista', 'content': 'Due to two consecutive quarters of negative economic growth, in late 2023 the UK economy ended the year in recession. After not growing at all in the second quarter of 2023, UK GDP fell by 0.1 percent in the third quarter, and then by 0.3 percent in the last quarter. For the whole of 2023, the economy grew by 0.4 percent compared to 2022, and for 2024 is forecast to have grown by 1.1 percent. During the first two quarters of 2024, UK GDP grew by 0.7 percent, and 0.4 percent, with this [...] Other statistics that may interest you Economy of the UK\nGross domestic product\n8\n\nBasic Statistic GDP of the UK 1948-2023\nBasic Statistic Annual GDP growth in the UK 1949-2023\nPremium Statistic GDP growth forecast for the UK 2000-2029\nBasic Statistic Quarterly GDP of the UK 2019-2024\nBasic Statistic Quarterly GDP growth of the UK 2019-2024\nBasic Statistic Monthly GDP of the UK 2019-2024\nBasic Statistic Monthly GDP growth of the UK 2022-2024\nBasic Statistic GDP per capita in the UK 1955-2023 [...] GDP of the UK 1948-2023\nAnnual GDP growth in the UK 1949-2023\nGDP growth forecast for the UK 2000-2029\nQuarterly GDP of the UK 2019-2024\nQuarterly GDP growth of the UK 2019-2024\nMonthly GDP of the UK 2019-2024\nMonthly GDP growth of the UK 2022-2024\nGDP per capita in the UK 1955-2023\n\nThe most important statistics', 'score': 0.7272211, 'raw_content': None}, {'url': 'https://www.imf.org/external/datamapper/profile/GBR', 'title': 'United Kingdom - IMF DataMapper', 'content': 'AI Preparedness Index\nIndex\n0.73\n2023\nUnited Kingdom\nDigital Infrastructure\nIndex\n0.18\n2023\nUnited Kingdom\nInnovation and Economic Integration\nIndex\n0.16\n2023\nUnited Kingdom\nHuman Capital and Labor Market Policies\nIndex\n0.17\n2023\nUnited Kingdom\nPublic Finances in Modern History 8 indicators, 1800 - 2023 Show all\nGovernment revenue, percent of GDP\n% of GDP\n38.21\n2023\nUnited Kingdom\nGovernment expenditure, percent of GDP\n% of GDP\n44.17\n2023\nUnited Kingdom [...] Government primary expenditure, percent of GDP\n% of GDP\n41.09\n2023\nUnited Kingdom\nInterest paid on public debt, percent of GDP\n% of GDP\n3.08\n2023\nUnited Kingdom\nFiscal Rules and Fiscal Councils 2 indicators, 1985 - 2021\nFiscal Rule Indicator\nIndex\n1\n2021\nUnited Kingdom\nFiscal Council Indicator\nIndex\n2010\n2021\nUnited Kingdom\n1. Gender Budgeting and 2. Gender Equality Indices 3 indicators, 1980 - 2015\nGender Budgeting Indicator\nIndex\nno data\n2025\nUnited Kingdom', 'score': 0.7163977, 'raw_content': None}, {'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp', 'title': 'Gross Domestic Product (GDP) - Office for National Statistics', 'content': 'Summary of changes to data table structure in Blue Book 2023\nChanges to the structure of tables within Blue Book 2023 to meet accessibility standards.\n\n\nCoronavirus and the impact on output in the UK economy\nAnalysis of growth for the production, services and construction industries in the UK economy between February 2020 and August 2021, highlighting the impact of the coronavirus (COVID-19) pandemic. [...] GDP, UK regions and countries: July to September 2022\nQuarterly economic activity within the countries of the UK (England, Wales, Scotland and Northern Ireland) and the nine English regions (North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East and South West).\n\n\nView all related statistical bulletins\nArticles [...] Health volume adjustments and contribution to GDP growth\nVolume estimates for the NHS Test and Trace services and vaccine programmes and their impact on real GDP.\n\n\nGDP output approach, Blue Book 2023 indicative data\nDetailed industry level data. Includes monthly low-level aggregates of output gross value added (GVA) on a chained volume measure. Seasonally adjusted.', 'score': 0.657033, 'raw_content': None}], 'response_time': 1.59}), ToolMessage(content='[{"title": "United Kingdom GDP - Trading Economics", "url": "https://tradingeconomics.com/united-kingdom/gdp", "content": "GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] United Kingdom GDP\\nThe gross domestic product (GDP) measures of national income and output for a given country\'s economy. The gross domestic product (GDP) is equal to the total expenditures for all final goods and services produced within the country in a stipulated period of time.\\n| | Actual | Previous | Highest | Lowest | Dates | Unit | Frequency | |\\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\\n| | 3340.03 | 3088.84 | 3340.03 | 73.23 | 1960 - 2023 | USD Billion | Yearly | [...] | --- | --- | --- | --- | --- |\\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", "score": 0.8775715}, {"title": "U.K. GDP 1960-2025 - Macrotrends", "url": "https://www.macrotrends.net/global-metrics/countries/gbr/united-kingdom/gdp-gross-domestic-product", "content": "| Seychelles | $2.14B |\\n| Antigua and Barbuda | $2.03B |\\n| Sint Maarten (Dutch part) | $1.62B |\\n| Turks and Caicos Islands | $1.40B |\\n| St. Kitts and Nevis | $1.08B |\\n| Palau | $0.26B |\\n| U.K. GDP - Historical Data |\\n| --- |\\n| Year | GDP | Per Capita | Growth |\\n| --- | --- | --- | --- |\\n| 2023 | $3,340.03B | $48,867 | 0.10% |\\n| 2022 | $3,088.84B | $45,564 | 4.35% |\\n| 2021 | $3,141.51B | $46,870 | 8.67% |\\n| 2020 | $2,697.81B | $40,217 | -10.36% |\\n| 2019 | $2,851.41B | $42,663 | 1.64% | [...] | 2018 | $2,871.34B | $43,204 | 1.40% |\\n| 2017 | $2,680.15B | $40,572 | 2.66% |\\n| 2016 | $2,689.11B | $40,985 | 1.92% |\\n| 2015 | $2,927.91B | $44,964 | 2.22% |\\n| 2014 | $3,064.71B | $47,440 | 3.20% |\\n| 2013 | $2,784.85B | $43,426 | 1.79% |\\n| 2012 | $2,707.09B | $42,497 | 1.51% |\\n| 2011 | $2,663.81B | $42,110 | 1.15% |\\n| 2010 | $2,485.48B | $39,599 | 2.24% |\\n| 2009 | $2,412.84B | $38,744 | -4.62% |\\n| 2008 | $2,929.41B | $47,396 | -0.23% |\\n| 2007 | $3,090.51B | $50,398 | 2.62% | [...] | 2006 | $2,708.44B | $44,512 | 2.39% |\\n| 2005 | $2,543.18B | $42,105 | 2.74% |\\n| 2004 | $2,421.53B | $40,367 | 2.43% |\\n| 2003 | $2,054.42B | $34,443 | 3.15% |\\n| 2002 | $1,785.73B | $30,078 | 1.79% |\\n| 2001 | $1,649.83B | $27,907 | 2.58% |\\n| 2000 | $1,665.53B | $28,281 | 4.32% |\\n| 1999 | $1,687.83B | $28,762 | 3.07% |\\n| 1998 | $1,653.69B | $28,275 | 3.41% |\\n| 1997 | $1,560.91B | $26,766 | 4.92% |\\n| 1996 | $1,419.65B | $24,406 | 2.58% |\\n| 1995 | $1,344.24B | $23,169 | 2.53% |", "score": 0.8655088}, {"title": "GDP of the UK 1948-2024 - Statista", "url": "https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/", "content": "Read more\\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\\ntable column chart\\n| Characteristic | GDP in million GDP (CVM 2022)* |\\n| --- | --- |\\n| 2023 | 2,536,090 |\\n| 2022 | 2,526,428 |\\n| 2021 | 2,409,815 |\\n| 2020 | 2,219,474 |\\n| 2019 | 2,474,245 |\\n| 2018 | 2,434,694 |\\n| 2017 | 2,400,956 |\\n| 2016 | 2,338,825 |\\n| 2015 | 2,294,727 |\\n| 2014 | 2,244,827 |\\n| 2013 | 2,175,333 |\\n| 2012 | 2,136,871 |\\n| 2011 | 2,105,105 |\\n| 2010 | 2,081,411 |\\n| 2009 | 2,035,942 | [...] | 2008 | 2,134,571 |\\n| 2007 | 2,139,895 |\\n| 2006 | 2,085,162 |\\n| 2005 | 2,036,675 |\\n| 2004 | 1,982,500 |\\n| 2003 | 1,934,941 |\\n| 2002 | 1,875,809 |\\n| 2001 | 1,842,720 |\\n| 2000 | 1,796,500 |\\n| 1999 | 1,721,748 |\\n| 1998 | 1,670,654 |\\n| 1997 | 1,615,678 |\\n| 1996 | 1,539,846 |\\n| 1995 | 1,501,088 |\\n| 1994 | 1,466,101 |\\n| 1993 | 1,417,763 |\\n| 1992 | 1,386,437 |\\n| 1991 | 1,383,043 |\\n| 1990 | 1,402,748 |\\n| 1989 | 1,394,928 |\\n| 1988 | 1,362,204 |\\n| 1987 | 1,292,703 |\\n| 1986 | 1,226,237 | [...] | 1985 | 1,189,278 |\\n| 1984 | 1,142,579 |\\n| 1983 | 1,117,759 |\\n| 1982 | 1,073,055 |\\n| 1981 | 1,052,374 |\\n| 1980 | 1,059,660 |\\n| 1979 | 1,081,838 |\\n| 1978 | 1,042,953 |\\n| 1977 | 1,001,004 |\\n| 1976 | 976,967 |\\n| 1975 | 948,361 |\\n| 1974 | 962,880 |\\n| 1973 | 987,527 |\\n| 1972 | 927,226 |\\n| 1971 | 888,485 |\\n| 1970 | 857,471 |\\n| 1969 | 834,903 |\\n| 1968 | 819,239 |\\n| 1967 | 776,859 |\\n| 1966 | 756,036 |\\n| 1965 | 744,486 |\\n| 1964 | 729,071 |\\n| 1963 | 689,724 |\\n| 1962 | 657,951 |\\n| 1961 | 650,974 |", "score": 0.8338803}, {"title": "United Kingdom, GDP, Real - Economic Data Series - FRED", "url": "https://fred.stlouisfed.org/tags/series?t=gdp%3Breal%3Bunited+kingdom", "content": "National Accounts: GDP by Expenditure: Constant Prices: Gross Fixed Capital Formation for United Kingdom\\n\xa0\\n\xa0\\nSeasonally Adjusted\\nPound Sterling, Quarterly\\nQ1 1960 to Q3 2023 (2024-01-12)\\nPound Sterling, Annual\\n1960 to 2022 (2024-01-12)\\nIndex 2015=100, Quarterly\\nQ1 1960 to Q3 2023 (2024-01-12)\\nGrowth rate previous period, Quarterly\\nQ2 1955 to Q3 2024 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15) [...] 1956 to 2023 (Jan 15)\\nPound Sterling, Annual\\n1995 to 2022 (2024-01-12)\\nGrowth rate previous period, Quarterly\\nQ2 1955 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Annual\\n1956 to 2023 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nReal GDP at Constant National Prices for United Kingdom\\n\xa0\\n\xa0\\nMillions of 2017 U.S. Dollars, Annual, Not Seasonally Adjusted\\n1950 to 2019 (2021-11-08) [...] Q1 1960 to Q3 2023 (2024-01-12)\\nGrowth rate previous period, Annual\\n1956 to 2023 (Jan 15)\\nGrowth rate same period previous year, Quarterly\\nQ1 1956 to Q3 2024 (Jan 15)\\nGrowth rate same period previous year, Annual\\n1956 to 2023 (Jan 15)\\nIndex 2015=100, Annual\\n1960 to 2022 (2024-01-12)\\nReal Gross Domestic Product at Market Prices in the United Kingdom\\n\xa0\\n\xa0\\nMillions of 1938 British Pounds, Monthly, Seasonally Adjusted\\nJan 1920 to Dec 1938 (2016-07-07)", "score": 0.67192334}, {"title": "Gross Domestic Product for United Kingdom (UKNGDP) - FRED", "url": "https://fred.stlouisfed.org/series/UKNGDP", "content": "Categories > International Data > Countries > United Kingdom\\nGross Domestic Product for United Kingdom (UKNGDP)\\nObservations\\nQ3 2024: 712,652 | Millions of Pounds | Quarterly\\nUpdated: Dec 23, 2024 2:46 PM CST\\nNext Release Date: Feb 13, 2025\\nObservations\\nQ3 2024: 712,652\\nUpdated: Dec 23, 2024 2:46 PM CST\\nNext Release Date: Feb 13, 2025\\nQ3 2024:\xa0712,652\xa0Q2 2024:\xa0704,470\xa0Q1 2024:\xa0697,617\xa0Q4 2023:\xa0685,749\xa0Q3 2023:\xa0685,035\xa0View All\\nUnits:\\nMillions of Pounds,\\nSeasonally Adjusted\\nFrequency:\\nQuarterly", "score": 0.65861565}]', name='tavily_search_results_json', id='f82e1077-11e2-4b9a-a48c-6d514476a4c0', tool_call_id='call_SNiD1PeC7VyOpLcBAkPY1X71', artifact={'query': 'UK GDP historical data', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'url': 'https://tradingeconomics.com/united-kingdom/gdp', 'title': 'United Kingdom GDP - Trading Economics', 'content': "GDP in the United Kingdom averaged 1345.39 USD Billion from 1960 until 2023, reaching an all time high of 3340.03 USD Billion in 2023 and a record low of 73.23 USD Billion in 1960. This page provides the latest reported value for - United Kingdom GDP - plus previous releases, historical high and low, short-term forecast and long-term prediction, economic calendar, survey consensus and news. United Kingdom GDP - values, historical data and charts - was last updated on February of 2025. [...] United Kingdom GDP\nThe gross domestic product (GDP) measures of national income and output for a given country's economy. The gross domestic product (GDP) is equal to the total expenditures for all final goods and services produced within the country in a stipulated period of time.\n| | Actual | Previous | Highest | Lowest | Dates | Unit | Frequency | |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| | 3340.03 | 3088.84 | 3340.03 | 73.23 | 1960 - 2023 | USD Billion | Yearly | [...] | --- | --- | --- | --- | --- |\n| GDP | 3340.03 | 3088.84 | USD Billion | Dec 2023 |\n| GDP per Capita | 47005.12 | 47343.47 | USD | Dec 2023 |\n| GDP per Capita PPP | 54126.14 | 54515.75 | USD | Dec 2023 |", 'score': 0.8775715, 'raw_content': None}, {'url': 'https://www.macrotrends.net/global-metrics/countries/gbr/united-kingdom/gdp-gross-domestic-product', 'title': 'U.K. GDP 1960-2025 - Macrotrends', 'content': '| Seychelles | $2.14B |\n| Antigua and Barbuda | $2.03B |\n| Sint Maarten (Dutch part) | $1.62B |\n| Turks and Caicos Islands | $1.40B |\n| St. Kitts and Nevis | $1.08B |\n| Palau | $0.26B |\n| U.K. GDP - Historical Data |\n| --- |\n| Year | GDP | Per Capita | Growth |\n| --- | --- | --- | --- |\n| 2023 | $3,340.03B | $48,867 | 0.10% |\n| 2022 | $3,088.84B | $45,564 | 4.35% |\n| 2021 | $3,141.51B | $46,870 | 8.67% |\n| 2020 | $2,697.81B | $40,217 | -10.36% |\n| 2019 | $2,851.41B | $42,663 | 1.64% | [...] | 2018 | $2,871.34B | $43,204 | 1.40% |\n| 2017 | $2,680.15B | $40,572 | 2.66% |\n| 2016 | $2,689.11B | $40,985 | 1.92% |\n| 2015 | $2,927.91B | $44,964 | 2.22% |\n| 2014 | $3,064.71B | $47,440 | 3.20% |\n| 2013 | $2,784.85B | $43,426 | 1.79% |\n| 2012 | $2,707.09B | $42,497 | 1.51% |\n| 2011 | $2,663.81B | $42,110 | 1.15% |\n| 2010 | $2,485.48B | $39,599 | 2.24% |\n| 2009 | $2,412.84B | $38,744 | -4.62% |\n| 2008 | $2,929.41B | $47,396 | -0.23% |\n| 2007 | $3,090.51B | $50,398 | 2.62% | [...] | 2006 | $2,708.44B | $44,512 | 2.39% |\n| 2005 | $2,543.18B | $42,105 | 2.74% |\n| 2004 | $2,421.53B | $40,367 | 2.43% |\n| 2003 | $2,054.42B | $34,443 | 3.15% |\n| 2002 | $1,785.73B | $30,078 | 1.79% |\n| 2001 | $1,649.83B | $27,907 | 2.58% |\n| 2000 | $1,665.53B | $28,281 | 4.32% |\n| 1999 | $1,687.83B | $28,762 | 3.07% |\n| 1998 | $1,653.69B | $28,275 | 3.41% |\n| 1997 | $1,560.91B | $26,766 | 4.92% |\n| 1996 | $1,419.65B | $24,406 | 2.58% |\n| 1995 | $1,344.24B | $23,169 | 2.53% |', 'score': 0.8655088, 'raw_content': None}, {'url': 'https://www.statista.com/statistics/281744/gdp-of-the-united-kingdom/', 'title': 'GDP of the UK 1948-2024 - Statista', 'content': 'Read more\nGross domestic product of the United Kingdom from 1948 to 2023 (in million GBP)\ntable column chart\n| Characteristic | GDP in million GDP (CVM 2022)* |\n| --- | --- |\n| 2023 | 2,536,090 |\n| 2022 | 2,526,428 |\n| 2021 | 2,409,815 |\n| 2020 | 2,219,474 |\n| 2019 | 2,474,245 |\n| 2018 | 2,434,694 |\n| 2017 | 2,400,956 |\n| 2016 | 2,338,825 |\n| 2015 | 2,294,727 |\n| 2014 | 2,244,827 |\n| 2013 | 2,175,333 |\n| 2012 | 2,136,871 |\n| 2011 | 2,105,105 |\n| 2010 | 2,081,411 |\n| 2009 | 2,035,942 | [...] | 2008 | 2,134,571 |\n| 2007 | 2,139,895 |\n| 2006 | 2,085,162 |\n| 2005 | 2,036,675 |\n| 2004 | 1,982,500 |\n| 2003 | 1,934,941 |\n| 2002 | 1,875,809 |\n| 2001 | 1,842,720 |\n| 2000 | 1,796,500 |\n| 1999 | 1,721,748 |\n| 1998 | 1,670,654 |\n| 1997 | 1,615,678 |\n| 1996 | 1,539,846 |\n| 1995 | 1,501,088 |\n| 1994 | 1,466,101 |\n| 1993 | 1,417,763 |\n| 1992 | 1,386,437 |\n| 1991 | 1,383,043 |\n| 1990 | 1,402,748 |\n| 1989 | 1,394,928 |\n| 1988 | 1,362,204 |\n| 1987 | 1,292,703 |\n| 1986 | 1,226,237 | [...] | 1985 | 1,189,278 |\n| 1984 | 1,142,579 |\n| 1983 | 1,117,759 |\n| 1982 | 1,073,055 |\n| 1981 | 1,052,374 |\n| 1980 | 1,059,660 |\n| 1979 | 1,081,838 |\n| 1978 | 1,042,953 |\n| 1977 | 1,001,004 |\n| 1976 | 976,967 |\n| 1975 | 948,361 |\n| 1974 | 962,880 |\n| 1973 | 987,527 |\n| 1972 | 927,226 |\n| 1971 | 888,485 |\n| 1970 | 857,471 |\n| 1969 | 834,903 |\n| 1968 | 819,239 |\n| 1967 | 776,859 |\n| 1966 | 756,036 |\n| 1965 | 744,486 |\n| 1964 | 729,071 |\n| 1963 | 689,724 |\n| 1962 | 657,951 |\n| 1961 | 650,974 |', 'score': 0.8338803, 'raw_content': None}, {'url': 'https://fred.stlouisfed.org/tags/series?t=gdp%3Breal%3Bunited+kingdom', 'title': 'United Kingdom, GDP, Real - Economic Data Series - FRED', 'content': 'National Accounts: GDP by Expenditure: Constant Prices: Gross Fixed Capital Formation for United Kingdom\n\xa0\n\xa0\nSeasonally Adjusted\nPound Sterling, Quarterly\nQ1 1960 to Q3 2023 (2024-01-12)\nPound Sterling, Annual\n1960 to 2022 (2024-01-12)\nIndex 2015=100, Quarterly\nQ1 1960 to Q3 2023 (2024-01-12)\nGrowth rate previous period, Quarterly\nQ2 1955 to Q3 2024 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15) [...] 1956 to 2023 (Jan 15)\nPound Sterling, Annual\n1995 to 2022 (2024-01-12)\nGrowth rate previous period, Quarterly\nQ2 1955 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Annual\n1956 to 2023 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nReal GDP at Constant National Prices for United Kingdom\n\xa0\n\xa0\nMillions of 2017 U.S. Dollars, Annual, Not Seasonally Adjusted\n1950 to 2019 (2021-11-08) [...] Q1 1960 to Q3 2023 (2024-01-12)\nGrowth rate previous period, Annual\n1956 to 2023 (Jan 15)\nGrowth rate same period previous year, Quarterly\nQ1 1956 to Q3 2024 (Jan 15)\nGrowth rate same period previous year, Annual\n1956 to 2023 (Jan 15)\nIndex 2015=100, Annual\n1960 to 2022 (2024-01-12)\nReal Gross Domestic Product at Market Prices in the United Kingdom\n\xa0\n\xa0\nMillions of 1938 British Pounds, Monthly, Seasonally Adjusted\nJan 1920 to Dec 1938 (2016-07-07)', 'score': 0.67192334, 'raw_content': None}, {'url': 'https://fred.stlouisfed.org/series/UKNGDP', 'title': 'Gross Domestic Product for United Kingdom (UKNGDP) - FRED', 'content': 'Categories > International Data > Countries > United Kingdom\nGross Domestic Product for United Kingdom (UKNGDP)\nObservations\nQ3 2024: 712,652 | Millions of Pounds | Quarterly\nUpdated: Dec 23, 2024 2:46 PM CST\nNext Release Date: Feb 13, 2025\nObservations\nQ3 2024: 712,652\nUpdated: Dec 23, 2024 2:46 PM CST\nNext Release Date: Feb 13, 2025\nQ3 2024:\xa0712,652\xa0Q2 2024:\xa0704,470\xa0Q1 2024:\xa0697,617\xa0Q4 2023:\xa0685,749\xa0Q3 2023:\xa0685,035\xa0View All\nUnits:\nMillions of Pounds,\nSeasonally Adjusted\nFrequency:\nQuarterly', 'score': 0.65861565, 'raw_content': None}], 'response_time': 1.17}), HumanMessage(content='過去5年間の英国のGDPデータは以下の通りです(単位:百万ポンド):\n\n- **2019年**: 2,474,245\n- **2020年**: 2,219,474\n- **2021年**: 2,409,815\n- **2022年**: 2,526,428\n- **2023年**: 2,536,090\n\n次に、これらのデータをラインチャートにする準備をします。', additional_kwargs={}, response_metadata={}, name='researcher', id='f9f53a74-a442-40e2-becf-371c32e29cbd'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_wSA3Rm01aFhJGAmeuBo0xOif', 'function': {'arguments': '{"code":"import matplotlib.pyplot as plt\\n\\n# GDP data for the UK over the last 5 years\\nyears = [2019, 2020, 2021, 2022, 2023]\\nGDP = [2474245, 2219474, 2409815, 2526428, 2536090] # in million pounds\\n\\n# Create the line chart\\nplt.figure(figsize=(10, 5))\\nplt.plot(years, GDP, marker=\'o\')\\nplt.title(\'UK GDP Over the Last 5 Years\')\\nplt.xlabel(\'Year\')\\nplt.ylabel(\'GDP in Million Pounds\')\\nplt.grid()\\nplt.xticks(years)\\nplt.show()"}', 'name': 'python_repl_tool'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 168, 'prompt_tokens': 7625, 'total_tokens': 7793, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 2432}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_b8bc95a0ac', 'id': 'chatcmpl-BEnLGAFVCP4h8TGyXQtkq9is3D7Do', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-dccacb21-1f6f-442c-9308-2de019e85204-0', tool_calls=[{'name': 'python_repl_tool', 'args': {'code': "import matplotlib.pyplot as plt\n\n# GDP data for the UK over the last 5 years\nyears = [2019, 2020, 2021, 2022, 2023]\nGDP = [2474245, 2219474, 2409815, 2526428, 2536090] # in million pounds\n\n# Create the line chart\nplt.figure(figsize=(10, 5))\nplt.plot(years, GDP, marker='o')\nplt.title('UK GDP Over the Last 5 Years')\nplt.xlabel('Year')\nplt.ylabel('GDP in Million Pounds')\nplt.grid()\nplt.xticks(years)\nplt.show()"}, 'id': 'call_wSA3Rm01aFhJGAmeuBo0xOif', 'type': 'tool_call'}], usage_metadata={'input_tokens': 7625, 'output_tokens': 168, 'total_tokens': 7793, 'input_token_details': {'audio': 0, 'cache_read': 2432}, 'output_token_details': {'audio': 0, 'reasoning': 0}}), ToolMessage(content="正常に実行されました:\n```python\nimport matplotlib.pyplot as plt\n\n# GDP data for the UK over the last 5 years\nyears = [2019, 2020, 2021, 2022, 2023]\nGDP = [2474245, 2219474, 2409815, 2526428, 2536090] # in million pounds\n\n# Create the line chart\nplt.figure(figsize=(10, 5))\nplt.plot(years, GDP, marker='o')\nplt.title('UK GDP Over the Last 5 Years')\nplt.xlabel('Year')\nplt.ylabel('GDP in Million Pounds')\nplt.grid()\nplt.xticks(years)\nplt.show()\n```\n標準出力: \n\nすべてのタスクが完了した場合は、FINAL ANSWERと応答してください。", name='python_repl_tool', id='4a2611de-b701-494b-ba0e-2b4aec114537', tool_call_id='call_wSA3Rm01aFhJGAmeuBo0xOif'), HumanMessage(content='FINAL ANSWER\n\nUKの過去5年間のGDPデータを用いたラインチャートを作成しました。以下に示します。', additional_kwargs={}, response_metadata={}, name='chart_generator', id='bdd27c95-d1ab-45fe-b4bc-a1d17294c974')]}}
----
リクエストに応じて調査とチャート生成が行われています
トレースも取れています。