Mellea is a library for writing generative programs.
Welcome! This project takes us back to the future of computing by formally introducing the concept of generative programs—software systems that strategically integrate calls to Large Language Models (LLMs)—and the demanding engineering required to make them reliable. The fundamental challenge we address is how to safely and predictably harness the powerful but inherently stochastic operations of LLMs within traditionally deterministic codebases. This documentation establishes a rigorous framework, emphasizing core techniques like requirement verification to circumscribe periods of non-determinism, mechanisms for repairing failure traces, and advanced context management. Ultimately, this work outlines essential principles and architectural patterns needed to construct robust, high-confidence generative software that effectively merges the capabilities of LLMs with reliable computational predictability.But let’s get started! Choose your path: