Skip to main content

Module entities

Module entities 

Source
Expand description

Deterministic entity extraction for associative (spreading-activation) recall.

SAG-inspired: a chunk’s high-signal tokens (error codes, CLI flags, paths, code symbols) become index entities in chunk_entities. Two chunks that share an entity are associatively linked even when their prose is dissimilar, which lets recall spread activation across that link — the ACT-R associative term (S_ji) that base-level activation alone cannot supply.

Deterministic on purpose — no LLM, no regex dependency (manual char scanning) — so it runs on the no-LLM capture hot path and in migration backfill. Mirrors the project constraint that capture never depends on the LLM (see ResilientDistiller).

Deliberately ignores plain lowercase words: those are already recoverable via the lexical/BM25 channel, and entities must stay discriminative so the ACT-R fan term keeps promiscuous tokens from dominating the spread.

Structs§

ExtractedEntity
One extracted entity: the normalized join key plus a coarse type tag. The tag is diagnostic only — recall keys on entity, never on etype.

Functions§

extract_entities
Extract high-signal entities from a chunk’s content and optional trigger desc.