When Retrieval Is Not Enough: Reasoning with Rules and Time
Semantica's graph can retrieve and connect what has already been recorded, but some operational questions ask for a conclusion that no single source states directly. This chapter separates retrieval, traversal, and inference, then explains how Semantica chooses among forward and backward chaining, recursive Datalog, incremental RETE matching, temporal reasoning, and LLM-backed graph questions. The aim is to select a proof shape that fits the problem while keeping inferred conclusions distinct from observed facts.
That distinction matters because a connected path is not automatically a conclusion. If a graph records that an actor uses a tool and that the tool exploits a vulnerability, a system may be able to infer an actor–vulnerability relationship only if a rule says that this implication is valid. The path supplies evidence for the rule's premises. The rule supplies the logic. The result is an inference, not a new source observation.
From observed facts to proof obligations
Retrieval finds information that is already present. A vector search may return a passage about a vulnerability, and a keyword search may return a node whose content contains the query. Neither operation changes what the system knows. Graph traversal goes one step further structurally: it follows an existing edge from one node to another, perhaps across several hops, but it still reports connections that were already represented.
Inference creates a new statement from existing statements and an explicit rule. In Semantica's rule model, facts are placed in working memory and rules describe conditions and conclusions. A rule such as “if an entity is a threat actor, exploits a vulnerability, and that vulnerability is critical, then classify the actor as high risk” does not retrieve a sentence that says “high risk.” It derives the classification from the premises. That makes the logic inspectable, provided the facts and rule are themselves trustworthy.
Forward chaining is the natural choice when the system wants to materialize every conclusion supported by the current fact set. The reasoner examines rules, finds matching conditions, adds new conclusions, and repeats until no new facts can be derived or an iteration limit is reached. This is useful for compliance alerts, classification labels, and trigger-based workflows where the system wants to discover all consequences of a new batch of facts.
The result retains more than a conclusion string. Semantica's InferenceResult can carry the rule used, the premises that matched, and a confidence value associated with that rule. Those fields turn a derived classification into something an analyst can inspect. They also expose an important limitation: the confidence is a configured signal inherited from the rule, not automatically calibrated statistical certainty. If a rule is wrong or a premise is weak, a well-formed explanation can still justify a bad conclusion.
Forward chaining has a clear termination condition: a fixpoint, where another pass adds no new facts, or the configured limit. That condition is important when rules can chain into one another or when actions change working memory. A recursive or poorly bounded ruleset can generate a large number of intermediate facts. The engine's limits are safeguards, not evidence that a conclusion is complete. Stopping because a limit was reached should be treated differently from reaching a genuine fixpoint.
Backward chaining starts with a particular goal and works backward through rules to see whether the goal can be proved.