CoDA: A Human-LM Collaborative Codebook Development Assistant for Domain-Specific Text Annotation
Organizations: Thomas Lord Dept. of Computer Science, University of Southern California · My Friend’s Place, Los Angeles, California · School of Social Work, University of North Carolina
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 5X 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.
Figures & tables
| My Friend’s Place | Wildlife Trafficking | |||||
|---|---|---|---|---|---|---|
| Model | ||||||
| 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 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| 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) |
| 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) |
| Statistic | |||
|---|---|---|---|
| Total Examples | 150 | 585 | 237,977 |
| Positive | 36 | 128 | 122,160 |
| Negative | 44 | 251 | 10,196 |
| Neutral | 70 | 206 | 105,621 |
| Statistic | |||
|---|---|---|---|
| Total Examples | 150 | 593 | 6,725 |
| Not Relevant | 114 | 416 | 4,315 |
| Health Discussion | 12 | 87 | 1,474 |
| Received Referral | 24 | 90 | 936 |
| Metric | MFP | Wildlife |
|---|---|---|
| Total Time (min) | 114.0 | 55.3 |
| LM Explanation Useful (%) | 73.2 | 54.0 |
| LM Span Useful (%) | 71.8 | 96.7 |
LLM-Assisted Annotation
Large language model-assisted annotation uses AI to label, classify, and structure data, often with human review to improve scale and consistency.
See all 202 papers