ConstitutionalExperts: Training a Mixture of Principle-based Prompts

Savvas Petridis, Ben Wedin, Ann Yuan, James Wexler, Nithum Thain
3/7/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) are highly capable at a variety of tasks given the right prompt, but writing one is still a difficult and tedious process. In this work, we introduce ConstitutionalExperts, a method for learning a prompt consisting of constitutional principles (i.e. rules), given a training dataset. Unlike prior methods that optimize the prompt as a single entity, our method incrementally improves the prompt by surgically editing individual principles. We also show that we can improve overall performance by learning unique prompts for different semantic regions of the training data and using a mixture-of-experts (MoE) architecture to route inputs at inference time. We compare our method to other state of the art prompt-optimization techniques across six benchmark datasets. We also investigate whether MoE improves these other techniques. Our results suggest that ConstitutionalExperts outperforms other prompt optimization techniques by 10.9% (F1) and that mixture-of-experts improves all techniques, suggesting its broad applicability.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{petridis2024constitutionalexperts,
  title  = {ConstitutionalExperts: Training a Mixture of Principle-based Prompts},
  author = {Savvas Petridis and Ben Wedin and Ann Yuan and James Wexler and Nithum Thain},
  year   = {2024},
  eprint = {2403.04894},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.04894v1}
}

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/2403.04894.svg)](https://codeofpaper.com/paper/2403.04894)

Discussion