aarondb/engine/cognitive

Values

pub fn solve(
  db_state: state.DbState,
  concept: ast.Part,
  context: ast.Part,
  threshold: Float,
  engram_var: String,
  ctx: dict.Dict(String, fact.Value),
  as_of_tx: option.Option(Int),
  as_of_valid: option.Option(Int),
) -> List(dict.Dict(String, fact.Value))

Solve AaronDB’s local cognitive clause over explicit engram facts.

An entity matches only when it has active engram/concept and engram/context facts matching the supplied parts. Its relevance is the maximum active numeric engram/relevance value; an entity with no relevance fact has relevance 1.0, while one with only non-numeric relevance facts has relevance 0.0. The threshold comparison is inclusive.

This module performs no learning, decay, vector embedding, or external retrieval. Relevance changes only through ordinary fact assertions and retractions, and temporal bases select the active facts visible at that basis.

Search Document