Promises and pitfalls of using large language models to identify actor stances in political discourse
University of Zürich
In a text, identify
the stance (support, opposition, irrelevant)
of a (any) named entity
toward a given (any) statement
based on the text.
Can zero-shot stance classification with LLMs achieve adequate performance in an applied, empirical social science research setting?
Four distinct LLMs finetuned on German text:
–> Evaluate each LLM with each prompt chain on the entire evaluation data
| prompt chain | Precision | Recall | F1 macro avg | F1 weighted | |
|---|---|---|---|---|---|
| Llamasauerkraut70b | sis (not masked) | 0.67 | 0.72 | 0.69 | 0.74 | 
| Llamasauerkraut8b | is2 (not masked) | 0.64 | 0.55 | 0.55 | 0.66 | 
| Llama3kafka8b | sis (masked entity) | 0.58 | 0.62 | 0.59 | 0.66 | 
| Llama3discoleo8b | is2 (not masked) | 0.60 | 0.49 | 0.50 | 0.63 | 
So… Should you use LLMs for stance detection? Probably not.
1from guidance import models
from stance_llm.process import detect_stance
2disco7b = models.Transformers("DiscoResearch/DiscoLM_German_7b_v1")
my_eg = [
  {"text":"Emily will LLMs in den Papageienzoo sperren und streng beaufsichtigen.", 
  "ent_text": "Emily", 
3  "statement": "LLMs sollten in den Papageienzoo gesperrt werden."}]
  
classification = detect_stance(
            eg = my_eg,
            llm = disco7b,
4            chain_label = "is"
        )
        
classification.stanceMore documentation, features and possibility to contribute here:
https://github.com/urban-sustainability-lab-zurich/stance-llm
Additional members of the annotation team:
Funding:
DIZH (Digitalisierungsinitiative der Zürcher Hochschulen)
Contact:
mario.angst@uzh.ch