arXiv:2610.24157cs.CLOct 2026

Manuscript Offprint

arXiv:2610.24157

CoDA: A Human-LM Collaborative Codebook Development Assistant for Domain-Specific Text Annotation

Jaspreet Ranjit, Swaminathan Chellappa, Augusto Rivas Costante, Chandan Manjunath, Laura Onasch-Vera, Hailey Winetrobe Nadel, Eric Rice, Swabha Swayamdipta

Abstract

We present CoDA, an open-source human-LM collaborative codebook development assistant that helps domain experts develop annotation guidelines for annotating new variables in unstructured text with language models. Existing language model annotation systems primarily focus on downstream classification performance, while assuming the availability of high-quality annotation guidelines, or codebooks. In practice, developing these codebooks is time-consuming and challenging, particularly for concepts that require expert knowledge. CoDA addresses this gap by collaborating with domain experts to iteratively develop codebooks through targeted review of incorrect language model predictions and incorporating expert feedback into the evolving codebook. We demonstrate CoDA on two real-world case studies: extracting health indicators from homelessness case management notes and classifying sentiment of wildlife trafficking posts on social media. Across both domains, CoDA produces codebooks that achieve downstream classification performance comparable to expert codebooks while reducing codebook development time from several weeks to two hours and requiring 5×5 \times fewer manually annotated examples. Applying CoDA to generate annotations at scale, we identified 2,410 case notes that contained health discussions or referrals and 10,196 social media posts expressing negative sentiment that may warrant investigation for potential wildlife trafficking. By accelerating codebook development, CoDA helps practitioners use language models to extract domain-specific insights from unstructured text at scale.

1 Introduction

Human-centered occupations rely on unstructured text data (e.g., clinical notes, social media posts, and case notes) to track outcomes for the populations they serve. For example, healthcare workers track health indicators from electronic medical records to inform evidence-based care (Guevara et al., 2024), whereas social workers track theory of change indicators in case notes to inform interventions for youth experiencing homelessness (Nelson et al., 2024). Extracting these insights is challenging due to the scale of the data, the need for domain expertise to infer implicit signals, and the private and sensitive nature of the text.

Language models (LMs) provide a promising avenue for scaling the annotation of text data. Existing approaches formulate annotation as a classification task, prompting LMs with a codebook, or set of annotation guidelines, that defines a target concept and specifies how text should be assigned to a set of labels (Glaser and Strauss, 2017). Prior work has largely focused on improving the downstream classification performance within this setup. However, this workflow hinges on a tacit assumption: that a reliable codebook already exists and faithfully captures the concept the domain expert wishes to measure (Schroeder et al., 2025).

Developing codebooks in domain-specific settings is particularly challenging given that the target concepts are often nuanced and take on canonical meanings that are not widely understood (Halterman and Keith, 2026b; Kim et al., 2026; Chen et al., 2026). For example, in homelessness, a health referral can include not only direct referrals to healthcare providers, but also assistance such as arranging transportation to a medical appointment or scheduling care. When LMs use codebooks to annotate such domain-specific concepts, errors can arise from either (1) models misapplying instructions (scoring errors) or (2) codebooks that fail to capture the expert's intended concept (conceptualization errors) (Wallach et al., 2025). While better models may reduce scoring errors, conceptualization errors require refining the codebook itself.

To address these challenges, we introduce CoDA, an open-source human-LM collaborative system for iterative codebook development and large-scale

Figure

Figure 1: CoDA is a human-in-the-loop system for developing annotation guidelines (codebooks) and scaling domain-specific text annotation. Given a small labeled validation set ( DvalD_{val}) and an unlabeled dataset DallD_{all}, the Sampler selects representative samples from DallD_{all} using coverage based sampling. The Generator uses a language model ( MCoDAM_{CoDA}) to predict a label, supporting span, and reasoning. Experts provide feedback on incorrect predictions. The Synthesizer uses MCoDAM_{CoDA} to incorporate expert feedback into an evolving codebook ( GCoDAtG_{CoDA}^{t}), and the Evaluator prompts MCoDAM_{CoDA} with GCoDAtG_{CoDA}^{t} to generate labels and measure Macro F1F_{1} on DvalD_{val} after each iteration. Once the Macro F1F_{1} on DvalD_{val} reaches an expert-defined threshold m, or the expert has exhausted the budget b, GCoDAtG_{CoDA}^{t} is saved at iteration t for large scale annotation. For our evaluated case studies, CoDA reduces codebook development from several weeks to approximately two hours while requiring 5×5 \times fewer expert-reviewed examples.

text annotation. As illustrated in Figure 2 and Figure 3, the user workflow consists of creating an annotation task, iteratively refining annotation guidelines through human-LM collaboration, evaluating the evolving codebook on a held-out validation set, and scaling annotation to the remaining unlabeled corpus. Our system consists of four modules: the Sampler, Generator, Synthesizer, and Evaluator, which identify diverse examples, generate model predictions, synthesize expert feedback into an evolving codebook, and monitor the Macro F1F_{1} on a held out validation set throughout development (Figure 1). We release CoDA as both a web-based application and a locally deployable package to support annotation workflows involving sensitive data. Across our two real-world case studies in youth homelessness and wildlife conservation, CoDA produces codebooks that achieve downstream classification performance comparable to expert codebooks while significantly reducing expert annotation effort. Specifically, in the homelessness case study, compared with the fully manual codebook development process, CoDA reduced development time from several weeks to approximately two hours and required 5×5 \times fewer manually annotated examples. Finally, we prompt LMs with CoDA codebooks to scale annotations and identify 1,474 homelessness case notes containing health discussions, 936 containing health referrals, and 10,196 social media posts with negative sentiment. These case studies demonstrate how CoDA enables practitioners to transform large collections of unstructured text into structured insights that support evidence-based decision making in high-impact domains.

References (15)