Blog Post
New in AI Rule Engine: Inference, Traces, What-If, and More
We shipped a lot this month, and the pieces fit together: an engine that lets rules build on each other, tools to see and simulate what it does, and the authoring primitives underneath. Here’s the whole set at a glance — follow any heading for the full story.
Forward-chaining inference
Rules that re-fire as their actions change the facts other rules read. The engine fires one rule at a time by salience, re-evaluates only the rules whose inputs actually changed, and runs until it reaches a stable state — with an activation cap as a backstop. It’s opt-in per RuleSet from the match-policy dropdown, and a whole cascade still counts as one metered run.
Read more: Forward-Chaining Inference
Explainable rule runs
The inference trace is a timeline of every firing, with a green/red “Why it matched” condition tree showing the actual values, every context change old → new, and the derived facts that resolved along the way. Explain with AI turns any trace into a plain-language summary. Tests are always traced; production runs are traced when you turn on Record run traces.
Read more: Explainable Rule Runs
What-if simulation
Edit the inputs, click Compare, and see which rules flip and which conclusions change — each traced back to the input that moved it. Runs happen in the sandbox: no side effects, unmetered, nothing in run history. Available in the Runner after a run and inside every test result, for both inference and classic sets.
Read more: What-If Simulation
Derived facts
Context values computed on demand from other values instead of supplied as input — resolved the first time a rule reads them, and re-derived automatically under inference. Use them for defaults, shared definitions like IsVip, expression-computed values like riskScore, or AI-classified flags that run lazily and aren’t re-billed while their inputs are unchanged.
Read more: Derived Facts
The expression language
ctx.price * ctx.qty, anywhere a value goes — and on the left side of a condition. Read context with ctx.key, use 32 built-in functions across strings, math, dates, and arrays, stay null-safe with coalesce, and get live validation as you type. Deterministic on purpose: no now(), no random().
Read more: The Expression Language
Collection conditions
Reason about a whole array in one clause. Aggregates — Count, Sum, Average, Min, Max — reduce an array to a scalar before comparing. Quantifiers — Any, All, No element — apply the test per element and fold the results. “Any line item over $500” and “cart total under the limit” each become a single line.
Read more: Collection Conditions
And a note on the thread running through all of it
None of the above would be trustworthy without determinism — repeatable runs are what make what-if comparisons and the release test gate mean something. If you want the reasoning behind the design, that’s its own post: Deterministic by Design.
Visit RuleEngine.ai to try it.
The AI Rule Engine Team