Factored Cognition Primer: How to write compositional language model programs
primer.ought.org