Sentiment-Aware Network Extraction from News Corpus using LLMs: An Empirical Validation with Legislative Agreement
Naim Bro
School of Government, Adolfo Ibáñez University, Santiago, Chile
Millennium Institute Foundational Research on Data, Santiago, Chile
Complex Networks 2023
Menton, France
Introduction
Background
Data and Methods
GPT-4 Prompt
Given the current state of a graph and a prompt, find in the prompt any of the names from a list that I will provide to you. Identify the relationships between these persons, and then update the state.
Example:
current state: {{ "nodes": [], "edges": [] }}
prompt: Juan Sánchez criticó a Pedro González, pero felicitó a Manuel Muñoz. Manuel Muñoz, por su lado, aplaudió a Juan Sánchez.
new state: {{ "nodes": [ {{ "id": 1, "label": "Juan Sánchez", "type" : "person"}}, {{ "id": 2, "label": "Pedro González", "type" : "person"}},{{ "id": 3, "label": "Manuel Muñoz", "type" : "person"}}], "edges": [ {{ "from": 1, "to": 2, "label": "criticized", "sentiment": "negative"}},{{ "from": 1, "to": 3, "label": "congratulated", "sentiment": "positive"}},{{ "from": 3, "to": 1, "label": "aplaudió", "sentiment": "positive"}} ] }} state: {state} prompt: {news}
Graph Representation
Empirical Validation
Legislative Agreement=β0+β1×Negative Sentiment+β2×Positive Sentiment+ε
Results Overview
Key Finding: Negative sentiment predict a 5% drop in legislative agreement, independent of political party, sector, and region
R^2: 0.56
Conclusion