Module: Legion::Extensions::Agentic::Self::MetacognitiveMonitoring::Helpers

Defined in:
lib/legion/extensions/agentic/self/metacognitive_monitoring/helpers/constants.rb,
lib/legion/extensions/agentic/self/metacognitive_monitoring/helpers/monitoring_engine.rb,
lib/legion/extensions/agentic/self/metacognitive_monitoring/helpers/calibration_tracker.rb,
lib/legion/extensions/agentic/self/metacognitive_monitoring/helpers/monitoring_judgment.rb

Defined Under Namespace

Classes: CalibrationTracker, MonitoringEngine, MonitoringJudgment

Constant Summary collapse

MAX_JUDGMENTS =
500
MAX_CALIBRATION_POINTS =
200
JUDGMENT_TYPES =
%i[feeling_of_knowing judgment_of_learning confidence_rating effort_estimate
error_detection].freeze
CALIBRATION_LABELS =
{
  (0.8..)     => :well_calibrated,
  (0.6...0.8) => :slightly_miscalibrated,
  (0.4...0.6) => :miscalibrated,
  (0.2...0.4) => :poorly_calibrated,
  (..0.2)     => :uncalibrated
}.freeze
CONFIDENCE_LABELS =
{
  (0.8..)     => :very_high,
  (0.6...0.8) => :high,
  (0.4...0.6) => :moderate,
  (0.2...0.4) => :low,
  (..0.2)     => :very_low
}.freeze
EFFORT_LABELS =
{
  (0.8..)     => :extreme,
  (0.6...0.8) => :high,
  (0.4...0.6) => :moderate,
  (0.2...0.4) => :low,
  (..0.2)     => :minimal
}.freeze
OVERCONFIDENCE_THRESHOLD =

predicted - actual > this = overconfident

0.2
UNDERCONFIDENCE_THRESHOLD =
-0.2
DEFAULT_CONFIDENCE =
0.5
CALIBRATION_WINDOW =

last N judgments for calibration calculation

50