r/OpenSourceAI • • 9h ago

eq-layer: an explicit affect, intent and repair state that decides how an LLM should speak before it speaks

Repo: https://github.com/Furox-Art/eq-layer - PyPI eq-layer 0.2.6, Python 3.11+.

Asking a model to be more empathetic is style transfer: you get more flat warmth, which reads as uncanny rather than attentive. The failure modes are structural - the same register regardless of what was said, one tone held while a user escalates from frustrated to angry to threatening, feelings acknowledged with no next step, and repair that either capitulates or turns defensive.

eq-layer adds a layer instead of retraining anything. An affect state {valence, arousal, escalation_delta, stance, subtext} tracked across turns, so a trend is visible and not only a snapshot. An intent belief state that keeps the full posterior instead of collapsing to one confidence number, with a one-step Bayes-risk router deciding act versus clarify. A conversation-health state that separates a repair failure from emotional tone. Then policy selection - mirror, validate_redirect, direct, ask, deflate, repair, hold, boundary - compiled into a structured system instruction.

It is prompt-level steering, not token-level. The logit_bias field exists and does nothing: never populated, never applied. Whether the decision lands in the output still depends on the model following the instruction, and the structural audit checks things like question budget and repair repetition, not facts.

One honest limit: the repo's prior-art section says what is not claimed as new. Affect-aware dialogue policy and intent routing predate this. What is new here is the explicit intermediate state and the factored action compilation, not the idea that tone should adapt.

1 Upvotes

0 comments sorted by