IBM Research has released Mellea 0.4.0 and three Granite Libraries (granitelib-core-r1.0, granitelib-rag-r1.0, granitelib-guardian-r1.0) for building structured AI workflows on top of IBM Granite models. Mellea is an open-source Python library that replaces probabilistic prompt behavior with structured, maintainable generative programs using constrained decoding and composable pipelines. The 0.4.0 release adds native integration with the Granite Libraries, an instruct-validate-repair pattern via rejection sampling, and observability hooks. The Granite Libraries are collections of LoRA adapters fine-tuned for specific tasks like query rewriting, hallucination detection, and policy compliance, targeting the granite-4.0-micro model.
Table of contents
Overview Mellea 0.4.0 What Are the Granite Libraries Getting Started Mellea Granite Libraries Learn More OverviewMellea 0.4.0What Are the Granite LibrariesGetting StartedSort: