Module: Legion::Extensions::Agentic::Language::PragmaticInference::Helpers::Constants
- Defined in:
- lib/legion/extensions/agentic/language/pragmatic_inference/helpers/constants.rb
Constant Summary collapse
- MAX_UTTERANCES =
500- MAX_IMPLICATURES =
200- MAX_HISTORY =
300- DEFAULT_CONFIDENCE =
0.5- CONFIDENCE_FLOOR =
0.0- CONFIDENCE_CEILING =
1.0- REINFORCEMENT_RATE =
0.1- DECAY_RATE =
0.02- MAXIMS =
%i[quality quantity relevance manner].freeze
- VIOLATION_TYPES =
%i[none flouting violating opting_out].freeze
- SPEECH_ACTS =
%i[assert question request promise warn inform suggest].freeze
- MAXIM_DESCRIPTIONS =
{ quality: 'be truthful, have evidence', quantity: 'be informative, not more than needed', relevance: 'be relevant to the conversation', manner: 'be clear, brief, orderly, unambiguous' }.freeze
Class Method Summary collapse
- .valid_maxim?(maxim) ⇒ Boolean
- .valid_speech_act?(act) ⇒ Boolean
- .valid_violation_type?(type) ⇒ Boolean
Class Method Details
.valid_maxim?(maxim) ⇒ Boolean
35 36 37 |
# File 'lib/legion/extensions/agentic/language/pragmatic_inference/helpers/constants.rb', line 35 def valid_maxim?(maxim) MAXIMS.include?(maxim) end |
.valid_speech_act?(act) ⇒ Boolean
43 44 45 |
# File 'lib/legion/extensions/agentic/language/pragmatic_inference/helpers/constants.rb', line 43 def valid_speech_act?(act) SPEECH_ACTS.include?(act) end |
.valid_violation_type?(type) ⇒ Boolean
39 40 41 |
# File 'lib/legion/extensions/agentic/language/pragmatic_inference/helpers/constants.rb', line 39 def valid_violation_type?(type) VIOLATION_TYPES.include?(type) end |