Link to original article
Welcome to The Nonlinear Library, where we use Text-to-Speech software to convert the best writing from the Rationalist and EA communities into audio. This is: A Library and Tutorial for Factored Cognition with Language Models, published by Andreas Stuhlmüller on September 28, 2022 on The AI Alignment Forum. We want to advance process-based supervision for language models. To make it easier for others to contribute to that goal, we're sharing code for writing compositional language model programs, and a tutorial that explains how to get started: The Interactive Composition Explorer (ICE) is a library for writing and debugging compositional language model programs. The Factored Cognition Primer is a tutorial that explains using examples how to write such programs. We've been using ICE as part of our work on Elicit and have found it useful in practice. Interactive Composition Explorer (ICE) ICE is an open-source Python library for writing, debugging, and visualizing compositional language model programs. ICE makes it easy to: Run language model recipes in different modes: humans, human+LM, LM Inspect the execution traces in your browser for debugging Define and use new language model agents, e.g. chain-of-thought agents Run recipes quickly by parallelizing language model calls Reuse component recipes such as question-answering, ranking, and verification ICE looks like this: Factored Cognition Primer The Factored Cognition Primer is a tutorial that explains (among other things) how to: Implement basic versions of amplification and debate using ICE Reason about long texts by combining search and generation Run decompositions quickly by parallelizing language model calls Use verification of answers and reasoning steps to improve responses The Primer looks like this: If you end up using either, consider joining our Slack. We think that factored cognition research parallelizes unusually well and would like to collaborate with others who are working on recipes for cognitive tasks. Thanks for listening. To help us out with The Nonlinear Library or to learn more, please visit nonlinear.org.