Module: Leva::Recordable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/leva/recordable.rb
Instance Method Summary collapse
-
#extract_regex_pattern ⇒ Regexp
A regex pattern to extract the contents of a LLM response.
-
#ground_truth ⇒ String
The ground truth label for the record.
-
#index_attributes ⇒ Hash
A hash of attributes to be displayed in the dataset records index.
-
#show_attributes ⇒ Hash
A hash of attributes to be displayed in the dataset record show view.
-
#to_llm_context ⇒ Hash
A hash of attributes to be liquified for LLM context.
Instance Method Details
#extract_regex_pattern ⇒ Regexp
Returns A regex pattern to extract the contents of a LLM response.
33 34 35 |
# File 'app/models/concerns/leva/recordable.rb', line 33 def extract_regex_pattern false end |
#ground_truth ⇒ String
Returns The ground truth label for the record.
13 14 15 |
# File 'app/models/concerns/leva/recordable.rb', line 13 def ground_truth raise NotImplementedError, "#{self.class} must implement #ground_truth" end |
#index_attributes ⇒ Hash
Returns A hash of attributes to be displayed in the dataset records index.
18 19 20 |
# File 'app/models/concerns/leva/recordable.rb', line 18 def index_attributes raise NotImplementedError, "#{self.class} must implement #index_attributes" end |
#show_attributes ⇒ Hash
Returns A hash of attributes to be displayed in the dataset record show view.
23 24 25 |
# File 'app/models/concerns/leva/recordable.rb', line 23 def show_attributes raise NotImplementedError, "#{self.class} must implement #show_attributes" end |
#to_llm_context ⇒ Hash
Returns A hash of attributes to be liquified for LLM context.
28 29 30 |
# File 'app/models/concerns/leva/recordable.rb', line 28 def to_llm_context raise NotImplementedError, "#{self.class} must implement #to_llm_context" end |