Skip to content

ReasonersConfig

relationalai.config.config_reasoners_fields

Configure defaults for the reasoners API.

This section lives under reasoners in raiconfig.yaml and controls the reasoners backend, polling behavior for long-running operations, and default settings for each reasoner type (logic, predictive, prescriptive).

Minimal YAML (in raiconfig.yaml):

default_connection: sf
connections:
sf:
type: snowflake
# ...
reasoners:
direct_access: true
poll_max_delay_s: 2.0
logic:
size: HIGHMEM_X64_S
query_timeout_mins: 30

Configure reasoners settings using a dict:

>>> from relationalai.config import create_config
>>> cfg = create_config(reasoners={
... "poll_max_delay_s": 2.0,
... "logic": {"size": "HIGHMEM_X64_S", "query_timeout_mins": 30},
... })

Configure reasoners settings using an explicit ReasonersConfig instance:

>>> from relationalai.config import create_config, ReasonersConfig, LogicReasonerConfig
>>> cfg = create_config(
... reasoners=ReasonersConfig(
... poll_max_delay_s=2.0,
... logic=LogicReasonerConfig(size="HIGHMEM_X64_S", query_timeout_mins=30),
... ),
... )
ReasonersConfig.backend: {'sql', 'direct_access'}

Backend used for reasoners APIs.

ReasonersConfig.show_all_sizes: bool

Show all available reasoner sizes (includes internal/dev sizes).

ReasonersConfig.poll_initial_delay_s: float

Initial delay between polls when waiting for operations to complete.

ReasonersConfig.poll_overhead_rate: float

Exponential backoff growth rate per poll (for example, 0.2 means +20% per poll).

ReasonersConfig.poll_max_delay_s: float

Maximum poll delay.

ReasonersConfig.logic: LogicReasonerConfig

Defaults for the logic reasoner.

ReasonersConfig.predictive: ReasonerConfig

Defaults for the predictive reasoner.

ReasonersConfig.prescriptive: ReasonerConfig

Defaults for the prescriptive reasoner.

ReasonersConfigpydantic.BaseModel
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure reasoners
            ├──  Choose a reasoner backend (SQL vs Direct Access)
            └──  Configure reasoner polling behavior