Skip to content

Multi-agent network

A single agent can usually operate effectively using a handful of tools within a single domain, but even using powerful models like gpt-4, it can be less effective at using many tools.

One way to approach complicated tasks is through a "divide-and-conquer" approach: create an specialized agent for each task or domain and route tasks to the correct "expert". This is an example of a multi-agent network architecture.

This notebook (inspired by the paper AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation, by Wu, et. al.) shows one way to do this using LangGraph.

The resulting graph will look something like the following diagram:

multi_agent diagram

Before we get started, a quick note: this and other multi-agent notebooks are designed to show how you can implement certain design patterns in LangGraph. If the pattern suits your needs, we recommend combining it with some of the other fundamental patterns described elsewhere in the docs for best performance.

Setup

First, let's install our required packages and set our API keys:

%%capture --no-stderr
%pip install -U langchain_community langchain_anthropic langchain_experimental matplotlib langgraph
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("ANTHROPIC_API_KEY")
_set_if_undefined("TAVILY_API_KEY")

Set up LangSmith for LangGraph development

Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started here.

Define tools

We will also define some tools that our agents will use in the future

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)

# Warning: This executes code locally, which can be unsafe when not sandboxed

repl = PythonREPL()


@tool
def python_repl_tool(
    code: Annotated[str, "The python code to execute to generate your chart."],
):
    """Use this to execute python code. If you want to see the output of a value,
    you should print it out with `print(...)`. This is visible to the user."""
    try:
        result = repl.run(code)
    except BaseException as e:
        return f"Failed to execute. Error: {repr(e)}"
    result_str = f"Successfully executed:\n\`\`\`python\n{code}\n\`\`\`\nStdout: {result}"
    return (
        result_str + "\n\nIf you have completed all tasks, respond with FINAL ANSWER."
    )
API Reference: TavilySearchResults | tool | PythonREPL

Create graph

Now that we've defined our tools and made some helper functions, will create the individual agents below and tell them how to talk to each other using LangGraph.

Define Agent Nodes

We now need to define the nodes.

First, we'll create a utility to create a system prompt for each agent.

def make_system_prompt(suffix: str) -> str:
    return (
        "You are a helpful AI assistant, collaborating with other assistants."
        " Use the provided tools to progress towards answering the question."
        " If you are unable to fully answer, that's OK, another assistant with different tools "
        " will help where you left off. Execute what you can to make progress."
        " If you or any of the other assistants have the final answer or deliverable,"
        " prefix your response with FINAL ANSWER so the team knows to stop."
        f"\n{suffix}"
    )
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic

from langgraph.prebuilt import create_react_agent
from langgraph.graph import MessagesState


llm = ChatAnthropic(model="claude-3-5-sonnet-latest")

# Research agent and node
research_agent = create_react_agent(
    llm,
    tools=[tavily_tool],
    state_modifier=make_system_prompt(
        "You can only do research. You are working with a chart generator colleague."
    ),
)


def research_node(state: MessagesState) -> MessagesState:
    result = research_agent.invoke(state)
    # wrap in a human message, as not all providers allow
    # AI message at the last position of the input messages list
    result["messages"][-1] = HumanMessage(
        content=result["messages"][-1].content, name="researcher"
    )
    return {
        # share internal message history of research agent with other agents
        "messages": result["messages"],
    }


# Chart generator agent and node
# NOTE: THIS PERFORMS ARBITRARY CODE EXECUTION, WHICH CAN BE UNSAFE WHEN NOT SANDBOXED
chart_agent = create_react_agent(
    llm,
    [python_repl_tool],
    state_modifier=make_system_prompt(
        "You can only generate charts. You are working with a researcher colleague."
    ),
)


def chart_node(state: MessagesState) -> MessagesState:
    result = chart_agent.invoke(state)
    # wrap in a human message, as not all providers allow
    # AI message at the last position of the input messages list
    result["messages"][-1] = HumanMessage(
        content=result["messages"][-1].content, name="chart_generator"
    )
    return {
        # share internal message history of chart agent with other agents
        "messages": result["messages"],
    }

Define Edge Logic

We can define some of the edge logic that is needed to decide what to do based on results of the agents

def router(state: MessagesState):
    # This is the router
    messages = state["messages"]
    last_message = messages[-1]
    if "FINAL ANSWER" in last_message.content:
        # Any agent decided the work is done
        return END
    return "continue"

Define the Graph

We can now put it all together and define the graph!

from langgraph.graph import StateGraph, START, END

workflow = StateGraph(MessagesState)
workflow.add_node("researcher", research_node)
workflow.add_node("chart_generator", chart_node)

workflow.add_conditional_edges(
    "researcher",
    router,
    {"continue": "chart_generator", END: END},
)
workflow.add_conditional_edges(
    "chart_generator",
    router,
    {"continue": "researcher", END: END},
)

workflow.add_edge(START, "researcher")
graph = workflow.compile()
API Reference: StateGraph | START | END
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

Invoke

With the graph created, you can invoke it! Let's have it chart some stats for us.

events = graph.stream(
    {
        "messages": [
            (
                "user",
                "First, get the UK's GDP over the past 5 years, then make a line chart of it. "
                "Once you make the chart, finish.",
            )
        ],
    },
    # Maximum number of steps to take in the graph
    {"recursion_limit": 150},
)
for s in events:
    print(s)
    print("----")
{'researcher': {'messages': [HumanMessage(content="First, get the UK's GDP over the past 5 years, then make a line chart of it. Once you make the chart, finish.", additional_kwargs={}, response_metadata={}, id='fa1f5e95-9e1a-47d4-b4b6-e93f345e339d'), AIMessage(content=[{'text': "I'll help search for the UK's GDP data over the past 5 years. Then my colleague can help create the line chart.", 'type': 'text'}, {'id': 'toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', 'input': {'query': 'UK GDP annual data past 5 years 2019-2023'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], additional_kwargs={}, response_metadata={'id': 'msg_014nCkfVHnG6LAsiS6pY7zcd', 'model': 'claude-3-5-sonnet-20241022', 'stop_reason': 'tool_use', 'stop_sequence': None, 'usage': {'input_tokens': 555, 'output_tokens': 101}}, id='run-e2297529-9972-4de6-835d-23d920b0e29b-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP annual data past 5 years 2019-2023'}, 'id': 'toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', 'type': 'tool_call'}], usage_metadata={'input_tokens': 555, 'output_tokens': 101, 'total_tokens': 656, 'input_token_details': {}}), ToolMessage(content='[{"url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product", "content": "Dollar figures for GDP are converted from domestic currencies using single year official exchange rates. For a few countries where the official exchange rate does not reflect the rate effectively applied to actual foreign exchange transactions, an alternative conversion factor is used. U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022."}, {"url": "https://www.statista.com/topics/3795/gdp-of-the-uk/", "content": "Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\\nContribution to GDP growth in the UK 2023, by sector\\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\\nGDP growth rate in the UK 1999-2021, by country\\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP growth of Scotland 2021, by local area\\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\\nGDP growth of Wales 2021, by local area\\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\\nGDP growth of Northern Ireland 2021, by local area\\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\\nGDP per capita\\nGDP per capita\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nAnnual GDP per capita growth in the UK 1956-2022\\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\\nQuarterly GDP per capita in the UK 2019-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nQuarterly GDP per capita growth in the UK 2019-2023\\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nGDP per capita of the UK 1999-2021, by country\\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGlobal Comparisons\\nGlobal Comparisons\\nCountries with the largest gross domestic product (GDP) 2022\\n Monthly GDP of the UK 2019-2023\\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\\nGVA of the UK 2022, by sector\\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\\nGDP of the UK 2021, by country\\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP of Scotland 2021, by local area\\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Wales 2021, by local area\\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Northern Ireland 2021, by local area\\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\\nGDP growth\\nGDP growth\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nQuarterly GDP growth of the UK 2019-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\\nMonthly GDP growth of the UK 2019-2023\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nUK GDP - Statistics & Facts\\nUK economy expected to shrink in 2023\\nCharacteristics of UK GDP\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nAnnual GDP growth in the UK 1949-2022\\nDetailed statistics\\nGDP per capita in the UK 1955-2022\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nKey Economic Indicators\\nMonthly GDP growth of the UK 2019-2023\\nKey Economic Indicators\\nMonthly GDP of the UK 2019-2023\\nKey Economic Indicators\\nContribution to GDP growth in the UK 2023, by sector\\nRelated topics\\nRecommended\\nRecommended statistics\\nGDP\\nGDP\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nQuarterly GDP of the UK 2019-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\\nGDP of European countries in 2022\\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\\nReal GDP growth rates in Europe 2023\\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"UK GDP\\" and take you straight to the corresponding statistics.\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB", "content": "GDP growth (annual %) - United Kingdom | Data - World Bank Data"}, {"url": "https://www.statista.com/topics/6500/the-british-economy/", "content": "Output per hour worked in the UK 1971 to 2023\\nEconomic output per hour worked in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (2019=100)\\nAnnual unemployment rate in the UK 2000-2028\\nAnnual unemployment rate in the United Kingdom from 2000 to 2028\\nInflation\\nInflation\\nInflation rate in the UK 1989-2023\\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom from January 1989 to October 2023\\nRPI inflation rate in the UK 1948-2023\\nInflation rate for the Retail Price Index (RPI) in the United Kingdom from June 1948 to October 2023\\nCPIH inflation rate in the UK 1989-2023\\nInflation rate for the Consumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from January 1989 to October 2023\\nPPI in the UK 2010-2023\\nProducer Price Index (PPI) in the United Kingdom from October 2010 to October 2023\\nCPI inflation rate in the UK 2023, by sector\\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom in October 2023, by sector\\nConsumer Price Index in the UK 1988-2023\\nConsumer Price Index (CPI) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\\nRetail Price Index in the UK 1987-2023\\nRetail Price Index (RPI) in the United Kingdom from 1st quarter 1987 to 3rd quarter 2023\\nConsumer Price Index including housing in the UK 1988-2023\\nConsumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\\nRPI annual inflation rate UK 2000-2028\\nAnnual inflation rate of the Retail Price Index in the United Kingdom from 2000 to 2028\\nCPI annual inflation rate UK 2000-2028\\nAnnual inflation rate of the Consumer Price Index in the United Kingdom from 2000 to 2028\\nGovernment finances\\nGovernment finances\\nGovernment spending as a percentage of GDP in the UK 1900-2029\\nTotal managed expenditure expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nGovernment revenue as a percentage of GDP in the UK 1900-2029\\nTotal public sector current receipts expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29 (in million GBP)\\nGovernment borrowing as a percentage of GDP in the UK 1900-2029\\nPublic sector borrowing expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nNational debt as a percentage of GDP in the UK 1900-2029\\nPublic sector net debt expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nPublic sector spending in the United Kingdom 2023/24\\nBudgeted public sector expenditure on services in the United Kingdom in 2023/24, by function (in billion GBP)\\nGovernment revenue sources in the United Kingdom 2023/24\\nExpected public sector current receipts in the United Kingdom in 2023/24, by function (in billion GBP)\\nBusiness Enterprise\\nBusiness Enterprise\\nLargest companies in the United Kingdom based on revenue 2022\\nLargest companies in the United Kingdom based on revenue in 2022 (in billion US dollars)\\nLargest UK companies based on number of global employees 2020\\nLargest companies based in the United Kingdom on number of employees worldwide in 2020 (in 1,000s)\\nNumber of private sector businesses in the UK 2000-2023\\nNumber of private sector businesses in the United Kingdom from 2000 to 2023 (in millions)\\nNumber of private sector businesses in the UK 2023, by sector\\nNumber of private sector businesses in the United Kingdom in 2023, by sector\\nNumber of businesses by enterprise size in the UK 2023\\nNumber of private sector businesses in the United Kingdom in 2023, by employment size\\nNumber of private sector businesses in the UK 2023, by region\\nNumber of private sector businesses in the United Kingdom in 2023, by region\\nNumber of local business units in the UK 2012-2023\\nNumber of local units in VAT and/or PAYE based enterprises in the United Kingdom from 2012 to 2023 (in millions)\\nBusiness investment index in the UK 1997-2023\\nBusiness investment index in the United Kingdom from 1st quarter 1997 to 2nd quarter 2023 (Q1 1997=100)\\nBusiness confidence Index in the UK 1977-2023\\nBusiness confidence Index of the United Kingdom from March 1977 to November 2023 (100 = long-term average)\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"The UK economy\\" and take you straight to the corresponding statistics.\\n Monthly GDP growth of the UK 2020-2023\\nMonthly growth of gross domestic product in the United Kingdom from January 2020 to September 2023\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nLabor Market\\nLabor Market\\nUnemployment rate of the UK 1971-2023\\nUnemployment rate in the United Kingdom from March 1971 to September 2023\\nEmployment rate in the UK 1971-2022\\nEmployment rate in the United Kingdom from March 1971 to July 2023\\nNumber of people unemployed in the UK 1971-2023\\nNumber of people unemployed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\\nNumber of people employed in the UK 1971-2021\\nNumber of people employed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\\nUnemployment rate in the UK 1971-2023, by gender\\nUnemployment rate in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023, by gender\\nUnemployment rate in the UK 1992-2023, by age group\\nUnemployment rate in the United Kingdom from May 1992 to July 2023, by age group\\nYouth unemployment rate in the UK 1992-2023\\nYouth unemployment rate in the United Kingdom from May 1992 to July 2023\\nAverage annual earnings for full-time employees in the UK 1999-2023\\nMedian annual earnings for full-time employees in the United Kingdom from 1999 to 2023 (in nominal GBP)\\nAverage weekly earning growth in the UK 2001-2023\\nAverage year-on-year growth of weekly earnings (3 month average) in the United Kingdom from March 2001 to October 2023\\nNumber of redundancies in the UK 1995-2023\\nAverage number of people made redundant in the United Kingdom from May 1995 to July 2023 (in 1,000s)\\nOverall weekly hours worked in the UK 1971-2023\\nOverall weekly hours worked for all employees in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (in million hours worked)\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nThe UK economy - Statistics & Facts\\nUK households under pressure in 2023\\nCoronavirus devastates UK economy in 2020\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nUnemployment rate of the UK 1971-2023\\nDetailed statistics\\nInflation rate in the UK 1989-2023\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nWages & Salaries\\nAverage weekly earning growth in the UK 2001-2023\\nIncome & Expenditure\\nPublic sector spending in the United Kingdom 2023/24\\nEmployment\\nNumber of people employed in the UK 1971-2021\\nRelated topics\\nRecommended\\nRecommended statistics\\nGross domestic product\\nGross domestic product\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nQuarterly GDP of the UK 1955-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in million GBP)\\nQuarterly GDP growth of the UK 2015-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2015 to 3rd quarter 2023\\nQuarterly GDP per capita in the UK 1955-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in GBP)\\nMonthly GDP of the UK 1997-2023\\nMonthly index of gross domestic product in the United Kingdom from January 1997 to September 2023 (2019=100)\\n GDP\\nAnnual GDP growth in the UK 1949-2022\\nQuarterly GDP per capita growth in the UK 2015-2023\\nMonthly GDP growth of the UK 2020-2023\\nGDP per capita in the UK 1955-2022\\nLabor market\\nNumber of people employed in the UK 1971-2021\\nNumber of people unemployed in the UK 1971-2023\\nDaily number of jobs furloughed in the UK 2020-2021\\nAverage annual earnings for full-time employees in the UK 1999-2023\\nForecasts for 2023\\nGDP growth forecast for the UK 2000-2028\\nAnnual unemployment rate in the UK 2000-2028\\nCPI annual inflation rate UK 2000-2028\\nRPI annual inflation rate UK 2000-2028\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false", "content": "GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser."}]', name='tavily_search_results_json', id='4c88089f-0ac4-4eeb-9141-722f0463b78d', tool_call_id='toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', artifact={'query': 'UK GDP annual data past 5 years 2019-2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'U.K. GDP 1960-2024 - Macrotrends', 'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product', 'content': 'Dollar figures for GDP are converted from domestic currencies using single year official exchange rates. For a few countries where the official exchange rate does not reflect the rate effectively applied to actual foreign exchange transactions, an alternative conversion factor is used. U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022.', 'score': 0.97675806, 'raw_content': None}, {'title': 'UK GDP - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/3795/gdp-of-the-uk/', 'content': 'Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\nContribution to GDP growth in the UK 2023, by sector\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\nGDP growth rate in the UK 1999-2021, by country\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP growth of Scotland 2021, by local area\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\nGDP growth of Wales 2021, by local area\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\nGDP growth of Northern Ireland 2021, by local area\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\nGDP per capita\nGDP per capita\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nAnnual GDP per capita growth in the UK 1956-2022\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\nQuarterly GDP per capita in the UK 2019-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nQuarterly GDP per capita growth in the UK 2019-2023\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nGDP per capita of the UK 1999-2021, by country\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGlobal Comparisons\nGlobal Comparisons\nCountries with the largest gross domestic product (GDP) 2022\n Monthly GDP of the UK 2019-2023\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\nGVA of the UK 2022, by sector\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\nGDP of the UK 2021, by country\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP of Scotland 2021, by local area\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\nGDP of Wales 2021, by local area\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\nGDP of Northern Ireland 2021, by local area\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\nGDP growth\nGDP growth\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nQuarterly GDP growth of the UK 2019-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\nMonthly GDP growth of the UK 2019-2023\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nUK GDP - Statistics & Facts\nUK economy expected to shrink in 2023\nCharacteristics of UK GDP\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nAnnual GDP growth in the UK 1949-2022\nDetailed statistics\nGDP per capita in the UK 1955-2022\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nKey Economic Indicators\nMonthly GDP growth of the UK 2019-2023\nKey Economic Indicators\nMonthly GDP of the UK 2019-2023\nKey Economic Indicators\nContribution to GDP growth in the UK 2023, by sector\nRelated topics\nRecommended\nRecommended statistics\nGDP\nGDP\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nQuarterly GDP of the UK 2019-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\nGDP of European countries in 2022\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\nReal GDP growth rates in Europe 2023\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "UK GDP" and take you straight to the corresponding statistics.\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.97057647, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB', 'content': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'score': 0.97052056, 'raw_content': None}, {'title': 'The UK economy - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/6500/the-british-economy/', 'content': 'Output per hour worked in the UK 1971 to 2023\nEconomic output per hour worked in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (2019=100)\nAnnual unemployment rate in the UK 2000-2028\nAnnual unemployment rate in the United Kingdom from 2000 to 2028\nInflation\nInflation\nInflation rate in the UK 1989-2023\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom from January 1989 to October 2023\nRPI inflation rate in the UK 1948-2023\nInflation rate for the Retail Price Index (RPI) in the United Kingdom from June 1948 to October 2023\nCPIH inflation rate in the UK 1989-2023\nInflation rate for the Consumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from January 1989 to October 2023\nPPI in the UK 2010-2023\nProducer Price Index (PPI) in the United Kingdom from October 2010 to October 2023\nCPI inflation rate in the UK 2023, by sector\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom in October 2023, by sector\nConsumer Price Index in the UK 1988-2023\nConsumer Price Index (CPI) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\nRetail Price Index in the UK 1987-2023\nRetail Price Index (RPI) in the United Kingdom from 1st quarter 1987 to 3rd quarter 2023\nConsumer Price Index including housing in the UK 1988-2023\nConsumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\nRPI annual inflation rate UK 2000-2028\nAnnual inflation rate of the Retail Price Index in the United Kingdom from 2000 to 2028\nCPI annual inflation rate UK 2000-2028\nAnnual inflation rate of the Consumer Price Index in the United Kingdom from 2000 to 2028\nGovernment finances\nGovernment finances\nGovernment spending as a percentage of GDP in the UK 1900-2029\nTotal managed expenditure expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nGovernment revenue as a percentage of GDP in the UK 1900-2029\nTotal public sector current receipts expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29 (in million GBP)\nGovernment borrowing as a percentage of GDP in the UK 1900-2029\nPublic sector borrowing expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nNational debt as a percentage of GDP in the UK 1900-2029\nPublic sector net debt expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nPublic sector spending in the United Kingdom 2023/24\nBudgeted public sector expenditure on services in the United Kingdom in 2023/24, by function (in billion GBP)\nGovernment revenue sources in the United Kingdom 2023/24\nExpected public sector current receipts in the United Kingdom in 2023/24, by function (in billion GBP)\nBusiness Enterprise\nBusiness Enterprise\nLargest companies in the United Kingdom based on revenue 2022\nLargest companies in the United Kingdom based on revenue in 2022 (in billion US dollars)\nLargest UK companies based on number of global employees 2020\nLargest companies based in the United Kingdom on number of employees worldwide in 2020 (in 1,000s)\nNumber of private sector businesses in the UK 2000-2023\nNumber of private sector businesses in the United Kingdom from 2000 to 2023 (in millions)\nNumber of private sector businesses in the UK 2023, by sector\nNumber of private sector businesses in the United Kingdom in 2023, by sector\nNumber of businesses by enterprise size in the UK 2023\nNumber of private sector businesses in the United Kingdom in 2023, by employment size\nNumber of private sector businesses in the UK 2023, by region\nNumber of private sector businesses in the United Kingdom in 2023, by region\nNumber of local business units in the UK 2012-2023\nNumber of local units in VAT and/or PAYE based enterprises in the United Kingdom from 2012 to 2023 (in millions)\nBusiness investment index in the UK 1997-2023\nBusiness investment index in the United Kingdom from 1st quarter 1997 to 2nd quarter 2023 (Q1 1997=100)\nBusiness confidence Index in the UK 1977-2023\nBusiness confidence Index of the United Kingdom from March 1977 to November 2023 (100 = long-term average)\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "The UK economy" and take you straight to the corresponding statistics.\n Monthly GDP growth of the UK 2020-2023\nMonthly growth of gross domestic product in the United Kingdom from January 2020 to September 2023\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nLabor Market\nLabor Market\nUnemployment rate of the UK 1971-2023\nUnemployment rate in the United Kingdom from March 1971 to September 2023\nEmployment rate in the UK 1971-2022\nEmployment rate in the United Kingdom from March 1971 to July 2023\nNumber of people unemployed in the UK 1971-2023\nNumber of people unemployed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\nNumber of people employed in the UK 1971-2021\nNumber of people employed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\nUnemployment rate in the UK 1971-2023, by gender\nUnemployment rate in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023, by gender\nUnemployment rate in the UK 1992-2023, by age group\nUnemployment rate in the United Kingdom from May 1992 to July 2023, by age group\nYouth unemployment rate in the UK 1992-2023\nYouth unemployment rate in the United Kingdom from May 1992 to July 2023\nAverage annual earnings for full-time employees in the UK 1999-2023\nMedian annual earnings for full-time employees in the United Kingdom from 1999 to 2023 (in nominal GBP)\nAverage weekly earning growth in the UK 2001-2023\nAverage year-on-year growth of weekly earnings (3 month average) in the United Kingdom from March 2001 to October 2023\nNumber of redundancies in the UK 1995-2023\nAverage number of people made redundant in the United Kingdom from May 1995 to July 2023 (in 1,000s)\nOverall weekly hours worked in the UK 1971-2023\nOverall weekly hours worked for all employees in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (in million hours worked)\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nThe UK economy - Statistics & Facts\nUK households under pressure in 2023\nCoronavirus devastates UK economy in 2020\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nUnemployment rate of the UK 1971-2023\nDetailed statistics\nInflation rate in the UK 1989-2023\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nWages & Salaries\nAverage weekly earning growth in the UK 2001-2023\nIncome & Expenditure\nPublic sector spending in the United Kingdom 2023/24\nEmployment\nNumber of people employed in the UK 1971-2021\nRelated topics\nRecommended\nRecommended statistics\nGross domestic product\nGross domestic product\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nQuarterly GDP of the UK 1955-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in million GBP)\nQuarterly GDP growth of the UK 2015-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2015 to 3rd quarter 2023\nQuarterly GDP per capita in the UK 1955-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in GBP)\nMonthly GDP of the UK 1997-2023\nMonthly index of gross domestic product in the United Kingdom from January 1997 to September 2023 (2019=100)\n GDP\nAnnual GDP growth in the UK 1949-2022\nQuarterly GDP per capita growth in the UK 2015-2023\nMonthly GDP growth of the UK 2020-2023\nGDP per capita in the UK 1955-2022\nLabor market\nNumber of people employed in the UK 1971-2021\nNumber of people unemployed in the UK 1971-2023\nDaily number of jobs furloughed in the UK 2020-2021\nAverage annual earnings for full-time employees in the UK 1999-2023\nForecasts for 2023\nGDP growth forecast for the UK 2000-2028\nAnnual unemployment rate in the UK 2000-2028\nCPI annual inflation rate UK 2000-2028\nRPI annual inflation rate UK 2000-2028\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.95998776, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false', 'content': 'GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser.', 'score': 0.7892337, 'raw_content': None}], 'response_time': 2.3}), AIMessage(content=[{'text': 'Let me search for more specific data.', 'type': 'text'}, {'id': 'toolu_019dPRXojLJoVNYFLzzSWw4w', 'input': {'query': 'UK GDP values by year 2019 2020 2021 2022 2023'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], additional_kwargs={}, response_metadata={'id': 'msg_01Ac9vcTFneb5dvcEYXJyf1P', 'model': 'claude-3-5-sonnet-20241022', 'stop_reason': 'tool_use', 'stop_sequence': None, 'usage': {'input_tokens': 5890, 'output_tokens': 87}}, id='run-3504417f-c0b5-4908-82e2-89a18abb1b8e-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP values by year 2019 2020 2021 2022 2023'}, 'id': 'toolu_019dPRXojLJoVNYFLzzSWw4w', 'type': 'tool_call'}], usage_metadata={'input_tokens': 5890, 'output_tokens': 87, 'total_tokens': 5977, 'input_token_details': {}}), ToolMessage(content='[{"url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product", "content": "U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022. U.K. gdp for 2022 was $3,088.84B, a 1.68% decline from 2021. U.K. gdp for 2021 was $3,141.51B, a 16.45% increase from 2020. U.K. gdp for 2020 was $2,697.81B, a 5.39% decline from 2019."}, {"url": "https://countryeconomy.com/gdp/uk?year=2023", "content": "Gross Domestic Product of United Kingdom grew 0.3% in 2023 compared to last year. This rate is 45 -tenths of one percent less than the figure of 4.8% published in 2022. The GDP figure in 2023 was $3,380,855 million, leaving United Kingdom placed 6th in the ranking of GDP of the 196 countries that we publish."}, {"url": "https://www.statista.com/topics/3795/gdp-of-the-uk/", "content": "Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\\nContribution to GDP growth in the UK 2023, by sector\\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\\nGDP growth rate in the UK 1999-2021, by country\\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP growth of Scotland 2021, by local area\\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\\nGDP growth of Wales 2021, by local area\\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\\nGDP growth of Northern Ireland 2021, by local area\\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\\nGDP per capita\\nGDP per capita\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nAnnual GDP per capita growth in the UK 1956-2022\\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\\nQuarterly GDP per capita in the UK 2019-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nQuarterly GDP per capita growth in the UK 2019-2023\\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nGDP per capita of the UK 1999-2021, by country\\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGlobal Comparisons\\nGlobal Comparisons\\nCountries with the largest gross domestic product (GDP) 2022\\n Monthly GDP of the UK 2019-2023\\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\\nGVA of the UK 2022, by sector\\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\\nGDP of the UK 2021, by country\\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP of Scotland 2021, by local area\\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Wales 2021, by local area\\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Northern Ireland 2021, by local area\\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\\nGDP growth\\nGDP growth\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nQuarterly GDP growth of the UK 2019-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\\nMonthly GDP growth of the UK 2019-2023\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nUK GDP - Statistics & Facts\\nUK economy expected to shrink in 2023\\nCharacteristics of UK GDP\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nAnnual GDP growth in the UK 1949-2022\\nDetailed statistics\\nGDP per capita in the UK 1955-2022\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nKey Economic Indicators\\nMonthly GDP growth of the UK 2019-2023\\nKey Economic Indicators\\nMonthly GDP of the UK 2019-2023\\nKey Economic Indicators\\nContribution to GDP growth in the UK 2023, by sector\\nRelated topics\\nRecommended\\nRecommended statistics\\nGDP\\nGDP\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nQuarterly GDP of the UK 2019-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\\nGDP of European countries in 2022\\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\\nReal GDP growth rates in Europe 2023\\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"UK GDP\\" and take you straight to the corresponding statistics.\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp/compendium/unitedkingdomnationalaccountsthebluebook/2024/nationalaccountsataglance", "content": "Real gross domestic product (GDP) is estimated to have increased by 0.3% in 2023, following a recovery from the impacts of the coronavirus (COVID-19) pandemic over the two previous years (Figure 1). Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP). Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP) per head. Download this chart Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false", "content": "GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser."}]', name='tavily_search_results_json', id='84c571ca-27c6-4023-93a2-f0c2e8b6abb0', tool_call_id='toolu_019dPRXojLJoVNYFLzzSWw4w', artifact={'query': 'UK GDP values by year 2019 2020 2021 2022 2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'U.K. GDP 1960-2024 - Macrotrends', 'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product', 'content': 'U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022. U.K. gdp for 2022 was $3,088.84B, a 1.68% decline from 2021. U.K. gdp for 2021 was $3,141.51B, a 16.45% increase from 2020. U.K. gdp for 2020 was $2,697.81B, a 5.39% decline from 2019.', 'score': 0.9974491, 'raw_content': None}, {'title': 'United Kingdom (UK) GDP - Gross Domestic Product 2023', 'url': 'https://countryeconomy.com/gdp/uk?year=2023', 'content': 'Gross Domestic Product of United Kingdom grew 0.3% in 2023 compared to last year. This rate is 45 -tenths of one percent less than the figure of 4.8% published in 2022. The GDP figure in 2023 was $3,380,855 million, leaving United Kingdom placed 6th in the ranking of GDP of the 196 countries that we publish.', 'score': 0.9964064, 'raw_content': None}, {'title': 'UK GDP - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/3795/gdp-of-the-uk/', 'content': 'Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\nContribution to GDP growth in the UK 2023, by sector\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\nGDP growth rate in the UK 1999-2021, by country\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP growth of Scotland 2021, by local area\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\nGDP growth of Wales 2021, by local area\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\nGDP growth of Northern Ireland 2021, by local area\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\nGDP per capita\nGDP per capita\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nAnnual GDP per capita growth in the UK 1956-2022\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\nQuarterly GDP per capita in the UK 2019-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nQuarterly GDP per capita growth in the UK 2019-2023\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nGDP per capita of the UK 1999-2021, by country\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGlobal Comparisons\nGlobal Comparisons\nCountries with the largest gross domestic product (GDP) 2022\n Monthly GDP of the UK 2019-2023\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\nGVA of the UK 2022, by sector\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\nGDP of the UK 2021, by country\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP of Scotland 2021, by local area\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\nGDP of Wales 2021, by local area\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\nGDP of Northern Ireland 2021, by local area\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\nGDP growth\nGDP growth\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nQuarterly GDP growth of the UK 2019-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\nMonthly GDP growth of the UK 2019-2023\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nUK GDP - Statistics & Facts\nUK economy expected to shrink in 2023\nCharacteristics of UK GDP\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nAnnual GDP growth in the UK 1949-2022\nDetailed statistics\nGDP per capita in the UK 1955-2022\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nKey Economic Indicators\nMonthly GDP growth of the UK 2019-2023\nKey Economic Indicators\nMonthly GDP of the UK 2019-2023\nKey Economic Indicators\nContribution to GDP growth in the UK 2023, by sector\nRelated topics\nRecommended\nRecommended statistics\nGDP\nGDP\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nQuarterly GDP of the UK 2019-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\nGDP of European countries in 2022\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\nReal GDP growth rates in Europe 2023\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "UK GDP" and take you straight to the corresponding statistics.\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.97943294, 'raw_content': None}, {'title': 'National accounts at a glance - Office for National Statistics', 'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp/compendium/unitedkingdomnationalaccountsthebluebook/2024/nationalaccountsataglance', 'content': 'Real gross domestic product (GDP) is estimated to have increased by 0.3% in 2023, following a recovery from the impacts of the coronavirus (COVID-19) pandemic over the two previous years (Figure 1). Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP). Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP) per head. Download this chart Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK', 'score': 0.975249, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false', 'content': 'GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser.', 'score': 0.83775276, 'raw_content': None}], 'response_time': 2.37}), HumanMessage(content='Based on the search results, I can provide the UK\'s GDP values for the past 5 years (in billions of US dollars):\n\n2019: $2,851.54\n2020: $2,697.81\n2021: $3,141.51\n2022: $3,088.84\n2023: $3,340.03\n\nI\'ll pass this data to my chart generator colleague to create a line chart. They should create a line chart with:\n- Years 2019-2023 on the x-axis\n- GDP values in billions USD on the y-axis\n- Title: "UK GDP 2019-2023"\n- Clear data points showing the values\n\nOver to you, chart generator colleague!', additional_kwargs={}, response_metadata={}, name='researcher', id='7e790b7a-7b06-4b45-a595-8736b53db844')]}}
----
``````output
Python REPL can execute arbitrary code. Use with caution.
{'chart_generator': {'messages': [HumanMessage(content="First, get the UK's GDP over the past 5 years, then make a line chart of it. Once you make the chart, finish.", additional_kwargs={}, response_metadata={}, id='fa1f5e95-9e1a-47d4-b4b6-e93f345e339d'), AIMessage(content=[{'text': "I'll help search for the UK's GDP data over the past 5 years. Then my colleague can help create the line chart.", 'type': 'text'}, {'id': 'toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', 'input': {'query': 'UK GDP annual data past 5 years 2019-2023'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], additional_kwargs={}, response_metadata={'id': 'msg_014nCkfVHnG6LAsiS6pY7zcd', 'model': 'claude-3-5-sonnet-20241022', 'stop_reason': 'tool_use', 'stop_sequence': None, 'usage': {'input_tokens': 555, 'output_tokens': 101}}, id='run-e2297529-9972-4de6-835d-23d920b0e29b-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP annual data past 5 years 2019-2023'}, 'id': 'toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', 'type': 'tool_call'}], usage_metadata={'input_tokens': 555, 'output_tokens': 101, 'total_tokens': 656, 'input_token_details': {}}), ToolMessage(content='[{"url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product", "content": "Dollar figures for GDP are converted from domestic currencies using single year official exchange rates. For a few countries where the official exchange rate does not reflect the rate effectively applied to actual foreign exchange transactions, an alternative conversion factor is used. U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022."}, {"url": "https://www.statista.com/topics/3795/gdp-of-the-uk/", "content": "Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\\nContribution to GDP growth in the UK 2023, by sector\\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\\nGDP growth rate in the UK 1999-2021, by country\\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP growth of Scotland 2021, by local area\\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\\nGDP growth of Wales 2021, by local area\\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\\nGDP growth of Northern Ireland 2021, by local area\\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\\nGDP per capita\\nGDP per capita\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nAnnual GDP per capita growth in the UK 1956-2022\\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\\nQuarterly GDP per capita in the UK 2019-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nQuarterly GDP per capita growth in the UK 2019-2023\\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nGDP per capita of the UK 1999-2021, by country\\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGlobal Comparisons\\nGlobal Comparisons\\nCountries with the largest gross domestic product (GDP) 2022\\n Monthly GDP of the UK 2019-2023\\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\\nGVA of the UK 2022, by sector\\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\\nGDP of the UK 2021, by country\\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP of Scotland 2021, by local area\\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Wales 2021, by local area\\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Northern Ireland 2021, by local area\\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\\nGDP growth\\nGDP growth\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nQuarterly GDP growth of the UK 2019-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\\nMonthly GDP growth of the UK 2019-2023\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nUK GDP - Statistics & Facts\\nUK economy expected to shrink in 2023\\nCharacteristics of UK GDP\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nAnnual GDP growth in the UK 1949-2022\\nDetailed statistics\\nGDP per capita in the UK 1955-2022\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nKey Economic Indicators\\nMonthly GDP growth of the UK 2019-2023\\nKey Economic Indicators\\nMonthly GDP of the UK 2019-2023\\nKey Economic Indicators\\nContribution to GDP growth in the UK 2023, by sector\\nRelated topics\\nRecommended\\nRecommended statistics\\nGDP\\nGDP\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nQuarterly GDP of the UK 2019-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\\nGDP of European countries in 2022\\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\\nReal GDP growth rates in Europe 2023\\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"UK GDP\\" and take you straight to the corresponding statistics.\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB", "content": "GDP growth (annual %) - United Kingdom | Data - World Bank Data"}, {"url": "https://www.statista.com/topics/6500/the-british-economy/", "content": "Output per hour worked in the UK 1971 to 2023\\nEconomic output per hour worked in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (2019=100)\\nAnnual unemployment rate in the UK 2000-2028\\nAnnual unemployment rate in the United Kingdom from 2000 to 2028\\nInflation\\nInflation\\nInflation rate in the UK 1989-2023\\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom from January 1989 to October 2023\\nRPI inflation rate in the UK 1948-2023\\nInflation rate for the Retail Price Index (RPI) in the United Kingdom from June 1948 to October 2023\\nCPIH inflation rate in the UK 1989-2023\\nInflation rate for the Consumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from January 1989 to October 2023\\nPPI in the UK 2010-2023\\nProducer Price Index (PPI) in the United Kingdom from October 2010 to October 2023\\nCPI inflation rate in the UK 2023, by sector\\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom in October 2023, by sector\\nConsumer Price Index in the UK 1988-2023\\nConsumer Price Index (CPI) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\\nRetail Price Index in the UK 1987-2023\\nRetail Price Index (RPI) in the United Kingdom from 1st quarter 1987 to 3rd quarter 2023\\nConsumer Price Index including housing in the UK 1988-2023\\nConsumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\\nRPI annual inflation rate UK 2000-2028\\nAnnual inflation rate of the Retail Price Index in the United Kingdom from 2000 to 2028\\nCPI annual inflation rate UK 2000-2028\\nAnnual inflation rate of the Consumer Price Index in the United Kingdom from 2000 to 2028\\nGovernment finances\\nGovernment finances\\nGovernment spending as a percentage of GDP in the UK 1900-2029\\nTotal managed expenditure expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nGovernment revenue as a percentage of GDP in the UK 1900-2029\\nTotal public sector current receipts expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29 (in million GBP)\\nGovernment borrowing as a percentage of GDP in the UK 1900-2029\\nPublic sector borrowing expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nNational debt as a percentage of GDP in the UK 1900-2029\\nPublic sector net debt expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\\nPublic sector spending in the United Kingdom 2023/24\\nBudgeted public sector expenditure on services in the United Kingdom in 2023/24, by function (in billion GBP)\\nGovernment revenue sources in the United Kingdom 2023/24\\nExpected public sector current receipts in the United Kingdom in 2023/24, by function (in billion GBP)\\nBusiness Enterprise\\nBusiness Enterprise\\nLargest companies in the United Kingdom based on revenue 2022\\nLargest companies in the United Kingdom based on revenue in 2022 (in billion US dollars)\\nLargest UK companies based on number of global employees 2020\\nLargest companies based in the United Kingdom on number of employees worldwide in 2020 (in 1,000s)\\nNumber of private sector businesses in the UK 2000-2023\\nNumber of private sector businesses in the United Kingdom from 2000 to 2023 (in millions)\\nNumber of private sector businesses in the UK 2023, by sector\\nNumber of private sector businesses in the United Kingdom in 2023, by sector\\nNumber of businesses by enterprise size in the UK 2023\\nNumber of private sector businesses in the United Kingdom in 2023, by employment size\\nNumber of private sector businesses in the UK 2023, by region\\nNumber of private sector businesses in the United Kingdom in 2023, by region\\nNumber of local business units in the UK 2012-2023\\nNumber of local units in VAT and/or PAYE based enterprises in the United Kingdom from 2012 to 2023 (in millions)\\nBusiness investment index in the UK 1997-2023\\nBusiness investment index in the United Kingdom from 1st quarter 1997 to 2nd quarter 2023 (Q1 1997=100)\\nBusiness confidence Index in the UK 1977-2023\\nBusiness confidence Index of the United Kingdom from March 1977 to November 2023 (100 = long-term average)\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"The UK economy\\" and take you straight to the corresponding statistics.\\n Monthly GDP growth of the UK 2020-2023\\nMonthly growth of gross domestic product in the United Kingdom from January 2020 to September 2023\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nLabor Market\\nLabor Market\\nUnemployment rate of the UK 1971-2023\\nUnemployment rate in the United Kingdom from March 1971 to September 2023\\nEmployment rate in the UK 1971-2022\\nEmployment rate in the United Kingdom from March 1971 to July 2023\\nNumber of people unemployed in the UK 1971-2023\\nNumber of people unemployed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\\nNumber of people employed in the UK 1971-2021\\nNumber of people employed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\\nUnemployment rate in the UK 1971-2023, by gender\\nUnemployment rate in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023, by gender\\nUnemployment rate in the UK 1992-2023, by age group\\nUnemployment rate in the United Kingdom from May 1992 to July 2023, by age group\\nYouth unemployment rate in the UK 1992-2023\\nYouth unemployment rate in the United Kingdom from May 1992 to July 2023\\nAverage annual earnings for full-time employees in the UK 1999-2023\\nMedian annual earnings for full-time employees in the United Kingdom from 1999 to 2023 (in nominal GBP)\\nAverage weekly earning growth in the UK 2001-2023\\nAverage year-on-year growth of weekly earnings (3 month average) in the United Kingdom from March 2001 to October 2023\\nNumber of redundancies in the UK 1995-2023\\nAverage number of people made redundant in the United Kingdom from May 1995 to July 2023 (in 1,000s)\\nOverall weekly hours worked in the UK 1971-2023\\nOverall weekly hours worked for all employees in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (in million hours worked)\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nThe UK economy - Statistics & Facts\\nUK households under pressure in 2023\\nCoronavirus devastates UK economy in 2020\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nUnemployment rate of the UK 1971-2023\\nDetailed statistics\\nInflation rate in the UK 1989-2023\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nWages & Salaries\\nAverage weekly earning growth in the UK 2001-2023\\nIncome & Expenditure\\nPublic sector spending in the United Kingdom 2023/24\\nEmployment\\nNumber of people employed in the UK 1971-2021\\nRelated topics\\nRecommended\\nRecommended statistics\\nGross domestic product\\nGross domestic product\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nQuarterly GDP of the UK 1955-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in million GBP)\\nQuarterly GDP growth of the UK 2015-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2015 to 3rd quarter 2023\\nQuarterly GDP per capita in the UK 1955-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in GBP)\\nMonthly GDP of the UK 1997-2023\\nMonthly index of gross domestic product in the United Kingdom from January 1997 to September 2023 (2019=100)\\n GDP\\nAnnual GDP growth in the UK 1949-2022\\nQuarterly GDP per capita growth in the UK 2015-2023\\nMonthly GDP growth of the UK 2020-2023\\nGDP per capita in the UK 1955-2022\\nLabor market\\nNumber of people employed in the UK 1971-2021\\nNumber of people unemployed in the UK 1971-2023\\nDaily number of jobs furloughed in the UK 2020-2021\\nAverage annual earnings for full-time employees in the UK 1999-2023\\nForecasts for 2023\\nGDP growth forecast for the UK 2000-2028\\nAnnual unemployment rate in the UK 2000-2028\\nCPI annual inflation rate UK 2000-2028\\nRPI annual inflation rate UK 2000-2028\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false", "content": "GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser."}]', name='tavily_search_results_json', id='4c88089f-0ac4-4eeb-9141-722f0463b78d', tool_call_id='toolu_01Jd9dxa4Ss2NhzBhCuwUX3E', artifact={'query': 'UK GDP annual data past 5 years 2019-2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'U.K. GDP 1960-2024 - Macrotrends', 'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product', 'content': 'Dollar figures for GDP are converted from domestic currencies using single year official exchange rates. For a few countries where the official exchange rate does not reflect the rate effectively applied to actual foreign exchange transactions, an alternative conversion factor is used. U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022.', 'score': 0.97675806, 'raw_content': None}, {'title': 'UK GDP - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/3795/gdp-of-the-uk/', 'content': 'Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\nContribution to GDP growth in the UK 2023, by sector\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\nGDP growth rate in the UK 1999-2021, by country\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP growth of Scotland 2021, by local area\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\nGDP growth of Wales 2021, by local area\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\nGDP growth of Northern Ireland 2021, by local area\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\nGDP per capita\nGDP per capita\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nAnnual GDP per capita growth in the UK 1956-2022\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\nQuarterly GDP per capita in the UK 2019-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nQuarterly GDP per capita growth in the UK 2019-2023\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nGDP per capita of the UK 1999-2021, by country\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGlobal Comparisons\nGlobal Comparisons\nCountries with the largest gross domestic product (GDP) 2022\n Monthly GDP of the UK 2019-2023\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\nGVA of the UK 2022, by sector\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\nGDP of the UK 2021, by country\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP of Scotland 2021, by local area\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\nGDP of Wales 2021, by local area\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\nGDP of Northern Ireland 2021, by local area\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\nGDP growth\nGDP growth\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nQuarterly GDP growth of the UK 2019-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\nMonthly GDP growth of the UK 2019-2023\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nUK GDP - Statistics & Facts\nUK economy expected to shrink in 2023\nCharacteristics of UK GDP\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nAnnual GDP growth in the UK 1949-2022\nDetailed statistics\nGDP per capita in the UK 1955-2022\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nKey Economic Indicators\nMonthly GDP growth of the UK 2019-2023\nKey Economic Indicators\nMonthly GDP of the UK 2019-2023\nKey Economic Indicators\nContribution to GDP growth in the UK 2023, by sector\nRelated topics\nRecommended\nRecommended statistics\nGDP\nGDP\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nQuarterly GDP of the UK 2019-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\nGDP of European countries in 2022\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\nReal GDP growth rates in Europe 2023\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "UK GDP" and take you straight to the corresponding statistics.\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.97057647, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB', 'content': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'score': 0.97052056, 'raw_content': None}, {'title': 'The UK economy - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/6500/the-british-economy/', 'content': 'Output per hour worked in the UK 1971 to 2023\nEconomic output per hour worked in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (2019=100)\nAnnual unemployment rate in the UK 2000-2028\nAnnual unemployment rate in the United Kingdom from 2000 to 2028\nInflation\nInflation\nInflation rate in the UK 1989-2023\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom from January 1989 to October 2023\nRPI inflation rate in the UK 1948-2023\nInflation rate for the Retail Price Index (RPI) in the United Kingdom from June 1948 to October 2023\nCPIH inflation rate in the UK 1989-2023\nInflation rate for the Consumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from January 1989 to October 2023\nPPI in the UK 2010-2023\nProducer Price Index (PPI) in the United Kingdom from October 2010 to October 2023\nCPI inflation rate in the UK 2023, by sector\nInflation rate for the Consumer Price Index (CPI) in the United Kingdom in October 2023, by sector\nConsumer Price Index in the UK 1988-2023\nConsumer Price Index (CPI) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\nRetail Price Index in the UK 1987-2023\nRetail Price Index (RPI) in the United Kingdom from 1st quarter 1987 to 3rd quarter 2023\nConsumer Price Index including housing in the UK 1988-2023\nConsumer Price Index including owner occupiers\' housing costs (CPIH) in the United Kingdom from 1st quarter 1988 to 3rd quarter 2023\nRPI annual inflation rate UK 2000-2028\nAnnual inflation rate of the Retail Price Index in the United Kingdom from 2000 to 2028\nCPI annual inflation rate UK 2000-2028\nAnnual inflation rate of the Consumer Price Index in the United Kingdom from 2000 to 2028\nGovernment finances\nGovernment finances\nGovernment spending as a percentage of GDP in the UK 1900-2029\nTotal managed expenditure expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nGovernment revenue as a percentage of GDP in the UK 1900-2029\nTotal public sector current receipts expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29 (in million GBP)\nGovernment borrowing as a percentage of GDP in the UK 1900-2029\nPublic sector borrowing expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nNational debt as a percentage of GDP in the UK 1900-2029\nPublic sector net debt expressed as a percentage of GDP in the United Kingdom from 1900/01 to 2028/29\nPublic sector spending in the United Kingdom 2023/24\nBudgeted public sector expenditure on services in the United Kingdom in 2023/24, by function (in billion GBP)\nGovernment revenue sources in the United Kingdom 2023/24\nExpected public sector current receipts in the United Kingdom in 2023/24, by function (in billion GBP)\nBusiness Enterprise\nBusiness Enterprise\nLargest companies in the United Kingdom based on revenue 2022\nLargest companies in the United Kingdom based on revenue in 2022 (in billion US dollars)\nLargest UK companies based on number of global employees 2020\nLargest companies based in the United Kingdom on number of employees worldwide in 2020 (in 1,000s)\nNumber of private sector businesses in the UK 2000-2023\nNumber of private sector businesses in the United Kingdom from 2000 to 2023 (in millions)\nNumber of private sector businesses in the UK 2023, by sector\nNumber of private sector businesses in the United Kingdom in 2023, by sector\nNumber of businesses by enterprise size in the UK 2023\nNumber of private sector businesses in the United Kingdom in 2023, by employment size\nNumber of private sector businesses in the UK 2023, by region\nNumber of private sector businesses in the United Kingdom in 2023, by region\nNumber of local business units in the UK 2012-2023\nNumber of local units in VAT and/or PAYE based enterprises in the United Kingdom from 2012 to 2023 (in millions)\nBusiness investment index in the UK 1997-2023\nBusiness investment index in the United Kingdom from 1st quarter 1997 to 2nd quarter 2023 (Q1 1997=100)\nBusiness confidence Index in the UK 1977-2023\nBusiness confidence Index of the United Kingdom from March 1977 to November 2023 (100 = long-term average)\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "The UK economy" and take you straight to the corresponding statistics.\n Monthly GDP growth of the UK 2020-2023\nMonthly growth of gross domestic product in the United Kingdom from January 2020 to September 2023\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nLabor Market\nLabor Market\nUnemployment rate of the UK 1971-2023\nUnemployment rate in the United Kingdom from March 1971 to September 2023\nEmployment rate in the UK 1971-2022\nEmployment rate in the United Kingdom from March 1971 to July 2023\nNumber of people unemployed in the UK 1971-2023\nNumber of people unemployed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\nNumber of people employed in the UK 1971-2021\nNumber of people employed in the United Kingdom from March 1971 to July 2023 (in 1,000s)\nUnemployment rate in the UK 1971-2023, by gender\nUnemployment rate in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023, by gender\nUnemployment rate in the UK 1992-2023, by age group\nUnemployment rate in the United Kingdom from May 1992 to July 2023, by age group\nYouth unemployment rate in the UK 1992-2023\nYouth unemployment rate in the United Kingdom from May 1992 to July 2023\nAverage annual earnings for full-time employees in the UK 1999-2023\nMedian annual earnings for full-time employees in the United Kingdom from 1999 to 2023 (in nominal GBP)\nAverage weekly earning growth in the UK 2001-2023\nAverage year-on-year growth of weekly earnings (3 month average) in the United Kingdom from March 2001 to October 2023\nNumber of redundancies in the UK 1995-2023\nAverage number of people made redundant in the United Kingdom from May 1995 to July 2023 (in 1,000s)\nOverall weekly hours worked in the UK 1971-2023\nOverall weekly hours worked for all employees in the United Kingdom from 1st quarter 1971 to 2nd quarter 2023 (in million hours worked)\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nThe UK economy - Statistics & Facts\nUK households under pressure in 2023\nCoronavirus devastates UK economy in 2020\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nUnemployment rate of the UK 1971-2023\nDetailed statistics\nInflation rate in the UK 1989-2023\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nWages & Salaries\nAverage weekly earning growth in the UK 2001-2023\nIncome & Expenditure\nPublic sector spending in the United Kingdom 2023/24\nEmployment\nNumber of people employed in the UK 1971-2021\nRelated topics\nRecommended\nRecommended statistics\nGross domestic product\nGross domestic product\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nQuarterly GDP of the UK 1955-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in million GBP)\nQuarterly GDP growth of the UK 2015-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2015 to 3rd quarter 2023\nQuarterly GDP per capita in the UK 1955-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 1955 to 3rd quarter 2023 (in GBP)\nMonthly GDP of the UK 1997-2023\nMonthly index of gross domestic product in the United Kingdom from January 1997 to September 2023 (2019=100)\n GDP\nAnnual GDP growth in the UK 1949-2022\nQuarterly GDP per capita growth in the UK 2015-2023\nMonthly GDP growth of the UK 2020-2023\nGDP per capita in the UK 1955-2022\nLabor market\nNumber of people employed in the UK 1971-2021\nNumber of people unemployed in the UK 1971-2023\nDaily number of jobs furloughed in the UK 2020-2021\nAverage annual earnings for full-time employees in the UK 1999-2023\nForecasts for 2023\nGDP growth forecast for the UK 2000-2028\nAnnual unemployment rate in the UK 2000-2028\nCPI annual inflation rate UK 2000-2028\nRPI annual inflation rate UK 2000-2028\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.95998776, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false', 'content': 'GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser.', 'score': 0.7892337, 'raw_content': None}], 'response_time': 2.3}), AIMessage(content=[{'text': 'Let me search for more specific data.', 'type': 'text'}, {'id': 'toolu_019dPRXojLJoVNYFLzzSWw4w', 'input': {'query': 'UK GDP values by year 2019 2020 2021 2022 2023'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], additional_kwargs={}, response_metadata={'id': 'msg_01Ac9vcTFneb5dvcEYXJyf1P', 'model': 'claude-3-5-sonnet-20241022', 'stop_reason': 'tool_use', 'stop_sequence': None, 'usage': {'input_tokens': 5890, 'output_tokens': 87}}, id='run-3504417f-c0b5-4908-82e2-89a18abb1b8e-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'UK GDP values by year 2019 2020 2021 2022 2023'}, 'id': 'toolu_019dPRXojLJoVNYFLzzSWw4w', 'type': 'tool_call'}], usage_metadata={'input_tokens': 5890, 'output_tokens': 87, 'total_tokens': 5977, 'input_token_details': {}}), ToolMessage(content='[{"url": "https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product", "content": "U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022. U.K. gdp for 2022 was $3,088.84B, a 1.68% decline from 2021. U.K. gdp for 2021 was $3,141.51B, a 16.45% increase from 2020. U.K. gdp for 2020 was $2,697.81B, a 5.39% decline from 2019."}, {"url": "https://countryeconomy.com/gdp/uk?year=2023", "content": "Gross Domestic Product of United Kingdom grew 0.3% in 2023 compared to last year. This rate is 45 -tenths of one percent less than the figure of 4.8% published in 2022. The GDP figure in 2023 was $3,380,855 million, leaving United Kingdom placed 6th in the ranking of GDP of the 196 countries that we publish."}, {"url": "https://www.statista.com/topics/3795/gdp-of-the-uk/", "content": "Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\\nContribution to GDP growth in the UK 2023, by sector\\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\\nGDP growth rate in the UK 1999-2021, by country\\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\\nGDP growth rate in the UK 2021, by region\\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\\nGDP growth of Scotland 2021, by local area\\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\\nGDP growth of Wales 2021, by local area\\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\\nGDP growth of Northern Ireland 2021, by local area\\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\\nGDP per capita\\nGDP per capita\\nGDP per capita in the UK 1955-2022\\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\\nAnnual GDP per capita growth in the UK 1956-2022\\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\\nQuarterly GDP per capita in the UK 2019-2023\\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nQuarterly GDP per capita growth in the UK 2019-2023\\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\\nGDP per capita of the UK 1999-2021, by country\\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\\nGDP per capita of the UK 2021, by region\\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\\nGlobal Comparisons\\nGlobal Comparisons\\nCountries with the largest gross domestic product (GDP) 2022\\n Monthly GDP of the UK 2019-2023\\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\\nGVA of the UK 2022, by sector\\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\\nGDP of the UK 2021, by country\\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\\nGDP of the UK 2021, by region\\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\\nGDP of Scotland 2021, by local area\\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Wales 2021, by local area\\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\\nGDP of Northern Ireland 2021, by local area\\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\\nGDP growth\\nGDP growth\\nGDP growth forecast for the UK 2000-2028\\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\\nAnnual GDP growth in the UK 1949-2022\\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\\nQuarterly GDP growth of the UK 2019-2023\\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\\nMonthly GDP growth of the UK 2019-2023\\n Transforming data into design:\\nStatista Content & Design\\nStrategy and business building for the data-driven economy:\\nUK GDP - Statistics & Facts\\nUK economy expected to shrink in 2023\\nCharacteristics of UK GDP\\nKey insights\\nDetailed statistics\\nGDP of the UK 1948-2022\\nDetailed statistics\\nAnnual GDP growth in the UK 1949-2022\\nDetailed statistics\\nGDP per capita in the UK 1955-2022\\nEditor’s Picks\\nCurrent statistics on this topic\\nCurrent statistics on this topic\\nKey Economic Indicators\\nMonthly GDP growth of the UK 2019-2023\\nKey Economic Indicators\\nMonthly GDP of the UK 2019-2023\\nKey Economic Indicators\\nContribution to GDP growth in the UK 2023, by sector\\nRelated topics\\nRecommended\\nRecommended statistics\\nGDP\\nGDP\\nGDP of the UK 1948-2022\\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\\nQuarterly GDP of the UK 2019-2023\\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\\nGDP of European countries in 2022\\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\\nReal GDP growth rates in Europe 2023\\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\\nRelated topics\\nRecommended\\nReport on the topic\\nKey figures\\nThe most important key figures provide you with a compact summary of the topic of \\"UK GDP\\" and take you straight to the corresponding statistics.\\n Industry Overview\\nDigital & Trend reports\\nOverview and forecasts on trending topics\\nIndustry & Market reports\\nIndustry and market insights and forecasts\\nCompanies & Products reports\\nKey figures and rankings about companies and products\\nConsumer & Brand reports\\nConsumer and brand insights and preferences in various industries\\nPolitics & Society reports\\nDetailed information about political and social topics\\nCountry & Region reports\\nAll key figures about countries and regions\\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\\nInsights on consumer attitudes and behavior worldwide\\nBusiness information on 100m+ public and private companies\\nExplore Company Insights\\nDetailed information for 39,000+ online stores and marketplaces\\nDirectly accessible data for 170 industries from 150+ countries\\nand over 1\xa0Mio. facts.\\n"}, {"url": "https://www.ons.gov.uk/economy/grossdomesticproductgdp/compendium/unitedkingdomnationalaccountsthebluebook/2024/nationalaccountsataglance", "content": "Real gross domestic product (GDP) is estimated to have increased by 0.3% in 2023, following a recovery from the impacts of the coronavirus (COVID-19) pandemic over the two previous years (Figure 1). Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP). Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP) per head. Download this chart Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK"}, {"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false", "content": "GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser."}]', name='tavily_search_results_json', id='84c571ca-27c6-4023-93a2-f0c2e8b6abb0', tool_call_id='toolu_019dPRXojLJoVNYFLzzSWw4w', artifact={'query': 'UK GDP values by year 2019 2020 2021 2022 2023', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'U.K. GDP 1960-2024 - Macrotrends', 'url': 'https://www.macrotrends.net/global-metrics/countries/GBR/united-kingdom/gdp-gross-domestic-product', 'content': 'U.K. gdp for 2023 was $3,340.03B, a 8.13% increase from 2022. U.K. gdp for 2022 was $3,088.84B, a 1.68% decline from 2021. U.K. gdp for 2021 was $3,141.51B, a 16.45% increase from 2020. U.K. gdp for 2020 was $2,697.81B, a 5.39% decline from 2019.', 'score': 0.9974491, 'raw_content': None}, {'title': 'United Kingdom (UK) GDP - Gross Domestic Product 2023', 'url': 'https://countryeconomy.com/gdp/uk?year=2023', 'content': 'Gross Domestic Product of United Kingdom grew 0.3% in 2023 compared to last year. This rate is 45 -tenths of one percent less than the figure of 4.8% published in 2022. The GDP figure in 2023 was $3,380,855 million, leaving United Kingdom placed 6th in the ranking of GDP of the 196 countries that we publish.', 'score': 0.9964064, 'raw_content': None}, {'title': 'UK GDP - Statistics & Facts | Statista', 'url': 'https://www.statista.com/topics/3795/gdp-of-the-uk/', 'content': 'Monthly growth of gross domestic product in the United Kingdom from January 2019 to November 2023\nContribution to GDP growth in the UK 2023, by sector\nContribution to gross domestic product growth in the United Kingdom in January 2023, by sector\nGDP growth rate in the UK 1999-2021, by country\nAnnual growth rates of gross domestic product in the United Kingdom from 1999 to 2021, by country\nGDP growth rate in the UK 2021, by region\nAnnual growth rates of gross domestic product in the United Kingdom in 2021, by region\nGDP growth of Scotland 2021, by local area\nAnnual growth rates of gross domestic product in Scotland in 2021, by local (ITL 3) area\nGDP growth of Wales 2021, by local area\nAnnual growth rates of gross domestic product in Wales in 2021, by local (ITL 3) area\nGDP growth of Northern Ireland 2021, by local area\nAnnual growth rates of gross domestic product in Northern Ireland in 2021, by local (ITL 3) area\nGDP per capita\nGDP per capita\nGDP per capita in the UK 1955-2022\nGross domestic product per capita in the United Kingdom from 1955 to 2022 (in GBP)\nAnnual GDP per capita growth in the UK 1956-2022\nAnnual GDP per capita growth in the United Kingdom from 1956 to 2022\nQuarterly GDP per capita in the UK 2019-2023\nQuarterly GDP per capita in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nQuarterly GDP per capita growth in the UK 2019-2023\nQuarterly GDP per capita growth in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in GBP)\nGDP per capita of the UK 1999-2021, by country\nGross domestic product per capita of the United Kingdom from 1999 to 2021, by country (in GBP)\nGDP per capita of the UK 2021, by region\nGross domestic product per capita of the United Kingdom in 2021, by region (in GBP)\nGlobal Comparisons\nGlobal Comparisons\nCountries with the largest gross domestic product (GDP) 2022\n Monthly GDP of the UK 2019-2023\nMonthly index of gross domestic product in the United Kingdom from January 2019 to November 2023 (2019=100)\nGVA of the UK 2022, by sector\nGross value added of the United Kingdom in 2022, by industry sector (in million GBP)\nGDP of the UK 2021, by country\nGross domestic product of the United Kingdom in 2021, by country (in million GBP)\nGDP of the UK 2021, by region\nGross domestic product of the United Kingdom in 2021, by region (in million GBP)\nGDP of Scotland 2021, by local area\nGross domestic product of Scotland in 2021, by local (ITL 3) area (in million GBP)\nGDP of Wales 2021, by local area\nGross domestic product of Wales in 2021, by local (ITL 3) area (in million GBP)\nGDP of Northern Ireland 2021, by local area\nGross domestic product of Northern Ireland in 2021, by local (ITL 3) area (in million GBP)\nGDP growth\nGDP growth\nGDP growth forecast for the UK 2000-2028\nForecasted annual growth of gross domestic product in the United Kingdom from 2000 to 2028\nAnnual GDP growth in the UK 1949-2022\nAnnual growth of gross domestic product in the United Kingdom from 1949 to 2022\nQuarterly GDP growth of the UK 2019-2023\nQuarterly growth of gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023\nMonthly GDP growth of the UK 2019-2023\n Transforming data into design:\nStatista Content & Design\nStrategy and business building for the data-driven economy:\nUK GDP - Statistics & Facts\nUK economy expected to shrink in 2023\nCharacteristics of UK GDP\nKey insights\nDetailed statistics\nGDP of the UK 1948-2022\nDetailed statistics\nAnnual GDP growth in the UK 1949-2022\nDetailed statistics\nGDP per capita in the UK 1955-2022\nEditor’s Picks\nCurrent statistics on this topic\nCurrent statistics on this topic\nKey Economic Indicators\nMonthly GDP growth of the UK 2019-2023\nKey Economic Indicators\nMonthly GDP of the UK 2019-2023\nKey Economic Indicators\nContribution to GDP growth in the UK 2023, by sector\nRelated topics\nRecommended\nRecommended statistics\nGDP\nGDP\nGDP of the UK 1948-2022\nGross domestic product of the United Kingdom from 1948 to 2022 (in million GBP)\nQuarterly GDP of the UK 2019-2023\nQuarterly gross domestic product in the United Kingdom from 1st quarter 2019 to 3rd quarter 2023 (in million GBP)\n The 20 countries with the largest gross domestic product (GDP) in 2022 (in billion U.S. dollars)\nGDP of European countries in 2022\nGross domestic product at current market prices of selected European countries in 2022 (in million euros)\nReal GDP growth rates in Europe 2023\nAnnual real gross domestic product (GDP) growth rate in European countries in 2023\nGross domestic product (GDP) of Europe\'s largest economies 1980-2028\nGross domestic product (GDP) at current prices of Europe\'s largest economies from 1980 to 2028 (in billion U.S dollars)\nUnited Kingdom\'s share of global gross domestic product (GDP) 2028\nUnited Kingdom (UK): Share of global gross domestic product (GDP) adjusted for Purchasing Power Parity (PPP) from 2018 to 2028\nRelated topics\nRecommended\nReport on the topic\nKey figures\nThe most important key figures provide you with a compact summary of the topic of "UK GDP" and take you straight to the corresponding statistics.\n Industry Overview\nDigital & Trend reports\nOverview and forecasts on trending topics\nIndustry & Market reports\nIndustry and market insights and forecasts\nCompanies & Products reports\nKey figures and rankings about companies and products\nConsumer & Brand reports\nConsumer and brand insights and preferences in various industries\nPolitics & Society reports\nDetailed information about political and social topics\nCountry & Region reports\nAll key figures about countries and regions\nMarket forecast and expert KPIs for 1000+ markets in 190+ countries & territories\nInsights on consumer attitudes and behavior worldwide\nBusiness information on 100m+ public and private companies\nExplore Company Insights\nDetailed information for 39,000+ online stores and marketplaces\nDirectly accessible data for 170 industries from 150+ countries\nand over 1\xa0Mio. facts.\n', 'score': 0.97943294, 'raw_content': None}, {'title': 'National accounts at a glance - Office for National Statistics', 'url': 'https://www.ons.gov.uk/economy/grossdomesticproductgdp/compendium/unitedkingdomnationalaccountsthebluebook/2024/nationalaccountsataglance', 'content': 'Real gross domestic product (GDP) is estimated to have increased by 0.3% in 2023, following a recovery from the impacts of the coronavirus (COVID-19) pandemic over the two previous years (Figure 1). Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP). Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK Data for the UK are the Office for National Statistics (ONS) measure of real gross domestic product (GDP) per head. Download this chart Figure 9: Real GDP per head fell in 2023 when compared with 2022 in six G10 economies, including the UK', 'score': 0.975249, 'raw_content': None}, {'title': 'GDP growth (annual %) - United Kingdom | Data - World Bank Data', 'url': 'https://data.worldbank.org/indicator/NY.GDP.MKTP.KD.ZG?locations=GB&most_recent_value_desc=false', 'content': 'GDP growth (annual %) - United Kingdom | Data Data GDP growth (annual %)United Kingdom Data Catalog Data Programs International Debt Statistics Other Books and Reports For Developers GDP growth (annual %) - United Kingdom ====================================== Similar values Highest values Lowest values GDP (constant 2015 US$)  GDP (current US$)  GDP (constant LCU)  GDP: linked series (current LCU)  GDP, PPP (constant 2021 international $)  GDP (current LCU)  GDP, PPP (current international $)  GDP per capita growth (annual %)  Country Most Recent Value All Countries and Economies Country Most Recent Value This site uses cookies to optimize functionality and give you the best possible experience. If you continue to navigate this website beyond this page, cookies will be placed on your browser.', 'score': 0.83775276, 'raw_content': None}], 'response_time': 2.37}), HumanMessage(content='Based on the search results, I can provide the UK\'s GDP values for the past 5 years (in billions of US dollars):\n\n2019: $2,851.54\n2020: $2,697.81\n2021: $3,141.51\n2022: $3,088.84\n2023: $3,340.03\n\nI\'ll pass this data to my chart generator colleague to create a line chart. They should create a line chart with:\n- Years 2019-2023 on the x-axis\n- GDP values in billions USD on the y-axis\n- Title: "UK GDP 2019-2023"\n- Clear data points showing the values\n\nOver to you, chart generator colleague!', additional_kwargs={}, response_metadata={}, name='researcher', id='7e790b7a-7b06-4b45-a595-8736b53db844'), AIMessage(content=[{'text': "I'll create a line chart with the specified GDP data and requirements using Python and matplotlib.", 'type': 'text'}, {'id': 'toolu_017HmYWRMpnhPaw3SamZCQua', 'input': {'code': "import matplotlib.pyplot as plt\n\nyears = [2019, 2020, 2021, 2022, 2023]\ngdp = [2851.54, 2697.81, 3141.51, 3088.84, 3340.03]\n\nplt.figure(figsize=(10, 6))\nplt.plot(years, gdp, marker='o', linewidth=2, markersize=8)\n\nplt.title('UK GDP 2019-2023', pad=15, size=14)\nplt.xlabel('Year', labelpad=10)\nplt.ylabel('GDP (Billions USD)', labelpad=10)\n\n# Add value labels above each point\nfor i, value in enumerate(gdp):\n    plt.text(years[i], value + 30, f'${value}B', ha='center')\n\nplt.grid(True, linestyle='--', alpha=0.7)\nplt.show()"}, 'name': 'python_repl_tool', 'type': 'tool_use'}], additional_kwargs={}, response_metadata={'id': 'msg_01Y29F46KJQzTmefwQL6s9Dp', 'model': 'claude-3-5-sonnet-20241022', 'stop_reason': 'tool_use', 'stop_sequence': None, 'usage': {'input_tokens': 8744, 'output_tokens': 295}}, id='run-e0ee838e-1c18-46d9-bed7-459330376276-0', tool_calls=[{'name': 'python_repl_tool', 'args': {'code': "import matplotlib.pyplot as plt\n\nyears = [2019, 2020, 2021, 2022, 2023]\ngdp = [2851.54, 2697.81, 3141.51, 3088.84, 3340.03]\n\nplt.figure(figsize=(10, 6))\nplt.plot(years, gdp, marker='o', linewidth=2, markersize=8)\n\nplt.title('UK GDP 2019-2023', pad=15, size=14)\nplt.xlabel('Year', labelpad=10)\nplt.ylabel('GDP (Billions USD)', labelpad=10)\n\n# Add value labels above each point\nfor i, value in enumerate(gdp):\n    plt.text(years[i], value + 30, f'${value}B', ha='center')\n\nplt.grid(True, linestyle='--', alpha=0.7)\nplt.show()"}, 'id': 'toolu_017HmYWRMpnhPaw3SamZCQua', 'type': 'tool_call'}], usage_metadata={'input_tokens': 8744, 'output_tokens': 295, 'total_tokens': 9039, 'input_token_details': {}}), ToolMessage(content="Successfully executed:\n\`\`\`python\nimport matplotlib.pyplot as plt\n\nyears = [2019, 2020, 2021, 2022, 2023]\ngdp = [2851.54, 2697.81, 3141.51, 3088.84, 3340.03]\n\nplt.figure(figsize=(10, 6))\nplt.plot(years, gdp, marker='o', linewidth=2, markersize=8)\n\nplt.title('UK GDP 2019-2023', pad=15, size=14)\nplt.xlabel('Year', labelpad=10)\nplt.ylabel('GDP (Billions USD)', labelpad=10)\n\n# Add value labels above each point\nfor i, value in enumerate(gdp):\n    plt.text(years[i], value + 30, f'${value}B', ha='center')\n\nplt.grid(True, linestyle='--', alpha=0.7)\nplt.show()\n\`\`\`\nStdout: \n\nIf you have completed all tasks, respond with FINAL ANSWER.", name='python_repl_tool', id='5421128d-9996-4dc5-b14c-77b862912d94', tool_call_id='toolu_017HmYWRMpnhPaw3SamZCQua'), HumanMessage(content='FINAL ANSWER: I have created a line chart showing the UK\'s GDP from 2019 to 2023. The chart includes:\n- A clear line with marked data points\n- Years on the x-axis\n- GDP values in billions USD on the y-axis\n- Value labels above each data point\n- A grid for better readability\n- The title "UK GDP 2019-2023"\n\nThe chart clearly shows the GDP drop in 2020 due to the pandemic, followed by recovery and growth through 2023, with the most recent value reaching $3,340.03 billion.', additional_kwargs={}, response_metadata={}, name='chart_generator', id='4a649455-eed8-4b4f-a19f-c172140430c3')]}}
----

Comments