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.

Examples

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)

Notes

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

Attributes

Attributes exposed by this module.

Classes

Classes exposed by this module.