Skip to content

LogicReasonerConfig

relationalai.config.config_reasoners_fields

Configure rule-execution defaults for the logic reasoner.

Set these fields under reasoners.logic to control how the logic reasoner runs rules (for example, whether to use LQP) and to opt into an LQP semantics version when required.

Minimal YAML (in raiconfig.yaml):

default_connection: sf
connections:
sf:
type: snowflake
# ...
reasoners:
logic:
incremental_maintenance: "on"

Configure logic reasoner settings in code:

>>> from relationalai.config import Config
>>> cfg = Config(reasoners={"logic": {"use_lqp": True, "lqp": {"semantics_version": "1"}}})
LogicReasonerConfig.use_lqp: bool

Whether to use LQP for rule execution.

LogicReasonerConfig.incremental_maintenance: (str, optional)

Incremental maintenance strategy string. Can be set to "on", "auto", or "off" (default).

LogicReasonerConfig.emit_constraints: bool

Whether to emit constraints during execution.

LogicReasonerConfig.lqp: ReasonerLogicLqpConfig

LQP-specific options, such as semantics_version. See ReasonerLogicLqpConfig for details.

LogicReasonerConfigReasonerConfigpydantic.BaseModel
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure reasoners
            └──  Configure logic reasoner defaults