SPADE:为大型语言模型流水线合成数据质量断言
SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelines
AI总结:
SPADE通过分析LLM提示版本历史自动合成数据质量断言,以最小断言集合识别LLM错误输出,在真实流水线中减少14%断言数量和21%误报失败,并已部署于LangSmith服务超2000个流水线。
摘要:
大型语言模型(LLMs)正越来越多地作为流水线的一部分被部署,这些流水线会反复处理或生成某种数据。然而,部署的一个常见障碍是困扰LLM的频繁且往往不可预测的错误。承认这些错误的不可避免性,我们提出数据质量断言(data quality assertions)来识别LLM何时可能出错。我们提出SPADE,一种自动合成数据质量断言以识别不良LLM输出的方法。我们观察到,开发人员通常在部署前的原型设计阶段识别数据质量问题,并尝试通过随时间向LLM提示中添加指令来解决这些问题。因此,SPADE分析提示版本随时间的历史记录以创建候选断言函数,然后选择一个满足覆盖率和准确性要求的最小集合。在跨九个不同真实世界LLM流水线的测试中,与更简单的基线相比,SPADE有效地将断言数量减少了14%,并将误报失败减少了21%。SPADE已作为LangChain的LLM流水线中心LangSmith中的一项产品部署,并已用于为跨多个行业的2000多个流水线生成数据质量断言。
英文摘要:
Large language models (LLMs) are being increasingly deployed as part of pipelines that repeatedly process or generate data of some sort. However, a common barrier to deployment are the frequent and often unpredictable errors that plague LLMs. Acknowledging the inevitability of these errors, we propose {\em data quality assertions} to identify when LLMs may be making mistakes. We present SPADE, a method for automatically synthesizing data quality assertions that identify bad LLM outputs. We make the observation that developers often identify data quality issues during prototyping prior to deployment, and attempt to address them by adding instructions to the LLM prompt over time. SPADE therefore analyzes histories of prompt versions over time to create candidate assertion functions and then selects a minimal set that fulfills both coverage and accuracy requirements. In testing across nine different real-world LLM pipelines, SPADE efficiently reduces the number of assertions by 14\% and decreases false failures by 21\% when compared to simpler baselines. SPADE has been deployed as an offering within LangSmith, LangChain's LLM pipeline hub, and has been used to generate data quality assertions for over 2000 pipelines across a spectrum of industries.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。