Module: Legion::Extensions::Agentic::Memory::Hologram::Helpers::Constants

Included in:
Hologram, HologramEngine, HolographicFragment
Defined in:
lib/legion/extensions/agentic/memory/hologram/helpers/constants.rb

Constant Summary collapse

RESOLUTION_LEVELS =

Resolution levels for holographic recall quality

%i[perfect high medium low fragmentary].freeze
MAX_HOLOGRAMS =

Maximum number of holograms retained in the engine

100
INTERFERENCE_DECAY =

Per-cycle decay applied to fragment fidelity

0.03
RECONSTRUCTION_THRESHOLD =

Minimum completeness for a fragment to contribute to reconstruction

0.3
FRAGMENT_LABELS =

Fragment labels based on completeness range

[
  [(0.9..),       :intact],
  [(0.7...0.9),   :substantial],
  [(0.5...0.7),   :partial],
  [(0.3...0.5),   :degraded],
  [..0.3,         :fragmentary]
].freeze
RESOLUTION_LABELS =

Resolution labels mapping hologram resolution to symbol

[
  [(0.9..),       :perfect],
  [(0.7...0.9),   :high],
  [(0.5...0.7),   :medium],
  [(0.3...0.5),   :low],
  [..0.3,         :fragmentary]
].freeze
FIDELITY_LABELS =

Fidelity labels for individual fragments

[
  [(0.8..),       :pristine],
  [(0.6...0.8),   :clear],
  [(0.4...0.6),   :hazy],
  [(0.2...0.4),   :clouded],
  [..0.2,         :corrupted]
].freeze
INTERFERENCE_LABELS =

Interference strength labels

[
  [(0.7..),       :strong],
  [(0.4...0.7),   :moderate],
  [(0.1...0.4),   :weak],
  [..0.1,         :negligible]
].freeze

Class Method Summary collapse

Class Method Details

.label_for(table, value) ⇒ Object



57
58
59
60
# File 'lib/legion/extensions/agentic/memory/hologram/helpers/constants.rb', line 57

def self.label_for(table, value)
  table.each { |range, label| return label if range.cover?(value) }
  table.last.last
end