ai·rete·RAG is a new system that pairs a Rete rule engine with retrieval-augmented generation (RAG) to combine deterministic logic with natural language explanation.
ai·rete·RAG combines Rete rule engines with RAG for auditable explanations
The system addresses the inherent trade-offs of each method: Rete engines provide precise, repeatable, and auditable decisions but cannot explain themselves in natural language, while RAG is fluent at explanation and synthesis but lacks exact, repeatable logic. By running them together, ai·rete·RAG uses rules to decide the "what" and RAG to explain the "why" based on user documents.
In the proposed workflow, the Rete engine fires first to produce a decision trace. RAG is then invoked to generate a human-readable explanation grounded in the source documents. This approach allows rules to narrow the scope before retrieval—for example, a medical case could fetch only cardiology sources to reduce hallucinations.
The system allows users to browse a full rule catalog including conditions and verdicts, and provides visibility into why specific rules fired or failed to meet a threshold. Additionally, a static analysis feature flags potential conflicts where different rules might produce different verdicts for the same case.
Sources
- Show HN: AI·rete·RAG – a Rete rule engine decides, RAG explains why (Hacker News Frontpage, 2026-09-22)