Module: Legion::Extensions::Agentic::Social::Calibration::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/social/calibration/helpers/constants.rb

Constant Summary collapse

ADVISORY_TYPES =
%i[
  tone_adjustment
  verbosity_adjustment
  format_adjustment
  context_injection
  partner_hint
].freeze
EMA_ALPHA =
0.1
NEUTRAL_SCORE =
0.5
SUPPRESSION_THRESHOLD =
0.4
HIGH_CALIBRATION =
0.7
MAX_HISTORY =
50
TAG_PREFIX =
%w[bond calibration].freeze
WEIGHTS_TAGS =
(TAG_PREFIX + ['weights']).freeze
HISTORY_TAG_PREFIX =
(TAG_PREFIX + ['history']).freeze
POSITIVE_PATTERNS =
/\b(thanks|perfect|exactly|great|good|helpful|nice|yes)\b/i
NEGATIVE_PATTERNS =
/\b(no|wrong|not what|stop|don't|didn't ask|incorrect)\b/i
SIGNAL_WEIGHTS =
{
  explicit_feedback: 0.35,
  response_latency:  0.20,
  message_length:    0.15,
  direct_address:    0.15,
  continuation:      0.15
}.freeze
PROMOTABLE_TAGS =
[
  %w[bond attachment],
  %w[bond communication_pattern],
  %w[bond calibration weights],
  %w[partner preference]
].freeze
PROMOTION_MIN_CONFIDENCE =
0.6
PREFERENCE_EXTRACTION_INTERVAL =

7 days

604_800

Class Method Summary collapse

Class Method Details

.advisory_type?(type) ⇒ Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/legion/extensions/agentic/social/calibration/helpers/constants.rb', line 51

def advisory_type?(type)
  ADVISORY_TYPES.include?(type.to_sym)
end

.suppressed?(score) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/legion/extensions/agentic/social/calibration/helpers/constants.rb', line 55

def suppressed?(score)
  score < SUPPRESSION_THRESHOLD
end