研究者通过逐个文本分类浪费了80%的LLM标注成本
Researchers waste 80% of LLM annotation costs by classifying one text at a time
AI总结:
研究发现通过批量处理和堆叠变量可大幅降低LLM文本分类成本,同时保持编码质量,核心贡献是验证了批量和堆叠在保持准确性的同时有效降低了成本。
摘要:
大型语言模型(LLM)在社会科学中的文本分类应用日益增加,但研究者普遍采用逐个文本分类的方式,导致成本浪费。本文发现通过批量处理25个文本并堆叠所有变量到一个提示中,可将API调用次数从40万次减少到4000次,降低成本超过80%。尽管如此,编码质量是否会下降尚不清楚。我们测试了八种生产级LLM在3962条专家编码推文中,针对四个任务,通过变化批处理大小(1至1000个文本)和堆叠最多25个编码维度,发现六种模型在批处理大小达到100时仍能保持与单个文本分类基线相差2个百分点的准确性。变量堆叠最多10个维度的结果与单变量编码相当,降级因素由任务复杂性而非提示长度驱动。在此安全操作范围内,批量和堆叠的测量误差小于真实数据中典型的编码者间差异。
英文摘要:
Large language models (LLMs) are increasingly being used for text classification across the social sciences, yet researchers overwhelmingly classify one text per variable per prompt. Coding 100,000 texts on four variables requires 400,000 API calls. Batching 25 items and stacking all variables into a single prompt reduces this to 4,000 calls, cutting token costs by over 80%. Whether this degrades coding quality is unknown. We tested eight production LLMs from four providers on 3,962 expert-coded tweets across four tasks, varying batch size from 1 to 1,000 items and stacking up to 25 coding dimensions per prompt. Six of eight models maintained accuracy within 2 pp of the single-item baseline through batch sizes of 100. Variable stacking with up to 10 dimensions produced results comparable to single-variable coding, with degradation driven by task complexity rather than prompt length. Within this safe operating range, the measurement error from batching and stacking is smaller than typical inter-coder disagreement in the ground-truth data.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。