Skip to content

Lexicon needs a second axis: speech act (directive/corrective), not just affect #74

Description

@elecnix

The gap

Run this through the current pipeline:

"Hey! Terraform apply should be run from CI, not by you."

tokens         : hey terraform apply should be run from ci not by you
lexicon hits   : `not` → frustration/negation        ← the only hit
paralinguistic : (none — one `!` is not repeated punctuation, `Hey!` is not shouting)
turn-pair-core : correction, implicit (regex `should\s+be`)

The lexicon contributes exactly one token, and it is the single most generic in the corpus (not, 2,794 hits). Remove that word and the lexicon says nothing at all.

Yet this is close to ideal proposal material: a corrective directive with a generalisable ruleterraform apply belongs to CI, not to you — which converts almost directly into a standing instruction. And the speaker is completely calm.

Why the lexicon misses it, correctly

The prompt asks: "does this entry express how the person FEELS about the interaction?" By that test every token here is genuinely neutral, and terraform/apply/ci are tool names the prompt was explicitly taught (#56) to neutralise. The lexicon is working as designed. The design measures the wrong dimension for this class.

frustration | praise | neutral is an affect axis. This utterance has near-zero affect and high corrective force. Those are independent.

This may mean #56 pruned useful signal

In #56 I classified must (706 hits) and do (1,620) as noise and taught the prompt to neutralise reporting verbs. But must and should are precisely the markers of this class — "you must not", "should be run from CI", "you should have edited the body".

turn-pair-core's own regex already agrees: its WEAK patterns include should\s+(use|do|be|have) and please\s+(use|do|try|don't), on the theory that directives signal correction. The deterministic layer models this; the learned lexicon does not.

This should be measured before acting. Sample the existing must/should/do hits and classify how many are genuine directives versus ordinary prose. I do not know the split, and the fix differs depending on it.

Proposed shape

Give a lexicon entry two independent fields rather than one:

  • polarity (affect): frustration | praise | neutral — unchanged
  • speech act: directive | corrective | report | none

A term can be neutral in feeling and strongly corrective in force: should, must, instead, always, never, don't. The second axis is probably the better predictor of a useful proposal, since a calm correction is exactly what converts into a standing instruction.

Downstream, turn-frustration would emit the speech-act dimension alongside polarity, and session-overview could weight corrective turns distinctly from angry ones.

Acceptance

Related

  • Companion to the signal-modulator issue: ! amplifies a directive as readily as it amplifies anger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions