@cognitive-engine/social
v0.3.1
Published
Social model: rapport tracking, boundaries, communication preferences
Downloads
435
Readme
@cognitive-engine/social
Social model for cognitive-engine. Tracks rapport, detects boundaries, and learns communication preferences.
Install
npm install @cognitive-engine/socialComponents
SocialModel
Top-level coordinator that combines rapport, boundaries, and preferences into a social context.
import { SocialModel } from '@cognitive-engine/social'
const social = new SocialModel()
const context = social.analyze(percept, history)
context.rapport // 0.72
context.formality // 'casual'
context.boundaries // ['no_personal_advice']
context.preferences // { responseLength: 'concise', tone: 'direct' }RapportTracker
Tracks relationship quality over time based on interaction patterns.
import { RapportTracker } from '@cognitive-engine/social'
const rapport = new RapportTracker()
rapport.update({ positive: true, engagement: 0.8 })
rapport.getScore() // 0.65BoundaryDetector
Detects when the user sets or implies boundaries.
import { BoundaryDetector } from '@cognitive-engine/social'
const detector = new BoundaryDetector()
const boundaries = detector.detect("I don't want to talk about that")
// ['topic_avoidance']PreferenceLearner
Learns communication preferences from interaction history.
import { PreferenceLearner } from '@cognitive-engine/social'
const learner = new PreferenceLearner()
learner.observe({ responseLength: 150, wasHelpful: true })
learner.observe({ responseLength: 500, wasHelpful: false })
learner.getPreferences()
// { responseLength: 'concise', ... }