Skip to content

fathom.AssertedFact

fathom.AssertedFact

Bases: BaseModel

Snapshot of a user-asserted fact captured during evaluation for audit.

Distinct from :class:AssertSpec (the compile-time YAML spec): slots here hold materialized fact values read back from CLIPS, which may be integers, strings, symbols, or floats — hence dict[str, Any].

Example

fact = AssertedFact(template="access-grant", slots={"uid": 42}) fact.slots["uid"] 42

Source code in src/fathom/models.py
class AssertedFact(BaseModel):
    """Snapshot of a user-asserted fact captured during evaluation for audit.

    Distinct from :class:`AssertSpec` (the compile-time YAML spec): slots here
    hold materialized fact values read back from CLIPS, which may be integers,
    strings, symbols, or floats — hence ``dict[str, Any]``.

    Example:
        >>> fact = AssertedFact(template="access-grant", slots={"uid": 42})
        >>> fact.slots["uid"]
        42
    """

    template: str
    slots: dict[str, Any] = Field(default_factory=dict)