Designing LLM Chains by Adapting Techniques from Crowdsourcing Workflows

Madeleine Grunde-McLaughlin, Michelle S. Lam, Ranjay Krishna, Daniel S. Weld, Jeffrey Heer

TL;DR

This paper bridges the gap between the nascent field of LLM chaining and the mature domain of crowdsourcing workflows. By developing a design space and adapting crowdsourcing strategies, the authors provide a framework for building more robust, controllable, and effective LLM chains, particularly for complex tasks.

What Problem Does This Paper Address?

Large Language Models (LLMs) are powerful but suffer from limitations like hallucinations, brittleness, and difficulty with complex, multi-step tasks. LLM chaining, which breaks down tasks into sequential LLM calls, offers a solution, but the vast design space of possible chains makes development challenging. This paper addresses this challenge by drawing inspiration from crowdsourcing workflows, a field that has long grappled with decomposing complex tasks for human workers and mitigating their limitations. The authors aim to adapt successful crowdsourcing techniques to LLM chain design, providing designers with a structured approach to navigate this complexity.

Methods

The core of this paper is the creation of a design space for LLM chains, informed by a systematic review of 107 papers from both crowdsourcing and LLM chaining literature. This design space categorizes workflows based on:

  • Objectives: What the designer wants to accomplish (e.g., outcome quality, resource constraints, objectivity vs. subjectivity, task specificity vs. generality).
  • Tactics: The building blocks of workflows, including:
  • Actors: Crowdworkers, LLMs, and Users.
  • Subtasks: Generate, Evaluate, Improve, Focus, Partition, Merge.
  • Architectures: Sequential, Branching, Redundant, Dynamic, Communicative.

The authors then identify strategies that mediate how tactics are used to achieve objectives, drawing parallels between crowdsourcing and LLM chaining. Three case studies adapt existing crowdsourcing workflows (Cascade for taxonomy creation, Soylent for text shortening, and Mechanical Novel for story generation) to LLM chains, highlighting how LLM-specific challenges (like context length and output formatting) necessitate adaptations.

Datasets

The paper mentions the use of datasets for evaluation in its case studies:

  • Case Study 1 (Taxonomy Creation): MIT Indoor Scenes [135], MSCOCO [104], and CIFAR100 [86] datasets were used to evaluate taxonomy generation.
  • Case Study 2 (Text Shortening): XSUM summarization dataset [126] was used for input texts, and texts from the original Soylent paper [20] were used for qualitative analysis.
  • Case Study 3 (Short Story Generation): Prompts from the original Mechanical Novel paper [78] were used.

No new datasets were introduced; existing ones were leveraged for evaluation.

Key Insights and Ideas

  • Crowdsourcing as a Blueprint: The mature field of crowdsourcing offers a rich set of proven strategies and tactics that are highly transferable to LLM chain design, providing a valuable shortcut for navigating the LLM chaining design space.
  • LLM Limitations Require Different Tactics: While the strategies (e.g., diverse responses, validation) are similar, the tactics to implement them need adaptation for LLMs. LLMs' stochasticity differs from human diversity, and their lack of common sense necessitates more explicit validation and simpler subtasks.
  • User Guidance is Underexplored in Chaining: Techniques for user interaction and direct manipulation, common in crowdsourcing, are less explored in LLM chaining but offer significant potential for controlling subjective outcomes and exploring design spaces.
  • Adaptable Architectures for Flexibility: Dynamic and adaptable architectures, which build workflows at runtime, can reduce design effort and generalize better to varied inputs, a key advantage for LLMs.
  • Context is Crucial but Tricky: Providing sufficient context is vital for LLM chains, but over-complication can lead to confusion. Finding the "minimum sufficient context" is an ongoing challenge.

Key Results

  • Case Study 1 (Taxonomy Creation): Cascade-LLM demonstrated significantly better control over taxonomy shape (number of categories) compared to zero-shot LLM baselines, achieving near-perfect matches to target category counts. It also produced richer taxonomies with more categories and greater depth, while avoiding hallucinated or forgotten items. However, it incurred higher costs in terms of time and API calls.
  • Case Study 2 (Text Shortening): Soylent-LLM was more precise in meeting target text lengths, especially for longer texts, compared to zero-shot baselines. It also produced outputs with lower perplexity (indicating better fluency) but sometimes exhibited abrupt transitions. It was more costly than zero-shot baselines.
  • Case Study 3 (Short Story Generation): MN-LLM generated more, longer, and higher-quality story combinations, and its suggestions were more varied. Crowdworker evaluations showed MN-LLM stories were rated higher for imagery, originality, and style, though zero-shot stories were judged as more coherent and complete in plot. MN-LLM also incurred significantly higher costs.

Limitations and Future Work

  • Scope Limitations: The work focuses on LLM chains and crowdsourcing, potentially overlooking other task decomposition methods or multi-modal models. The LLM chaining literature is still nascent, and keyword searches might have missed relevant work.
  • Broader Impacts: The paper acknowledges but does not deeply explore potential risks like job displacement, labor rights, privacy, ownership, and sense of agency.
  • Rapid LLM Evolution: Recommendations are contingent on current LLM capabilities, which are rapidly changing. Future work should monitor these changes.
  • Lack of User Evaluation: The case studies were not user-evaluated, relying on theoretical benefits and qualitative analysis. Future work should conduct user studies to validate the benefits of direct manipulation interfaces.
  • Systematic Studies Needed: More systematic studies are needed to understand optimal chain design, especially for subjective tasks and dynamic/communicative architectures.
  • Design Support Tools: LLM chain design processes are currently unstructured. Future work should focus on developing tools like operator repositories, prompt optimization methods, and sketching-inspired design approaches.
  • Integrating Users: Further research into how users can be integrated into LLM chains, inspired by crowdsourcing, is crucial, especially for subjective tasks.
  • LLM vs. Human Validation: LLMs' reliability in validating their own responses is less consistent than human crowdworkers, requiring more specific and often programmatic validation steps.

Summary updated

BibTeX
@article{grundemclaughlin2023designing,
  author = {Madeleine Grunde-McLaughlin and Michelle S. Lam and Ranjay Krishna and Daniel S. Weld and Jeffrey Heer},
  title = {{Designing LLM Chains by Adapting Techniques from Crowdsourcing Workflows}},
  journal = {ACM Trans. Comput. Hum. Interact.},
  year = {2023},
}
Figure