Supply-chain risk from news headlines

Extract supplier-event edges from news prose and grade each event with LLM_SCORE

All recipes· graph· 8 minutesintermediatecypher

Supply-chain risk from news headlines

Objective

95% of supply-chain leaders see Tier-1 supplier risk; only 42% see Tier-2 or beyond. The signal exists — strikes, recalls, fires, fines — but it lives in news prose, not in any ERP. Use /v2/graph/extract to turn one paragraph of newswire into supplier-event edges, then LLM_SCORE to grade each event's disruption severity. The wow moment: a single Cypher query returns every Tier-2 supplier with a high-severity event in the last 30 days, joined to the Tier-1 suppliers and products downstream.

Step 1: Extract events from a news paragraph

curl -X POST https://localhost:8443/v2/graph/extract \
  -H "Authorization: Bearer $AIDB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Reuters, April 28 2026 — A fire at the Andes Forge titanium plant in Chile halted production for at least six weeks, the company said. Andes Forge supplies turbine forgings to Pacifica Components and to Helios Aerospace; both companies declined to comment on inventory levels. Separately, a port strike in Valparaíso entered its second week, delaying ocean shipments from Andes Forge and three other regional suppliers.",
    "default_node_label": "SupplyEntity",
    "node_provenance": {"source": "reuters-2026-04-28"},
    "edge_provenance": {"source": "reuters-2026-04-28"},
    "min_confidence": 0.55
  }'

Step 2: Pre-seed the graph for the demo

// Tier-2 supplier in the news
MERGE (af:Supplier {name: "Andes Forge",        tier: 2, country: "CL"})
// Tier-1 customers of the Tier-2
MERGE (pc:Supplier {name: "Pacifica Components", tier: 1, country: "MX"})
MERGE (ha:Supplier {name: "Helios Aerospace",    tier: 1, country: "US"})
// The OEM downstream of the Tier-1s
MERGE (oem:Manufacturer {name: "Northwind Aero",  country: "US"})
// Products produced by the OEM that depend on this material
MERGE (prod:Product {sku: "NA-727",  name: "Turbine assembly module"})
MERGE (prod2:Product {sku: "NA-805", name: "Landing gear actuator"})

// Two events the news mentioned, with embedded text the LLM can grade.
MERGE (ev1:Event {id: "EVT-1", date: "2026-04-28", category: "production_halt",
       text: "Fire at Andes Forge titanium plant halts production for at least six weeks"})
MERGE (ev2:Event {id: "EVT-2", date: "2026-04-22", category: "logistics_delay",
       text: "Port strike in Valparaiso enters second week, delaying ocean shipments"})

MERGE (af)-[:HAS_EVENT]->(ev1)
MERGE (af)-[:HAS_EVENT]->(ev2)

MERGE (af)-[:SUPPLIES]->(pc)
MERGE (af)-[:SUPPLIES]->(ha)
MERGE (pc)-[:SUPPLIES]->(oem)
MERGE (ha)-[:SUPPLIES]->(oem)
MERGE (oem)-[:MAKES]->(prod)
MERGE (oem)-[:MAKES]->(prod2);

Step 3: Grade events and roll up to OEM products

// "Which OEM products are at risk because a Tier-2 supplier had a high-severity event?"
MATCH (s:Supplier {tier: 2})-[:HAS_EVENT]->(e:Event)
WITH s, e,
     llm_score(
       "Rate this supplier event's severity 0..1. " +
       "Production halts and multi-week disruptions should score >0.7. " +
       "Routine maintenance or short delays should score <0.3.",
       e
     ) AS severity
WHERE severity > 0.6
MATCH (s)-[:SUPPLIES*1..3]->(:Manufacturer)-[:MAKES]->(p:Product)
RETURN s.name      AS tier2_supplier,
       e.text      AS event,
       severity,
       collect(DISTINCT p.name) AS at_risk_products
ORDER BY severity DESC;

What's happening

  • One newswire paragraph yields supplier nodes, an event node, and :HAS_EVENT / :SUPPLIES edges. Provenance (source: "reuters-2026-04-28") is stamped on every edge so analysts can trace any conclusion back to the source article.
  • LLM_SCORE grades the event using a prompt the procurement team writes — they own the definition of "severe" without writing any classifier code.
  • The variable-length :SUPPLIES*1..3 pattern walks Tier-2 → Tier-1 → OEM in one go. SQL would need three CTEs and three joins.
  • Combined: Tier-2 visibility most ERPs lack, severity grading using the latest LLM, supplier topology already in your graph — one query, three systems' worth of capability.
  • Re-running extraction on the same article is idempotent because edge MERGEs deduplicate; new articles add new events with their own provenance.

Try this next

MATCH (s:Supplier)-[:HAS_EVENT]->(e:Event)
WHERE e.date > "2026-04-01"
RETURN s.name AS supplier, e.category, e.text AS event, e.date
ORDER BY e.date DESC;
// Find OEM products dependent on a single point of failure (only one Tier-2 path).
MATCH (oem:Manufacturer)-[:MAKES]->(p:Product)
MATCH path = (s:Supplier {tier: 2})-[:SUPPLIES*1..3]->(oem)
WITH p, s, count(DISTINCT path) AS paths
WHERE paths = 1
RETURN p.name AS product, s.name AS sole_tier2;
MATCH (s:Supplier)-[:HAS_EVENT]->(e:Event)
WITH s,
     count(e) AS event_count,
     llm_score("rate aggregate disruption risk for this supplier 0..1", s) AS supplier_risk
RETURN s.name, event_count, supplier_risk
ORDER BY supplier_risk DESC;

Tags

graphcypherextractllm_scoresupply-chainintermediate

Run this on your own machine

Install SynapCores Community Edition free, paste the SQL or Cypher above into the bundled web UI, and watch it run.

Download Free CE