# Beyond Manual Media Coding: Evaluating Large Language Models and Agents for News Content Analysis
## 2 Related Work  
### Large Language Models and Codebooks for Deductive Coding  
The field of natural language processing (NLP) was fundamentally transformed by the introduction of the Transformer architecture and its \"attention mechanism\" [10]. This innovation enabled models to process text by weighing the importance of different words in relation to each other, effectively capturing long-range dependencies and complex contextual relationships that were challenging for previous architectures. This breakthrough paved the way for the development of large language models, such as those in the GPT series [11], Llama [12], and Mistral [13], which are pre-trained on vast and diverse text corpora. A key advantage of LLMs is their powerful zero-shot and few-shot learning capabilities. Unlike traditional machine learning models, LLMs can perform a wide range of tasks with no or very few examples, simply by being prompted with instructions in natural language. This ability drastically reduces the need for task-specific training data and extensive feature engineering. The process of learning new tasks directly from examples given in the prompt is known as in-context learning (ICL) [15]. This remarkable ability stems from the massive scale of these models and the extensive text data they are pre-trained on, minimizing or eliminating the need for parameter updates for new tasks. Following this discovery, researchers have actively explored ways to enhance ICL, evaluated its effectiveness in various models [16], and benchmarked it against traditional methods like fine-tuning and other few-shot learning techniques [17]. A key advancement in this area is \"chain-of-thought\" (CoT) prompting [18]. This method enhances few-shot learning in LLMs by providing not just the answers to examples but also the step-by-step reasoning to reach them. The benefits of CoT are particularly pronounced in larger models [19]. Further studies have examined the ideal composition of these in-context examples. The utilization of these methods has established the viability of using LLMs for deductive coding. Foundational studies by [PERSON] et al. [14] and [PERSON] et al. [20] demonstrated that with carefully designed prompts, LLMs could achieve performance comparable to human coders on specific tasks. A key finding from this initial wave of research was that providing the model with the codebook's explicit rules and definitions in a codebook-centered prompt was significantly more effective than providing only coded examples [20]. This established the codebook itself, rather than a large corpus of examples, as the central artifact for guiding the LLM's analytical process. This work spurred a wave of methodological refinements aimed at improving the fidelity and transparency of LLM-driven analysis. In the context of qualitative analysis, CoT was shown to substantially improve coding accuracy and, crucially, make the LLM's thinking process more transparent and auditable for researchers [21; 22]. The emphasis on structured reasoning has led researchers to focus on adapting codebooksto be more machine-readable. For some tasks, a high-quality, well-structured codebook can even enable a zero-shot approach to outperform few-shot learning with examples, underscoring the primacy of clear instructions over in-context examples [23]. Rather than pursuing full automation, many have proposed collaborative frameworks where LLMs act as a partner in analysis. These LLM-in-the-loop systems can dramatically reduce the labor involved in coding large datasets but introduce new challenges for methodological objectivity [24]. A primary concern is that the LLM may learn to mimic the specific biases and interpretive idiosyncrasies of its human collaborator, potentially amplifying them across the dataset and creating a feedback loop that undermines the validity of the findings. This has led to calls for more reflexive approaches to content analysis, where the researcher's interaction with the LLM is itself a subject of critical examination [21].