ChainForge: A Visual Toolkit for Prompt Engineering and LLM Hypothesis Testing

Ian Arawjo, Chelse Swoopes, Priyan Vaithilingam, Martin Wattenberg, Elena Glassman
9/17/2023
cs.HCcs.AI

No official code found. Best implementation: ianarawjo/ChainForge (3,009 stars, MIT, last commit 2026-04-06).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

An open-source visual programming environment for battle-testing prompts to LLMs.

3,009257CSS, HTMLMar 26, 20236 months agoMIT
aievaluationlarge-language-modelsllmopsllms+1 more

Similar Papers

Cite this paper

@article{arawjo2023chainforge,
  title  = {ChainForge: A Visual Toolkit for Prompt Engineering and LLM Hypothesis Testing},
  author = {Ian Arawjo and Chelse Swoopes and Priyan Vaithilingam and Martin Wattenberg and Elena Glassman},
  year   = {2023},
  eprint = {2309.09128},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.09128v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.09128.svg)](https://codeofpaper.com/paper/2309.09128)

Discussion