Thirteen ways to combine language models with rule systems explained
Hybrid AI Patterns: Thirteen Ways to Couple Language Models with Rules, and How to Choose Among Them
Artificial Intelligence
Summary
Language models are great at understanding and creating text, while rule engines explain decisions with clear proofs. The authors identify thirteen distinct patterns for combining these two approaches, describing when and how to use each. They also provide a guide to help choose the best pattern for a specific problem, supported by tests comparing hybrid methods to language models alone. The study aims to clarify different hybrid AI designs and their trade-offs.
What this means in practice
- •For software developers: Choose the right hybrid AI design pattern for integrating language models and rule engines to build reliable text-based applications with explainable logic.
- •For ai system architects: Determine which coupling pattern optimizes control and reasoning flows between language models and rules for complex AI systems.
A survey. It maps existing work.
Authors
Siegfried Handschuh, Götz-Henrik Wiegand, Lorena Raichle
Abstract
Language models handle text well, and rule engines give conclusions with proofs. Systems that combine the two are usually described by example, and the same coupling turns up under different names in agent frameworks, guardrail toolkits and neuro-symbolic research. This document defines thirteen patterns for coupling a language model with an executable rule language, in the catalogue form introduced for object-oriented design: intent, motivation, applicability, participants, collaborations, consequences, implementation, known uses and related patterns. Four patterns concern what crosses the boundary between model and rules, five who controls whom, three how the model takes part in the reasoning, and one how knowledge is kept over time. Five invariants hold for every combination, and five failure patterns name the couplings that break them. We relate the catalogue to published pattern catalogues and taxonomies of hybrid and neuro-symbolic systems and show where they overlap with it. A decision guide leads from a problem to a pattern. It rests on our measurements, including the cases in which a model alone did as well as the hybrid or better, and it reports what each design cost.