Knowledge Graph

The Knowledge Graph module lets you model causal relationships between business factors, build Bayesian belief networks, and run complex scenario simulations β€” all without writing code.

Core Concepts

Factor
A named business variable (e.g., Marketing Spend, Sales Headcount, Churn Rate). Factors can be linked to dataset columns for data-backed inference.
Causal Link
A directed relationship between two factors with a configurable strength and lag. Example: Marketing Spend β†’ Pipeline Volume (lag: 30 days, strength: 0.7).
Bayesian Network
A probabilistic graphical model that represents joint probability distributions over factors. LTprophecy learns conditional probability tables from your data.
Scenario Run
A simulation that propagates changes to one or more factors through the causal graph to produce downstream revenue impact estimates.

Building a Causal Graph

  1. Navigate to Knowledge β†’ Factors and click New Factor.
  2. Enter a name, description, and optionally link to a dataset column.
  3. Navigate to Knowledge β†’ Graph to open the visual editor.
  4. Drag factors onto the canvas. Draw arrows between factors to create causal links.
  5. Set the direction (positive/negative), strength (0–1), and lag for each link.
  6. Click Save Graph.

Fitting a Bayesian Network

  1. With your graph saved, navigate to Knowledge β†’ Bayesian Networks.
  2. Click Fit Network and select the causal graph and dataset to use.
  3. Choose discretization bins for continuous variables (default: 5 equal-width bins).
  4. Click Train. Training uses pgmpy and runs on the Celery CPU worker cluster.
  5. Once complete, inspect the learned conditional probability tables under CPT View.

Running a Scenario

  1. Navigate to Knowledge β†’ Scenarios β†’ New Scenario.
  2. Select a fitted Bayesian Network and a scenario type:
    • Factor Drift β€” shift a factor value by Β±X%
    • Volatility Multiplier β€” expand/contract variance
    • Hard Intervention β€” set a factor to a fixed value (do-calculus)
  3. Set the drift adjustment or volatility multiplier.
  4. Click Simulate. Results show expected revenue impact with confidence intervals.

Neo4j Integration

For Enterprise plans, the Knowledge Graph is persisted in a Neo4j database alongside PostgreSQL. This enables:

  • Cypher queries for custom graph traversals
  • Multi-hop causal path analysis
  • Graph export to GEXF/GraphML for third-party tools