The GDELT Project

Using Gemini 2.5 As A Persona-Based News Recommender Service: Summarizing Trends From A Day Of Global Tariff & Trade War News

Continuing our series in persona-based news recommenders, today we're going to provide an end-to-end workflow that begins with downloading the titles, URLs and self-provided one-sentence OpenGraph or Schema.org metadata descriptions from the daily GDELT Article List for yesterday, May 1, 2025, using a Linux shell script written by Gemini, then using a Gemini-provided grep to filter for just tariff and trade war-related articles in multiple languages, then sifting through those headlines for major trends and providing an annotated list of URLs for a reader to learn more about each – along with having Gemini generate a textual prompt and output an illustration for the cover page of the trend report. We accomplish all of this through Gemini 2.5 Flash Preview in Google AI Studio, showcasing a truly end-to-end solution.

Let's start by downloading the GDELT Article List (GAL) files for the given day, which include the title, URL and metadata extended description sentence (via embedded OpenGraph or Schema.org metadata) for each article:

Write me a Linux shell script one-liner that accepts a single parameter of a date in YYYYMMDD format and takes the URL below and downloads it via CURL for every minute of the given day by replacing the YYYYMMDDHHMM in the URL with all the minutes of that day:

https://storage.googleapis.com/data.gdeltproject.org/gdeltv3/gal/YYYYMMDDHHMM00.gal.json.gz

This yields:

read -p "Enter date (YYYYMMDD): " date_str; test -z "$date_str" && exit 1; for h in {0..23}; do for m in {0..59}; do curl -fsO "https://storage.googleapis.com/data.gdeltproject.org/gdeltv3/gal/${date_str}$(printf "%02d" $h)$(printf "%02d" $m)00.gal.json.gz"; done; done

Let's run the above with the date "20250501" (yesterday) on any Linux machine. After a few minutes it has downloaded all of the files locally. Now let's ungzip them:

time gunzip *.gz

Now we need to filter them down to just articles relevant to tariffs and trade wars:

I have a JSON-NL file where each row is a JSON record of a news article with just its title and URL in all the languages of the world. I want you to give me a case-insensitive grep that will return just the rows most likely to be about tariffs and trade wars involving the United States. Make it work for all major languages of the world that might be talking about tariffs and trade wars involving the United States.

Yielding:

time cat *.json | grep -i -E 'tariff(s)?|trade war(s)?|arancel(es)?|guerra comercial(es)?|tarif(s)?|guerre commerciale(s)?|Zoll(e)?|Handelskrieg(e)?|关税|贸易战|関税|貿易戦争|тариф(ы)?|торговая война|tarifa(s)?|guerra comercial(ais)?|تعريفة جمركية|حرب تجارية|tariffa(e)?|guerra commerciale(i)?|관세|무역 전쟁' | grep -i -E 'United States|US|USA|Estados Unidos|EE\. UU\.|EUA|États-Unis|Vereinigte Staaten|美国|美国合众国|アメリカ合衆国|米国|米|США|Соединённые Штаты|الولايات المتحدة|أمريكا|Stati Uniti|미국|미합중국' > FILTERED.JSON

This returns just 4,656 matching results. Now let's extract the combined title + description field and the URL:

time jq -cR 'split("\n") | map(select(length > 0) | fromjson? | {url, text: (.title + ". " + .desc)})' FILTERED.JSON > 20250501-TARIFFS.JSON

And finally, let's ask for our summary. Copy-paste the prompt below into a new AI Studio chat session (make sure you set the model in the upper-right dropdown to "Gemini 2.5 Flash Preview") and attach the JSON file you received above as an attachment:

Attached is a JSON list of news articles from around the world in various languages. Each line is an article and includes two fields: "url" that is the URL of the article and "text" which is the title and a brief description of the article. You are a policy analyst for a major US manufacturer responsible for assessing how current and proposed tariffs and trade wars involving the US are impacting current state of the American and global economy and where it might be heading and in particular the impact on your business. For each article below, identify the ones that are relevant in any way to your job. Ignore all articles that are not relevant to your job. Output a 3-paragraph top-level summary in English that summarizes the major trends, events, stories from all of the relevant articles that summarizes the current state of tariffs and trade wars on your company's business. Follow that with a three-page high-level overview with additional detail and include at least one url from one of the relevant articles for each of the themes/trends/events/stories you include as a reference that best summarizes or represents that theme/trend/event/story.

The prompt alone consumed 232 tokens, while the prompt plus attached JSON file is 561,114 tokens. In all, the model takes 252 seconds (4.2 minutes) to complete and the final prompt + input JSON + output report consumes 626,611 tokens.

You can see the final report below. It is unclear what the opening line of ".** Duplicate of ey.com— START OF REPORT —" means. The report is also truncated at the end:

.** Duplicate of ey.com— START OF REPORT —

Executive Summary: Impact of US Tariffs on Manufacturing and the Economy (May 1, 2025)

The landscape of US manufacturing and the broader economy is being significantly reshaped by the Trump administration's aggressive tariff policies. Recent developments indicate a complex and often contradictory picture: while some sectors like automotive and specific niche markets are seeing temporary boosts or strategic shifts in response to tariffs, the overall trend points towards increased costs, supply chain disruption, and heightened economic uncertainty both domestically and globally. The first quarter of 2025 saw a contraction in the US economy, a downturn attributed by many economists primarily to factors related to the tariff implementation, despite the administration's efforts to blame previous policies.

The global reaction continues to be one of caution and adaptation. Trading partners are actively exploring alternative supply chains, pushing back against the tariffs through international forums like the WTO, and in some cases, seeking retaliatory measures or separate trade deals. Domestically, US businesses, particularly those reliant on imports or with complex international supply chains, are grappling with rising costs, unpredictable policy changes, and concerns about potential job losses and reduced consumer demand, leading several major companies to lower financial forecasts.

Looking ahead, the near-term outlook remains clouded by uncertainty. The administration is suggesting potential tariff deals could be reached in weeks, but China and other partners appear hesitant to negotiate under pressure. The ongoing volatility, coupled with the direct costs and market disruptions caused by the tariffs, presents significant challenges for US manufacturers navigating this new trade environment.

High-Level Overview

1. US Economic Impact and Concerns

GDP Contraction: The US economy unexpectedly shrank by 0.3% in the first quarter of 2025, the first contraction in three years. Economists widely attribute this, at least in part, to a surge in imports ahead of planned tariffs and trade war disruptions. President Trump has blamed the downturn on the previous administration's policies.

Reference: U.S. economy shrinks 0.3% in first quarter as Trump trade wars disrupt businesses – ChinaTechNews.com (https://www.chinatechnews.com/2025/04/30/112972-u-s-economy-shrinks-0-3-in-first-quarter-as-trump-trade-wars-disrupt-business/)

Increased Costs and Inflation Fears: Tariffs are leading to higher costs for businesses and consumers. Retailers are seeing price increases on imported goods, prompting concerns about reduced consumer spending and potential inflation. Some businesses are trying to absorb costs, while others are considering price hikes.

Reference: Empty shelves and high prices? What will happen if Trump doesn't pivot on tariffs (https://www.aol.com/empty-shelves-high-prices-happen-233025698.html)

Supply Chain Disruptions: The volatility and unpredictability of tariffs are disrupting global supply chains. US ports, like the Port of Los Angeles, anticipate significant drops in cargo volume from China, which could lead to shortages on shelves. Companies are struggling to adapt to sudden policy changes.

Reference: Shipping volume will plummet 35% next week, LA port official says in CNBC interview (https://finance.yahoo.com/news/shipping-volume-plummet-35-next-141559862.html)

Business Uncertainty and Lowered Forecasts: Tariffs have created significant uncertainty for businesses, impacting investment and future planning. Several major companies, including General Motors and Harley-Davidson, have lowered or suspended their financial forecasts for the year, directly citing the impact of tariffs.

Reference: GM cuts 2025 profit forecast, expects up to $5 billion tariff impact (https://www.marketscreener.com/quote/stock/GENERAL-MOTORS-COMPANY-6873535/news/GM-cuts-2025-profit-forecast-expects-up-to-5-billion-tariff-impact-49788316/)

Consumer Confidence Impact: The trade war and tariff uncertainty are negatively impacting US consumer confidence, reaching lows similar to the COVID-19 era. This anxiety about the economy is contributing to concerns about slowing consumer spending.

Reference: US consumer confidence plummets to Covid-era low as trade war stokes anxiety (https://www.journalgazette.net/ap/business/us-consumer-confidence-plummets-to-covid-era-low-as-trade-war-stokes-anxiety/article_dc66366f-e4c6-5b83-b9cc-89c0e658fb3e.html)

Specific Sector Impacts: Various US industries are reporting direct impacts. Auto manufacturers are facing billions in potential costs. Retailers, including toy stores and bridal shops, are struggling with rising import prices. Industries like solar, timber, and construction materials (lumber) are also facing headwinds.

Reference: Tariffs impact local businesses (https://www.kait8.com/2025/04/30/tariffs-impact-local-businesses/)

Political Opposition and Senate Action: There is bipartisan concern in the US Senate regarding the tariffs. A resolution to block Trump's global tariffs narrowly failed, with some Republicans joining Democrats in opposition, highlighting unease with the policy.

Reference: Senate resolution to scrap Trump’s ‘Liberation Day’ tariffs fails despite some GOP support (https://thehill.com/homenews/senate/5275868-trump-tariffs-senate-vote/)

Trump's Justifications and Messaging: President Trump continues to defend his tariffs, claiming they are bringing businesses and investment back to the US and that other countries will suffer more. He has acknowledged they might lead to fewer/costlier goods for Americans but frames it as a necessary step.

Reference: Trump says US kids may get '2 dolls instead of 30,' but China will suffer more in a trade war (https://www.wbap.com/2025/04/30/trump-says-us-kids-may-get-2-dolls-instead-of-30-but-china-will-suffer-more-in-a-trade-war/)

2. Global Reactions and Adaptations

Retaliation and Counter-Tariffs: Many US trading partners have implemented or are considering retaliatory tariffs on US goods. China has imposed significant tariffs and, while publicly stating no formal talks are underway, has reportedly waived some tariffs on US goods like ethane. The EU and Canada have also implemented counter-tariffs.

Reference: China waives tariffs on US ethane imports, sources say (https://finance.yahoo.com/news/exclusive-china-waives-tariffs-us-135419268.html)

Seeking Alternative Markets and Supply Chains: Countries and companies are actively looking for ways to circumvent US tariffs and reduce reliance on the US market or US-dependent supply chains. Chinese exporters are seeking buyers beyond the US, and companies like Samsung and Logitech are considering shifting production locations.

Reference: China's factory activity contracts in April as US tariffs hurt orders (https://asia.nikkei.com/Economy/China-s-factory-activity-contracts-in-April-as-US-tariffs-hurt-orders)

Impact on International Economies: The US tariff policy is having ripple effects globally. Canada anticipates significant job losses and a potential recession in Ontario. Japan's manufacturing activity is falling, and its central bank lowered growth forecasts due to tariff concerns. Middle East and North Africa economies also face challenges.

Reference: Canada's Ontario may lose 68,000 jobs in 2025 due to US tariffs (https://www.aa.com.tr/en/americas/canadas-ontario-may-lose-68-000-jobs-in-2025-due-to-us-tariffs/3553817)

International Negotiations and Stalemates: While the US suggests trade deals are imminent, other countries remain cautious. China denies formal talks are underway, while the EU is preparing negotiation positions. Japan and South Korea are also engaged in negotiations, but progress seems uncertain.

Reference: US has reached out to China to talk tariffs, state media says (https://www.yahoo.com/news/us-reached-china-talk-tariffs-054802685.html)

WTO and Multilateralism: The US tariff actions are being challenged at the WTO, and there is a global consensus among groups like BRICS against trade protectionism, emphasizing the need to defend the multilateral trading system.

Reference: BRICS: Foreign Ministers Reach Consensus Against Trade Protectionism (https://www.eurasiareview.com/01052025-brics-foreign-ministers-reach-consensus-against-trade-protectionism/)

3. Impact on US Manufacturing Business (Specific Considerations for a Major US Manufacturer)

Increased Input Costs: As a US manufacturer, tariffs on imported raw materials, components, or machinery will directly increase production costs. This is a significant concern highlighted by various industries.

Reference: Tariffs to cost up to $350mn in 2Q: Caterpillar (https://www.argusmedia.com/en/news-and-insights/latest-market-news/2683930-tariffs-to-cost-up-to-350mn-in-2q-caterpillar)

Supply Chain Restructuring: The volatility necessitates evaluating and potentially restructuring supply chains. This might involve finding alternative suppliers outside tariff-affected countries (e.g., Apple shifting some production to India/Vietnam, Nissan considering moving production) or increasing domestic sourcing, although finding readily available US-made components can be a challenge.

Reference: Apple expects $900 mn tariff hit as shifts US iPhone supply to India (https://www.ibtimes.com/apple-expects-900-mn-tariff-hit-shifts-us-iphone-supply-india-3772193)

Impact on Sales and Demand: Tariffs can impact demand in several ways: directly on exported finished goods (e.g., South Korean exports to the US dropping, Canadian auto parts manufacturers facing tariffs), and indirectly through reduced US consumer spending due to rising prices and economic uncertainty.

Reference: South Korea’s export growth stalls as US tariffs sap demand (https://www.straitstimes.com/business/international/south-koreas-export-growth-stalls-as-us-tariffs-sap-demand)

Price Sensitivity: The need to raise prices due to higher input costs clashes with potentially weaker consumer demand, creating a difficult balancing act. Retailers and manufacturers alike are discussing how much of the tariff cost can be passed on.

Reference: Temu se une a Shein… Sube precios para el consumidor final por culpa de aranceles de Trump (https://www.elfinanciero.com.mx/economia/2025/04/30/temu-se-une-a-shein-sube-precios-para-el-consumidor-final-por-culpa-de-aranceles-de-trump/)

Potential for Reshoring/Nearshoring: While challenging, the tariffs are prompting discussions and some action towards bringing manufacturing back to the US or nearshoring to unaffected countries (like Mexico for some auto parts). This could be a

Let's ask Gemini to output the report in HTML format. This time it completes the report and removes the odd line from the top, as well as returning a fully-formatted report:

Impact of US Tariffs on Manufacturing and the Economy

Executive Summary

The landscape of US manufacturing and the broader economy is being significantly reshaped by the Trump administration's aggressive tariff policies. Recent developments indicate a complex and often contradictory picture: while some sectors like automotive and specific niche markets are seeing temporary boosts or strategic shifts in response to tariffs, the overall trend points towards increased costs, supply chain disruption, and heightened economic uncertainty both domestically and globally. The first quarter of 2025 saw a contraction in the US economy, a downturn attributed by many economists primarily to factors related to the tariff implementation, despite the administration's efforts to blame previous policies.

The global reaction continues to be one of caution and adaptation. Trading partners are actively exploring alternative supply chains, pushing back against the tariffs through international forums like the WTO, and in some cases, seeking retaliatory measures or separate trade deals. Domestically, US businesses, particularly those reliant on imports or with complex international supply chains, are grappling with rising costs, unpredictable policy changes, and concerns about potential job losses and reduced consumer demand, leading several major companies to lower financial forecasts.

Looking ahead, the near-term outlook remains clouded by uncertainty. The administration is suggesting potential tariff deals could be reached in weeks, but China and other partners appear hesitant to negotiate under pressure. The ongoing volatility, coupled with the direct costs and market disruptions caused by the tariffs, presents significant challenges for US manufacturers navigating this new trade environment.

High-Level Overview

1. US Economic Impact and Concerns

2. Global Reactions and Adaptations

3. Impact on US Manufacturing Business (Specific Considerations for a Major US Manufacturer)

Now, let's ask for a textual description to be used to generate a cover page image for this report:

Give me a textual prompt that could be used to generate an image that summarizes this report to be used as the cover page image. It should be cinematic and beautiful but also convey the overall findings of the report above.

This returns:

A breathtaking cinematic image, high angle perspective, depicting a turbulent global economy. Centered over a stylized map of the United States, a powerful, pulsating wave of disruptive energy radiates outwards, symbolizing new tariffs. This energy fractures intricate, glowing lines that represent global supply chains and trade routes, causing them to twist and break over continents like Asia and Europe. Below, small, detailed icons show scenes of economic stress: a downward trending stock market graph, struggling cargo ships in choppy seas, and factories emitting plumes of uncertain color. Dramatic, high-contrast lighting with sharp shadows, perhaps golden hour light attempting to break through dark, stormy clouds to add beauty. Highly detailed, epic scale, cinematic digital painting, 16:9 aspect ratio.

Since Gemini 2.5 Flash can't natively generate images, we'll open a new chat session with the "Gemini 2.0 Flash (Image Generation) Preview" model and prompt it with:

Generate an image based on the following description: A breathtaking cinematic image, high angle perspective, depicting a turbulent global economy. Centered over a stylized map of the United States, a powerful, pulsating wave of disruptive energy radiates outwards, symbolizing new tariffs. This energy fractures intricate, glowing lines that represent global supply chains and trade routes, causing them to twist and break over continents like Asia and Europe. Below, small, detailed icons show scenes of economic stress: a downward trending stock market graph, struggling cargo ships in choppy seas, and factories emitting plumes of uncertain color. Dramatic, high-contrast lighting with sharp shadows, perhaps golden hour light attempting to break through dark, stormy clouds to add beauty. Highly detailed, epic scale, cinematic digital painting, 16:9 aspect ratio.

This produces:

Let's try a better one:

Make one that is more informational and better reflects the findings of the report

Producing:

ChatGPT produces the following two images:

Let's go back to the original AI Studio session with the report and ask for a modified image prompt:

Make a better prompt that generates a more "cinematic infographic" style that more accurately captures the findings of the report.

Which yields:

A dramatic, cinematic infographic cover image. A high-angle, stylized view of the globe, specifically centered on the United States. From the US, a powerful, glowing red wave or field emanates, representing the impact of "Tariffs." This energy visibly disrupts and fractures the network of interconnected global trade routes, depicted as vibrant lines of light crisscrossing oceans and continents. Over the United States, integrate visual data streams and icons: a prominent downward bar graph showing "GDP Contraction," a small icon of rising prices labeled "Costs Up," and symbols representing disrupted supply chains (e.g., tangled cargo ships, empty warehouse shelves). Show cascading effects reaching other regions with specific icons like a strained factory in Asia, a struggling consumer in Europe, and a chart indicating lowered business forecasts. The lighting is dramatic and high-contrast, with stormy blues and greys giving way to intense, impactful reds and golds where the tariffs hit. The style is a detailed digital painting, blending realistic elements with clear, symbolic infographic visuals, designed for a professional report cover page with space for a title. 16:9 aspect ratio.

This yields the following from Gemini:

And from ChatGPT:

Let's go back to the report session and try a slightly modified prompt:

Make a textual prompt for an image suitable for the cover of this report that summarizes its findings in a visually striking way.

Yielding:

Generate an image based on the prompt:
A powerful and dramatic conceptual cover image for a policy report. The central element is a stylized, elevated view of the globe, with a strong focus on the United States. From the landmass of the US, a radiating, chaotic burst of energy, depicted as jagged lines and turbulent color (suggesting tariffs and trade war), erupts outwards. This energy visually shatters and fragments the intricate, glowing network of global trade routes and supply lines that connect continents. Across the globe, overlay clear, symbolic icons representing the report's key findings: a downward arrow graph over the US for GDP contraction, question marks hovering over businesses, tangled shipping lanes or stalled container ships in ports, and up arrows on price tags. The lighting is high-contrast and moody, with dark, stormy blues and greys dominating the atmosphere, pierced by the sharp, disruptive energy emanating from the US. The style should be a sophisticated digital painting or editorial illustration, emphasizing the turmoil and uncertainty while remaining professional and impactful, leaving clear visual space at the top or bottom for a report title. Aspect ratio 16:9 or 4:3.

Gemini:

ChatGPT: