Skip to content

base

relationalai.semantics.frontend

Semantics DSL building blocks.

This module defines the core frontend building blocks used to construct RelationalAI semantics queries in Python. Objects like Variable, Concept, Relationship, and Expression represent symbolic expressions: you combine them with Python syntax (attributes, calls, operators) to build a query, and the query is executed later by the RelationalAI runtime.

Create a model, a concept, and a simple query:

>>> from relationalai.semantics import Model
>>> m = Model()
>>> Person = m.Concept("Person")
>>> q = m.select(Person).where(Person.age >= 18)

Most users start from Model and create concepts/relationships from there; you typically do not instantiate the classes in this module directly.

Attributes exposed by this module.

Classes exposed by this module.