Skip to main content

Use analytical text for richer graphs

Text with explicit cause-and-effect language (e.g., “leads to”, “causes”, “results in”) produces more accurate and detailed graphs than descriptive text.
// Good — explicit causal language
{"text": "Higher inflation causes central banks to raise interest rates, which leads to lower borrowing, reduced investment, and slower GDP growth."}

// Less effective — descriptive, no causal structure
{"text": "Inflation was high. Interest rates went up. GDP slowed down."}

Use url for article or report analysis

Passing a URL to a research report, news article, or policy document is the most efficient way to extract causal relationships at scale.
{"url": "https://imf.org/en/Publications/WEO"}

Visualize as a directed graph

The edges array is directional: from is the cause, to is the effect. Use this to render a DAG (directed acyclic graph) in your UI.
edges.forEach(edge => {
  graph.addEdge(edge.from, edge.to, { label: edge.label });
});

Filter isolated nodes

Nodes without any edges are likely extraction artifacts. Filter them out before rendering.
const connectedNodeIds = new Set([
  ...edges.map(e => e.from),
  ...edges.map(e => e.to),
]);
const filteredNodes = nodes.filter(n => connectedNodeIds.has(n.id));

Combine with Timeseries

Use Causality Graph alongside Timeseries to answer both “what happened?” and “why did it happen?”.
Timeseries (what happened) → Causality Graph (why it happened)