Manuscript Offprint
arXiv:2610.24157CoDA: A Human-LM Collaborative Codebook Development Assistant for Domain-Specific Text Annotation
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 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 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 ( ) and an unlabeled dataset , the Sampler selects representative samples from using coverage based sampling. The Generator uses a language model ( ) to predict a label, supporting span, and reasoning. Experts provide feedback on incorrect predictions. The Synthesizer uses to incorporate expert feedback into an evolving codebook ( ), and the Evaluator prompts with to generate labels and measure Macro on after each iteration. Once the Macro on reaches an expert-defined threshold m, or the expert has exhausted the budget b, 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 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 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 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.
2.1 Installation and Setup
CoDA is available as a web-based application hosted on AWS . The implementation is open-source and publicly available on GitHub which includes detailed installation instructions for deploying CoDA on a user's preferred machine and a video walkthrough . Given our focus on societally impactful applications, which often involve sensitive or private data, CoDA can also be deployed locally as a desktop application using language models served through Ollama or hosted entirely on infrastructure managed by the user. CoDA is designed for both researchers and community practitioners, and therefore, we provide multiple onboarding modes tailored to different use cases. First, we provide a static Demo mode that walks users through the
https://coda.44.218.57.167.sslip.io
https://github.com/jr4fs/CoDA/

Figure 2: Setting up an annotation task in CoDA. (1) Users create a new task from the task library, where they can access existing tasks or initialize a new task for codebook development. (2) Users configure the annotation budget, sampling strategy, and language model, and upload the task metadata and datasets. Task metadata specifies the annotation task and label set; the labeled dataset serves as the validation set ( ) for evaluating codebooks during development, while the unlabeled corpus ( ) contains the examples to be annotated at scale.
human-in-the-loop codebook development interface using a lightweight pre-populated task. Second, we provide a fully interactive end-to-end tutorial that guides users through creating a task, iteratively refining a codebook, and scaling annotations using a toy dataset .
2.2 Implementation
CoDA is implemented as a full-stack web application with a React/TypeScript frontend, a Node.js/Express backend for application logic, and a Python/FastAPI backend. The backend performs embedding-based sampling, language model inference, and implements the human-in-the-loop codebook development algorithm (Figure 1) using PyTorch, Sentence Transformers, FAISS, and Ollama while MongoDB stores annotations, task metadata, user accounts, and evaluation metrics. See Appendix §B for package specifications.
To support different deployment settings, CoDA can be deployed locally using open-source language models with Ollama, or configured to use hosted inference providers through a common model interface as documented in our GitHub repository. This modular architecture enables deployment across local machines, academic computing infrastructure, or AWS cloud environments without modifying the user-facing workflow.
2.3 Task Definition
Each task in CoDA is formulated as a multi-class classification task and corresponds to a single codebook defining a target variable. Each variable is associated with a set of labels (e.g., Variable: characterization of health referrals for youth experiencing homelessness; Labels: received referral, health discussion, none).
Users can create an account and manage multiple tasks through their task library as illustrated in Figure 2. To create a new task, the user uploads a task.json file containing the task description and a labels.json file specifying the label set. Optionally, each label may also include a description, keywords, and seed annotation guidelines to initialize the codebook.
The user then uploads two datasets: (1) a human-annotated validation set ( ), which is held out for evaluation, and (2) an unlabeled corpus ( ) from which samples are iteratively selected for annotation and codebook refinement. Finally, the user specifies several task-level parameters, including (1) the annotation budget (b), which determines the maximum number of examples allocated to human-in-the-loop codebook development; (2) the language model used for annotation and codebook development; and (3) metadata describing the columns in the uploaded datasets. Once initialized, the task is added to the user's task library, allowing progress to be saved and resumed across sessions.
2.4 Human-in-the-loop Codebook Development
The human-in-the-loop codebook development builds on the algorithm introduced by Ranjit et al. (2026). As illustrated in Figure 1, CoDA consists of four modules: a sampler, generator, synthesizer,
https://github.com/jr4fs/CoDA/tree/main/sample_dataset
Main Interface
Evaluation panel
Codebook Creation Task: Pangolin Conservation Sentiment
Classify the sentiment of pangolin-related social media posts toward wildlife conservation.
Macro F1
67
90
Run eval on full validation set
4
Human-in-the-loop Codebook
3
Live Codebook
Export
positive: posts that promote rescuing, protecting, or raising awareness about pangolins
negative: posts that promote selling, eating, or using pangolin parts, or blame them for disease
neutral: posts that mention pangolins with no stance — memes, games, logos, plush toys
Posts about pangolin meat and sale of pangolin scales should be labeled as negative because it implies trafficking
PENDING (ADDED ON BATCH COMMIT)
informational posts about pangolins should be labeled as neutral
ADD CODEBOOK RULE
Posts that discuss the sale of pangolin scales should be labeled as negative
Language model generates predictions on sampled data
Batch 4/5 Overall 4/15
Exit
Previous
Next Sample
Singapore seizes huge ivory and pangolin scale shipment from DR Congo bound for Vietnam
AI Suggestion
Labels: NEUTRAL
Span Text:
Singapore seizes huge ivory and pangolin scale shipment from DR Congo bound for Vietnam
Reasoning:
The text is a news headline about the seizure of pangolin scales and ivory, which does not provide a clear stance on conservation efforts. It does not explicitly criticize or support pangolin protection or their consumption.
User provides natural language feedback
Task Labels: POSITIVE NEGATIVE NEUTRAL
Correct label *
NEGATIVE
Feedback *
This post discusses the transport of pangolin scales, implying trafficking of pangolins and should be labeled as negative
2
Scaling Annotations
Review complete
Review completed! You can download the generated codebook metrics here.
FINAL METRICS ON HELD-OUT VALIDATION SET
PRECISION
0.44
RECALL
0.67
F1
0.50
Export codebook
You can download the captured metrics below.
Download sample metrics
Download batch metrics
Download metadata metrics
As a final step, run inference over your full dataset (D_all) using the latest codebook to extract a label for every row.
Run inference on full dataset (D_all)
4 / 11 rows labeled
Go to Dashboard
Figure 3: CoDA’s main codebook development interface. (1) During each iteration, the language model generates a predicted label, supporting text span, and chain-of-thought reasoning for a sampled example, which the user reviews. (2) For incorrect predictions, the user provides the corrected label and natural-language feedback, which CoDA synthesizes into the evolving codebook shown in the left panel. (3) Throughout codebook development, users can inspect and edit the evolving codebook and monitor its Macro performance on the held-out validation set . (4) After completing codebook development, users can export the codebook and evaluation metrics and use the resulting codebook to annotate the full unlabeled corpus at scale.
and evaluator. Figure 3 shows the corresponding user interface. Because the unlabeled corpus can be large and the prevalence of target variables is often low (Ranjit et al., 2026), CoDA first retrieves examples relevant to the user-defined keywords using FAISS similarity search (Douze et al., 2024). For each label, the top 10% most similar examples are selected to construct a candidate pool from . At iteration t, the sampler selects a batch of n examples from the candidate pool for expert review, which are added to the accumulating set: . We use coverage-based sampling (Gupta et al., 2023) to prioritize examples that are dissimilar to those reviewed in previous iterations, encouraging codebook refinement on diverse and representative cases.
For each sampled example, the generator module prompts a language model ( ) with the current codebook along with the task and label metadata provided by the user to generate (1) a predicted label, (2) a supporting text span, and (3) a chain-of-thought reasoning. The expert then verifies each component, marking it as correct or incorrect. When a prediction is incorrect, the user provides natural language feedback correcting the error. The synthesizer module uses to incorporate this feedback into the codebook by revising existing guidelines and consolidating redundant or overlapping rules.
At the end of each iteration, the evaluator prompts with the codebook at iteration ( ) to generate labels on and reports Macro on both and . The refinement loop continues until Macro has reached a user-defined threshold , or the user has exhausted the budget . At any point, the users may also manually edit, delete, or add guidelines to the codebook, with changes taking effect immediately. See Appendix §B for CoDA prompts.
2.5 Scaling Annotations
After completing codebook development, users can generate labels for the full unlabeled corpus by prompting a language model with the final codebook . The final codebook is selected from the iteration at which either the user-defined Macro F1 threshold m on is reached or the annotation budget b is exhausted. The system also allows users to export the final codebook along with evaluation metrics (e.g., precision, recall, and Macro on and ), user feedback, codebook snapshots across iterations, and timing statistics for each iteration.
3 Validation and Usage
We evaluate CoDA on two real world case studies in youth homelessness and wildlife trafficking. In our first case study, we use CoDA to develop a codebook for identifying whether youth experiencing homelessness (YEH) received physical health-related referrals from a corpus of 6,725 case management notes. In our second case study, we use CoDA to develop a codebook for classifying the sentiment of social media posts about pangolins as a proxy for identifying covert instances of wildlife trafficking.
For each case study, we first ask experts to manually develop a codebook ( ) and use this codebook to annotate a held out validation set . Then, we ask the experts to use CoDA to develop a codebook for the same task ( ) on a disjoint set of examples from those used to develop . In both case studies, experts annotate 150 examples for codebook development and are shown 5 examples per iteration. For evaluation, we select the codebook from iteration t that achieves the highest Macro on . We use Qwen1.5-32B-Chat with Q4_0 GGUF quantization as in both case studies. As a zero-shot baseline, we also evaluate a codebook with only the task definition, and the label descriptions as provided by the expert ( ). Using each codebook in the prompt, we compare the Macro on across three models.
3.1 Results
We report Macro on across Llama-3-70B, Qwen2.5-32B, and Qwen2.5-14B by prompting the model with either , , or (Table 1). Overall, CoDA produces codebooks that achieve performance comparable to expert-authored codebooks while consistently outperforming the zero-shot baseline and reducing codebook development from several weeks to approximately two hours using fewer annotated examples. Although all codebooks were developed using Qwen1.5-32B-Chat, they serve as useful guidelines for Llama-3-70B, Qwen2.5-32B, and Qwen2.5-14B, suggesting that codebooks may generalize across language models. Importantly, CoDA substantially reduces expert effort. In the homelessness case study, experts developed a codebook that performed on par with the manually developed codebook in approximately two hours from just 115 annotated examples, whereas the manual codebook required several weeks of expert effort and 593 annotated examples. Qualitatively, CoDA codebooks preserve the intent of the expert guidelines while introducing more explicit decision boundaries for ambiguous cases (see Table 9 in Appendix §C).
3.1.1 Youth Homelessness Case Management
We collaborated with My Friend’s Place, a community organization in Los Angeles serving youth experiencing homelessness (YEH). After each client interaction, case managers document free-text case notes containing rich context about referrals and client needs. Although these notes can inform data-driven interventions, they remain largely unused because extracting structured information from notes requires extensive manual effort.
We use CoDA to develop a codebook for identifying whether a youth received a physical health related referral, with three labels: received referral, health discussion, and none. We first asked a homelessness data and impact manager and a youth homelessness researcher to independently develop an expert codebook (Glaser and Strauss, 2017). Over several weeks, the experts iteratively refined the codebook while independently annotating 593 examples, reaching a Krippendorff’s of 0.8 (Krippendorff, 2011). We reuse these expert-annotated examples as the held-out validation set ( ) for evaluating CoDA. A homelessness data and impact manager then used CoDA to develop a codebook for the same task, with an annotation budget b of 150 examples. For the purposes of validation, we retrospectively selected the codebook checkpoint with the highest Macro on , which occurred at the 23rd iteration after the expert reviewed 115 examples. As shown in Table 1, Qwen2.5-32B achieved a Macro of 0.493 when prompted with , and performed comparably when prompted with . This trend also holds across Llama-3-70B and Qwen2.5-14B. Finally, we prompted Qwen2.5-32B with to classify all 6,725 case management notes, and identified 1,474 notes containing health discussions and 936 in which a youth received a physical health referral.
We compare the expert effort required during the codebook development stage for CoDA and the fully manual process. In the fully manual process, experts iteratively annotated 593 examples to develop the codebook over several weeks. With CoDA, the expert instead reviewed model predictions and provided feedback over successive iterations; the
Co-authors of this paper
| Model | My Friend's Place | Wildlife Trafficking | ||||
|---|---|---|---|---|---|---|
| Llama-3-70B | 0.236 | 0.418 | 0.334 | 0.388 | 0.556 | 0.547 |
| Qwen2.5-32B | 0.343 | 0.493 | 0.446 | 0.398 | 0.552 | 0.529 |
| Qwen2.5-14B | 0.200 | 0.410 | 0.137 | 0.429 | 0.560 | 0.519 |
Table 1: Macro of a baseline codebook (), the best synthesized codebook developed with CoDA (), and the expert codebook () across both case studies. All CoDA codebooks were developed using Qwen1.5-32B. For each case study, we selected the best-performing CoDA codebook on (iteration for My Friend's Place and for Wildlife Trafficking) and used it to prompt each of the three language models on the held-out validation set. Across all evaluated models, CoDA codebooks consistently outperform the simple baseline codebook while achieving performance comparable to, and in several cases exceeding, expert codebooks despite requiring substantially less expert time and annotation effort.
best-performing codebook was obtained after reviewing 115 examples, requiring approximately two hours. Thus, CoDA used approximately fewer expert-reviewed examples during codebook development. This comparison does not include the cost of annotating , which is used only for evaluation.
3.1.2 Wildlife Trafficking
In our second case study, we evaluate CoDA on developing a codebook for classifying the sentiment (positive, negative, or neutral) of social media posts about pangolins, one of the world's most trafficked mammals (Murray and Jackson, 2024). Detecting online wildlife trafficking is challenging because traffickers frequently use coded language, species nicknames, and emojis to conceal illicit activity. Sentiment can serve as a proxy for identifying trafficking-related content; for example, a post such as "yum, pangolin soup" expresses positive sentiment but indicates harmful consumption of a protected species.
We collaborated with an AI for wildlife conservation researcher to first develop an expert codebook and annotate a held out validation set ( ). One of the experts then used CoDA to develop a codebook for the same task; at the 20th iteration, the codebook achieved the highest Macro on . was developed in approximately one hour after reviewing 100 examples. As shown in Table 1, Llama-3-70B achieved a Macro of 0.556 when prompted with , while outperforming and . We prompted Llama-3-70B with to classify 237K social media posts, and identified 10,196 negative sentiment posts indicative of potential trafficking.
4 Related Work
Recent advances in language models have enabled the automated classification and annotation of large-scale unstructured text data (Tai et al., 2024; Kirsten et al., 2025; Gilardi et al., 2023; Törnberg, 2023). Converting unstructured text into structured insights is particularly valuable in human-centered domains, where critical information is often documented as free-text notes rather than structured records. However, these applications frequently require identifying nuanced, canonical concepts that require precise definitions to ensure reliable annotation (Ranjit et al., 2024, 2026; Mendelsohn et al., 2021, 2023). While language models show strong promise for scaling annotation (Wang et al., 2024), their performance depends heavily on the availability of comprehensive codebooks that precisely define each concept and provide detailed annotation instructions (Barany et al., 2024; Xiao et al., 2023; Perkins and Roe, 2024).
Developing these codebooks is a labor-intensive process, typically requiring multiple rounds of qualitative coding, expert discussion, and iterative refinement. Moreover, even carefully developed human annotation guidelines often transfer poorly to language models because they are not tailored to the particular ways in which language models fail in domain specific contexts (Pangakis et al., 2023; Xie and Zhang, 2024; Halterman and Keith, 2026a; Rytting et al., 2023).
Prior work has examined the effectiveness of language models for qualitative coding (Dunivin, 2024; Kim et al., 2024), but has not thoroughly examined the development of the codebook guidelines themselves with language models (Dai et al., 2023; Chew et al., 2023). The nearest neighbor to our work is the framework introduced by Xiong et al. (2025), which focuses on surfacing edge cases and reaching thematic saturation. Our underlying algorithm instead combines coverage-based sampling with natural language expert feedback to iteratively synthesize concise annotation guidelines, while requiring only the label definitions rather than an initial codebook (Katz et al., 2024, 2026).
Our approach builds directly on the algorithm introduced by Ranjit et al. (2026), with several important extensions. Specifically, CoDA provides an interactive interface that enables users to edit the codebook at any point during development and extends the synthesizer to incorporate fine-grained feedback on predicted labels, supporting spans, reasoning, and natural language corrections. To support privacy-sensitive and high-impact applications, CoDA can also be deployed with locally hosted open-source language models. Finally, we evaluate the system through two real-world case studies across two diverse application domains.
5 Conclusion and Future Work
CoDA is a human-LM collaborative codebook development assistant that helps domain experts develop codebooks to uncover new insights from unstructured text data. By combining iterative language model annotation with targeted expert feedback, CoDA reduces the expert effort involved in codebook development while maintaining downstream classification performance. As future work, we plan to continue developing CoDA as an open-source platform by incorporating feedback from community organizations and evaluating the system across a broader range of application domains. Avenues for future work include examining how task parameters, such as sampling strategies and annotation budgets, influence downstream classification performance, as well as investigating alternative stopping criteria for human-in-the-loop codebook development, such as thematic saturation or adaptive stopping based on diminishing performance gains across iterations. We envision CoDA helping community organizations transform large collections of unstructured text into structured insights that support evidence-based decision making in high-impact domains.
6 Limitations
Our evaluation has several limitations. Although our case studies span distinct application domains, both formulate annotation as a single-target, three-class classification task. Future work should evaluate CoDA on more complex settings, including larger or hierarchical label inventories, multi-label tasks, long documents, ambiguous or contested concepts, and workflows involving multiple experts.
Our evaluation focuses on the feasibility and downstream performance of CoDA rather than systematically isolating the effects of individual design choices. Future work could evaluate additional baselines and examine the effects of prompting strategies, prompting ablations, sampling methods, annotation budgets, and stopping criteria. In particular, our current workflow does not explicitly measure thematic saturation (e.g., whether additional examples continue to surface new concepts or require substantive changes to the codebook). Future work could investigate thematic saturation or diminishing improvements across iterations as adaptive stopping criteria for codebook development. It would also be valuable to study qualitative differences between expert and CoDA codebooks and how effectively each transfers across human and language model annotators.
CoDA relies on a representative expert-annotated validation set to evaluate codebooks during development. Constructing such a set introduces additional expert effort, and its size and representativeness may influence both codebook selection and measured performance. Future work should investigate how smaller validation sets and alternative stopping criteria can reduce this requirement. The reductions in development time and expert effort observed in our case studies should be interpreted in the context of each domain and may vary with task complexity.
7 Ethics Statement
7.1 Intended Usage of Language Model Annotations
CoDA is designed as a human-in-the-loop decision system to develop codebooks, rather than a fully automated annotation pipeline. Language model predictions are intended to assist domain experts in developing and refining annotation guidelines, not to replace expert judgment. The downstream scaled language model annotations are intended to augment expert judgment by surfacing data-driven insights, rather than autonomously inform high impact decision making. We do not recommend deploying the system in high-stakes settings without expert oversight, particularly when annotations may influence clinical, legal, or policy decisions.
7.2 Data Privacy
The intended application domains for CoDA may involve sensitive, proprietary, or personally identifiable text. Accordingly, the system supports local deployment, allowing organizations to retain ownership of their data and comply with institutional privacy and data governance requirements. In our case studies involving homelessness case management data, all records were de-identified and sanitized to remove personally identifiable information prior to codebook development and evaluation. Data were used in accordance with an established data use agreement with the participating organizations. Additionally, all case studies were conducted using open-source language models, and all data were stored on secure academic servers.
Acknowledgments
We thank Hannah Murray, Trent Kobielusz, Jeena Mahajan, Ezinne Nwankwo, My Friend's Place, and Breaking Ground for their contributions to the co-design of CoDA. We additionally thank My Friend's Place for providing anonymized case note data and supporting the youth homelessness case study, and Hannah Murray, Trent Kobielusz, and Jeena Mahajan for their contributions to the wildlife trafficking case study. We thank the anonymous reviewers, area chairs, and meta-reviewers of the EMNLP 2026 System Demonstrations track for their thoughtful feedback.
References
Amanda Barany, Nidhi Nasiar, Chelsea Porter, Andres Felipe Zambrano, Alexandra L Andres, Dara Bright, Mamta Shah, Xiner Liu, Sabrina Gao, Jiayi Zhang, and 1 others. 2024. Chatgpt for education research: exploring the potential of large language models for qualitative codebook development. In International conference on artificial intelligence in education, pages 134–149. Springer.
Alvin Po-Chun Chen, Rohan Das, Dananjay Srinivas, Alexandra Barry, Maksim Seniw, and Maria Leonor Pacheco. 2026. Effects of collaboration on the performance of interactive theme discovery systems. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 42507–42526.
Robert Chew, John Bollenbacher, Michael Wenger, Jessica Speer, and Annice Kim. 2023. Llm-assisted content analysis: Using large language models to support deductive coding. arXiv preprint arXiv:2306.14924.
Shih-Chieh Dai, Aiping Xiong, and Lun-Wei Ku. 2023. Llm-in-the-loop: Leveraging large language model for thematic analysis. In Findings of the association for computational linguistics: EMNLP 2023, pages 9993–10001.
Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. 2024. The faiss library. arXiv preprint arXiv:2401.08281.
Zackary Okun Dunivin. 2024. Scalable qualitative coding with llms: Chain-of-thought reasoning matches human performance in some hermeneutic tasks. arXiv preprint arXiv:2401.15170.
Fabrizio Gilardi, Meysam Alizadeh, and Maël Kubli. 2023. Chatgpt outperforms crowd workers for text-annotation tasks. Proceedings of the National Academy of Sciences, 120(30):e2305016120.
Barney Glaser and Anselm Strauss. 2017. Discovery of grounded theory: Strategies for qualitative research. Routledge.
Marco Guevara, Shan Chen, Spencer Thomas, Tafadzwa L Chaunzwa, Idalid Franco, Benjamin H Kann, Shalini Moningi, Jack M Qian, Madeleine Goldstein, Susan Harper, and 1 others. 2024. Large language models to identify social determinants of health in electronic health records. NPJ digital medicine, 7(1):6.
Shivanshu Gupta, Matt Gardner, and Sameer Singh. 2023. Coverage-based example selection for in-context learning. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 13924–13950, Singapore. Association for Computational Linguistics.
Andrew Halterman and Katherine A Keith. 2026a. Codebook llms: Evaluating llms as measurement tools for political science concepts. Political Analysis, 34(2):188–204.
Andrew Halterman and Katherine A Keith. 2026b. What is a protest anyway? codebook conceptualization is still a first-order concern in llm-era classification. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2043–2059.
Andrew Katz, Gabriella Coloyan Fleming, and Joyce B Main. 2026. Thematic analysis with open-source generative ai and machine learning: A new method for inductive qualitative codebook development. Humanities and Social Sciences Communications.
Andrew Katz, Mitch Gerhardt, and Michelle Soledad. 2024. Using generative text models to create qualitative codebooks for student evaluations of teaching. International Journal of Qualitative Methods, 23:16094069241293283.
Hannah Kim, Kushan Mitra, Rafael Li Chen, Sajjadur Rahman, and Dan Zhang. 2024. MEGAnno+: A human-LLM collaborative annotation system. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 168–176, St. Julians, Malta. Association for Computational Linguistics.
Kon Woo Kim, Jin-Dong Kim, and Akiko Aizawa. 2026. Refining and reusing annotation guidelines for llm annotation. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 37951–37964.
Elisabeth Kirsten, Annalina Buckmann, Leona Lassak, Nele Borgert, Abraham Mhaidli, and Steffen Becker. 2025. From assistance to autonomy—a researcher study on the potential of ai support for qualitative data analysis. arXiv preprint arXiv:2501.19275.
Klaus Krippendorff. 2011. Computing krippendorff's alpha-reliability.
Julia Mendelsohn, Ceren Budak, and David Jurgens. 2021. Modeling framing in immigration discourse on social media. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2219–2263, Online. Association for Computational Linguistics.
Julia Mendelsohn, Ronan Le Bras, Yejin Choi, and Maarten Sap. 2023. From dogwhistles to bullhorns: Unveiling coded rhetoric with language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15162–15180, Toronto, Canada. Association for Computational Linguistics.
Hannah Murray and Melody Jackson. 2024. Using twitter data to evaluate pangolin conservation awareness. In Proceedings of the Tenth International Conference on Animal-Computer Interaction, ACI '23, New York, NY, USA. Association for Computing Machinery.
Whitney Nelson, Min Kyung Lee, Eunsol Choi, and Victor Wang. 2024. Designing llm-based support for homelessness caseworkers. In AAAI-2024 Workshop on Public Sector LLMs: Algorithmic and Sociotechnical Design.
Nicholas Pangakis, Samuel Wolken, and Neil Fasching. 2023. Automated annotation with generative ai requires validation. arXiv preprint arXiv:2306.00176.
Mike Perkins and Jasper Roe. 2024. The use of generative ai in qualitative analysis: Inductive thematic analysis with chatgpt. Journal of Applied Learning & Teaching, 7(1):390–395.
Jaspreet Ranjit, Cho Hyundong, Claire Smerdon, Yoon-soo Nam, Myles Phung, Jonathan May, John Blosnich, and Swabha Swayamdipta. 2026. Uncovering intervention opportunities for suicide prevention with
language model assistants. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics 2026, San Diego, USA. Association for Computational Linguistics.
Jaspreet Ranjit, Brihi Joshi, Rebecca Dorn, Laura Petry, Olga Koumoundouros, Jayne Bottarini, Peichen Liu, Eric Rice, and Swabha Swayamdipta. 2024. OATH-frames: Characterizing online attitudes towards homelessness with LLM assistants. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 13033–13059, Miami, Florida, USA. Association for Computational Linguistics.
Christopher Michael Rytting, Taylor Sorensen, Lisa Argyle, Ethan Busby, Nancy Fulda, Joshua Gubler, and David Wingate. 2023. Towards coding social science datasets with language models. arXiv preprint arXiv:2306.02177.
Hope Schroeder, Deb Roy, and Jad Kabbara. 2025. Just put a human in the loop? investigating llm-assisted annotation for subjective tasks. In Findings of the Association for Computational Linguistics: ACL 2025, pages 25771–25795.
Robert H Tai, Lillian R Bentley, Xin Xia, Jason M Sitt, Sarah C Fankhauser, Ana M Chicas-Mosier, and Barnas G Monteith. 2024. An examination of the use of large language models to aid analysis of textual data. International Journal of Qualitative Methods, 23:16094069241231168.
Petter Törnberg. 2023. Chatgpt-4 outperforms experts and crowd workers in annotating political twitter messages with zero-shot learning. arXiv preprint arXiv:2304.06588.
Hanna Wallach, Meera Desai, A Feder Cooper, Angelina Wang, Chad Atalla, Solon Barocas, Su Lin Blodgett, Alexandra Chouldechova, Emily Corvi, P Alex Dow, and 1 others. 2025. Position: Evaluating generative ai systems is a social science measurement challenge. arXiv preprint arXiv:2502.00561.
Xinru Wang, Hannah Kim, Sajjadur Rahman, Kushan Mitra, and Zhengjie Miao. 2024. Human-llm collaborative annotation through effective verification of llm labels. In Proceedings of the 2024 CHI Conference on Human Factors in Computing Systems, CHI '24, New York, NY, USA. Association for Computing Machinery.
Ziang Xiao, Xingdi Yuan, Q Vera Liao, Rania Abdelghani, and Pierre-Yves Oudeyer. 2023. Supporting qualitative analysis with large language models: Combining codebook with gpt-3 for deductive coding. In Companion proceedings of the 28th international conference on intelligent user interfaces, pages 75–78.
Tian Xie and Xueru Zhang. 2024. Automating data annotation under strategic human agents: Risks and potential solutions. Advances in Neural Information Processing Systems, 37:127436–127482.
Chenfei Xiong, Jingwei Ni, Yu Fan, Vilém Zouhar, Donya Rooein, Lorena Calvo-Bartolomé, Alexander Miserlis Hoyle, Zhijing Jin, Mrinmaya Sachan, Markus Leippold, and 1 others. 2025. Co-detect: Collaborative discovery of edge cases in text classification. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 354–364.
A Codesign with Community Organizations
To inform the design of CoDA, we conducted three participatory co-design sessions with practitioners from My Friend's Place and Breaking Ground (homelessness), and researchers specializing in AI for Wildlife Conservation. These sessions consisted of demonstrations of prototypes, and think-aloud walkthroughs. Feedback from these sessions directly informed the design of the system.
Participants from both My Friend's Place and Breaking Ground emphasized that many future users would be case managers and researchers with limited technical experience. One participant remarked, 'breaking the workflow into smaller guided steps instead of showing everything at once would be helpful.' Participants also expressed confusion around terminology such as ground truth, multi-label, and sampling. This feedback resulted in guided onboarding pages before each stage of the workflow and simplified terminology throughout the interface.
Wildlife conservation researchers noted that 'The label might actually be correct, but the reasoning is completely wrong,' while another participant commented, 'I'd want to see what part of the text it's actually using.' Similarly, My Friend's Place participants requested clearer explanations of evaluation metrics before trusting model performance and a place to 'write down rules as we notice them' rather than reconstructing them afterwards. Breaking Ground participants focused on long-running annotation workflows, asking, 'Can I stop halfway through and come back later?' and suggesting configurable annotation budgets before beginning a task. This feedback resulted in supporting evidence spans, model reasoning, synthesized guidelines, integrated metric explanations, a live editable codebook, the Synthesizer module for consolidating expert feedback, resumable annotation sessions, persistent task libraries, progress indicators, configurable annotation budgets, and collapsible workflow stages. We will continue to iteratively refine the system through ongoing community participation, co-design, and user feedback as the platform is deployed across additional organizations and application domains.
B CoDA Prompt Templates and Software Specification
Generator Prompt You are an expert annotation model. Your job is to classify the input text for the following task. Task name: {task_name} Task description: {task_description} Allowed labels: {labels} Codebook guidelines: {guidelines} Input text: {text} Return exactly one JSON object: {"label": ["one_allowed_label"], "span_text": "exact supporting span from the input text or No span text found", "reason": "brief reason based only on the input text and codebook"} Rules: Output valid JSON only., Use exactly the keys label, span_text, and reason. Select exactly one label from the allowed labels., Do not invent labels. Quote the supporting span verbatim. If no supporting span exists, return "No span text found". Keep the reasoning concise and evidence-based.
Table 2: Template used by the Generator module. Variables enclosed in braces are populated dynamically at runtime.
Synthesizer Prompt You are an expert instruction engineer. Given expert feedback on LM predictions, synthesize annotation guidelines that improve future performance. Input: sample_text, ai_labels, ai_reasoning, ai_span_text, ground_truth_labels, user_feedback, user_label/span/reasoning_feedback. Generate rules that are: Generalizable and concise, Clear, instructional, and evidence-based, Resolve ambiguous label boundaries, Improve label, span, and reasoning quality Return only: {"rules": ["Rule 1...", "Rule 2...", ...]}
Table 3: Template used by the Synthesizer module. Expert feedback from each annotation batch is synthesized into generalized codebook rules.
| Model | Specification |
|---|---|
| Meta-Llama-3-70B-Instruct | 70B parameters |
| Qwen2.5-32B-Instruct | 32B parameters |
| Qwen2.5-14B-Instruct | 14B parameters |
| GPU | NVIDIA RTX A6000 |
| # GPUs | 4 (inference) |
Table 4: Language models evaluated in this work. Qwen1.5-32B-Instruct was used for codebook development, while all three models were used for evaluation.
The system follows a three-tier architecture: a React single-page application served as static assets behind a Caddy reverse proxy (which also terminates TLS), a Node.js/Express backend-for frontend that handles authentication, task orchestration, and data persistence to MongoDB, and a Python/FastAPI ML service responsible for embedding-based sampling (via FAISS over all-mpnet-base-v2 embeddings), and LM inference. Table 5 summarizes the software versions.
| Component | Version / Specification |
|---|---|
| Frontend | React 19.2, TypeScript 5.9, Vite 7.2, Node.js 20 (LTS) |
| Backend | Express 5.2, MongoDB Node.js Driver 7.0, JWT (jsonwebtoken 9.0), Argon2 |
| Python Stack | Python 3.11, FastAPI, uvicorn (ASGI), PyTorch (CPU build) |
| Embeddings | all-mpnet-base-v2 |
| Vector Search | FAISS (CPU) |
| LLM Serving | Ollama (local/development), OpenRouter API (production) |
Table 5: Software components and versions used to implement CoDA.
C Case Study Metadata
We include the final distribution of scaled annotations on in Figure 4, CoDA time statistics and user ratings on the usefulness of the explanations and span in Table 8, dataset statistics for each of our case studies in Table 7 and Table 6, and a subset of guidelines comparing the expert codebook and CoDA codebook in Table 9.

(a) Wildlife Trafficking
(b) My Friend's Place
Figure 4: Distribution of Llama-3-70B predicted sentiment labels of 237K social media posts on wildlife trafficking of pangolins (left) and Qwen2.5-32B referral related labels of 6K case management notes (right).
| Statistic | |||
|---|---|---|---|
| Total Examples | 150 | 585 | 237,977 |
| Positive | 36 | 128 | 122,160 |
| Negative | 44 | 251 | 10,196 |
| Neutral | 70 | 206 | 105,621 |
Table 6: Dataset statistics and label distributions for the wildlife trafficking sentiment classification task.
| Statistic | |||
|---|---|---|---|
| Total Examples | 150 | 593 | 6,725 |
| Not Relevant | 114 | 416 | 4,315 |
| Health Discussion | 12 | 87 | 1,474 |
| Received Referral | 24 | 90 | 936 |
Table 7: Dataset statistics and label distributions for the My Friend's Place health referral case study.
| Metric | MFP | Wildlife |
|---|---|---|
| Total Time (min) | 114.0 | 55.3 |
| LM Explanation Useful (%) | 73.2 | 54.0 |
| LM Span Useful (%) | 71.8 | 96.7 |
Table 8: Annotation efficiency and qualitative feedback collected with CoDA.
Expert Codebook
Health Discussion
-
Mental health only does not count. Discussion could be physical and mental health related.
-
Even if only one sentence about physical health out of a long note, it counts.
-
Case notes exclusively limited to between providers are “none” because the young person is not involved in the discussion. . . .
Referral
-
If assistance is recommended/offered, then it counts as a referral.
-
Even if young person declines, still counts as referral (e.g., “declined medical support”).
-
Offering transportation, care coordination involving young person (e.g., creating appointment, checking insurance coverage, logistics planning/support). . . .
Not Relevant
-
Medication should be coded as “none” because do not know if it’s for physical or mental health, unless specified or based on context clues.
-
Reference to hospital may not be clear if it’s for physical or mental health. This results in a “none” code. . . .
CoDA Codebook ()
Health Discussion
-
Health discussions must involve clear evidence of an individual’s health status and its potential impact, not just general observations; if the text lacks explicit mention of treatment or referrals, reconsider the label.
-
When the text primarily discusses personal conversations or administrative tasks without clear healthcare intervention, label as “not relevant” instead of “health discussion”. . . .
Referral
-
Consider the context and actions taken; if a case manager coordinates or arranges a meeting or appointment for the individual with healthcare services, label it as “referral”, even if no specific medical care is provided.
-
Include explicit mention of an individual’s interaction with healthcare services to justify a “referral” label. If the individual declines medical care, still code the event as a “referral”. . . .
Not Relevant
-
If the case note focuses on a discussion between agencies without addressing specific treatment or referrals for health concerns, label as “not relevant”.
-
Do not label as “referral” when discussing coordination between agencies without direct involvement in securing appointments. . . .
Table 9: Comparison of representative expert and CoDA annotation guidelines for the My Friend’s Place case study.