Evaluating outputs of large language models (LLMs) is challenging, requiring making -- and making sense of -- many responses. Yet tools that go beyond basic prompting tend to require knowledge of programming APIs, focus on narrow domains, or are closed-source. We present ChainForge, an open-source visual toolkit for prompt engineering and on-demand hypothesis testing of text generation LLMs. ChainForge provides a graphical interface for comparison of responses across models and prompt variations. Our system was designed to support three tasks: model selection, prompt template design, and hypothesis testing (e.g., auditing). We released ChainForge early in its development and iterated on its design with academics and online users. Through in-lab and interview studies, we find that a range of people could use ChainForge to investigate hypotheses that matter to them, including in real-world settings. We identify three modes of prompt engineering and LLM hypothesis testing: opportunistic exploration, limited evaluation, and iterative refinement.
翻译:评估大语言模型(LLM)的输出极具挑战性,需要生成并理解大量响应。然而,现有工具或需编程API知识、或局限于特定领域、或为闭源系统。我们提出ChainForge——一款面向文本生成大语言模型的提示工程与按需假设检验的开源可视化工具包。该工具通过图形化界面支持跨模型与提示变体的响应比较。系统设计聚焦三项核心任务:模型选择、提示模板设计及假设检验(如审计)。我们在开发早期即发布ChainForge,并与学者及在线用户持续迭代设计。通过实验室与访谈研究,我们发现不同背景的用户均能利用ChainForge探究其关注的问题(包括真实场景应用)。我们识别出提示工程与大语言模型假设检验的三种模式:机会性探索、有限评估与迭代优化。