Case Study
How Sella Delivers Scalable Credit Risk Explanations with Prometheux
Read More
Capabilities / Graph & Complex Data Processing

Recursion,
Written as Rules

Get the full chain, not the first level. Supply chains, org hierarchies and bills of materials are recursive by nature, so Prometheux runs recursion with aggregation as a few readable rules: no hop limit, no hand-written loop, totals that roll up as it goes.

Proven in production

Why recursion hurts today

Loops Break.
Rules Converge.

SQL, pipeline code and graph query languages can all recurse, but only with workarounds. The logic ends up in orchestration code or bounded path patterns that nobody wants to touch when the hierarchy changes.

CTEs, loops and path patterns
Recursive rules in Vadalog
Hand-written loops that join until nothing changes
Write the base case and recursive case; the engine iterates for you
Most SQL engines forbid aggregation inside the recursive step
Monotonic aggregates like msum accumulate safely through recursion
Path patterns list every route first, then total them
Aggregates like msum build as the recursion runs, not after every path is listed
Recursive CTEs capped at a fixed iteration depth
Runs to any depth and stops when no new facts can be derived
One script per hierarchy, copied and tweaked
Rules compose: one definition reused by every query and agent
Results with no record of how they were reached
Every derived fact is traceable to the rules and rows behind it
Recursion as a language feature

Say What It Means.
Not How to Loop.

A recursive rule states a definition, such as "a plant depends on every supplier of a supplier it depends on". Prometheux works out the iteration, runs it in parallel and keeps going until the answer is complete.

Base and Recursive Cases

Two or three rules capture what used to take a loop, a temp table and a convergence check.

Aggregates Inside Recursion

msum and mmax let totals build up as the recursion runs, such as the total cost of a bill of materials.

Mutual Recursion

Rules can lead back to themselves through other rules, so layered definitions stay small and reusable.

Reason Over Gaps

Existential rules can posit facts that aren't stored yet, such as an unnamed intermediate supplier, and keep reasoning.

What this means for you ⟶

Talk to an engineer

Replace orchestration code with definitions. Change a hierarchy rule once, everywhere. Hand reviewers logic they can actually read.

Where recursion lives

Deep Chains,
Real Data

Recursive rules run over the sources you connect, from warehouse tables to Parquet files. Results are new relations that other rules, SQL queries, APIs and agents can use directly.

Supply Chains

Which plants depend on this supplier, at any tier? A classic recursive question, solved in two rules.

Hierarchies

Roll up org charts, cost centres, product categories or approval chains to any level.

Bill of Materials

Explode an assembly into every sub-part, or find every product that contains a given component.

Beyond Cypher

Cypher handles patterns; recursive reasoning runs in Vadalog rules on top of the patterns' results.

What this means for you ⟶

Read the docs

Answer the full-chain question, not the first level. Keep data where it is while you recurse over it. Serve recursive results to apps and agents.

How it works

From Hierarchy
To Full Answer

01

Connect the Relationships

Connect the tables that hold supplier, reporting or part-of links. Nothing is copied.

02

Write Two Rules

State the base case and the recursive case. Add aggregates if totals build along the chain.

03

Get the Closure

The engine derives every fact that follows, with the rules and rows behind each one.

Where it pays off

Recursive Problems,
Everyday Stakes

Banking

Fraud Rings

Follow payments between accounts any number of hops to find rings that no single transfer reveals.

Finance & banking →
Manufacturing

BOM Explosion

List every sub-component of a product, or every product affected by a recalled part, from the BOM tables you already keep.

Manufacturing →
Insurance

Group Structures

Roll exposures and policies up through broker, agency and group hierarchies without rewriting pipelines when they change.

Insurance →
Research

Rooted in Datalog

Vadalog comes from peer-reviewed work on recursive reasoning with Oxford, TU Wien and Banca d'Italia.

Browse the papers →

Recursive Reasoning at Scale

“With Prometheux, we achieved a speed-up of over 250% on critical tasks involving complex reasoning over knowledge graphs with hundreds of millions of nodes and billions of edges.”
HR Head of R&D
Financial institution
“Prometheux technology powers highly scalable and explainable reasoning over some of the world's largest knowledge graphs.”
NV NVIDIA Technical Blog
Accelerating Neurosymbolic AI with RAPIDS and Vadalog Parallel
FAQ

Questions,
Answered

What is a recursive rule?

A rule whose definition leads back to itself, directly or through other rules. It has a base case from your data and a recursive case that builds on it, like "a plant depends on every supplier of a supplier it depends on".

How is this different from a recursive CTE?

Recursive CTEs work for simple chains, but most SQL engines don't allow aggregation inside the recursive step and the logic gets hard to reuse. Vadalog supports monotonic aggregates such as msum inside recursion, and rules compose across programs.

Why not a loop in PySpark?

A loop needs hand-written joins, a temp table and a stop condition for each hierarchy. In Vadalog you write the definition and the engine handles iteration and parallel execution.

What about cycles in my data?

Rules are evaluated to a fixed point: once no new facts can be derived, the engine stops. Following a loop in supplier or reporting links (who depends on whom) stops once every link has been found; for computed values such as path length, a minimum-style aggregation lets the result settle.

Can Cypher do recursion in Prometheux?

Cypher handles pattern matching, including variable-length paths. Recursive reasoning runs in Vadalog rules, which can consume the results of your Cypher patterns.

How is this different from variable-length paths in a graph query?

A variable-length pattern finds routes; totals and conditions are applied afterwards, and long unbounded patterns can multiply. A recursive rule states the definition, aggregates such as msum accumulate as it runs, and evaluation stops at a fixed point. Every derived fact is traceable to its rules and rows.

Turn Your Deepest
Hierarchy Into Rules

Bring a recursive problem you solve with loops today. We'll write it as rules on your own data.

We use some essential cookies to make this site work. By clicking "Accept All" you agree to the storing of cookies on your device to enhance site navigation, analyse site usage and assist our marketing efforts. For more detailed information see our Cookie Notice.

Accept AllDecline