English

In-Context Learning for Long-Context Sentiment Analysis on Infrastructure Project Opinions

Computation and Language 2024-10-16 v1 Artificial Intelligence

Abstract

Large language models (LLMs) have achieved impressive results across various tasks. However, they still struggle with long-context documents. This study evaluates the performance of three leading LLMs: GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro on lengthy, complex, and opinion-varying documents concerning infrastructure projects, under both zero-shot and few-shot scenarios. Our results indicate that GPT-4o excels in zero-shot scenarios for simpler, shorter documents, while Claude 3.5 Sonnet surpasses GPT-4o in handling more complex, sentiment-fluctuating opinions. In few-shot scenarios, Claude 3.5 Sonnet outperforms overall, while GPT-4o shows greater stability as the number of demonstrations increases.

Keywords

Cite

@article{arxiv.2410.11265,
  title  = {In-Context Learning for Long-Context Sentiment Analysis on Infrastructure Project Opinions},
  author = {Alireza Shamshiri and Kyeong Rok Ryu and June Young Park},
  journal= {arXiv preprint arXiv:2410.11265},
  year   = {2024}
}
R2 v1 2026-06-28T19:22:01.484Z