Class: Deeprails::Models::DefendUpdateWorkflowParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Deeprails::Models::DefendUpdateWorkflowParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/deeprails/models/defend_update_workflow_params.rb
Overview
Defined Under Namespace
Modules: AutomaticHallucinationToleranceLevel, ImprovementAction, ThresholdType
Instance Attribute Summary collapse
-
#automatic_hallucination_tolerance_levels ⇒ Hash{Symbol=>Symbol, Deeprails::Models::DefendUpdateWorkflowParams::AutomaticHallucinationToleranceLevel}?
New mapping of guardrail metrics to hallucination tolerance levels (either
low,medium, orhigh) to be used whenthreshold_typeis set toautomatic. -
#context_awareness ⇒ Boolean?
Whether to enable context awareness for this workflow’s evaluations.
-
#custom_hallucination_threshold_values ⇒ Hash{Symbol=>Float}?
New mapping of guardrail metrics to floating point threshold values to be used when
threshold_typeis set tocustom. -
#description ⇒ String?
New description for the workflow.
-
#file_search ⇒ Array<String>?
An array of file IDs to search in the workflow’s evaluations.
-
#improvement_action ⇒ Symbol, ...
The new action used to improve outputs that fail one or more guardrail metrics for the workflow events.
-
#max_improvement_attempts ⇒ Integer?
Max.
-
#name ⇒ String?
New name for the workflow.
-
#threshold_type ⇒ Symbol, ...
New type of thresholds to use for the workflow, either
automaticorcustom. -
#web_search ⇒ Boolean?
Whether to enable web search for this workflow’s evaluations.
- #workflow_id ⇒ String
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
This class inherits a constructor from Deeprails::Internal::Type::BaseModel
Instance Attribute Details
#automatic_hallucination_tolerance_levels ⇒ Hash{Symbol=>Symbol, Deeprails::Models::DefendUpdateWorkflowParams::AutomaticHallucinationToleranceLevel}?
New mapping of guardrail metrics to hallucination tolerance levels (either low, medium, or high) to be used when threshold_type is set to automatic. Possible metrics are completeness, instruction_adherence, context_adherence, ground_truth_adherence, or comprehensive_safety.
22 23 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 22 optional :automatic_hallucination_tolerance_levels, -> { Deeprails::Internal::Type::HashOf[enum: Deeprails::DefendUpdateWorkflowParams::AutomaticHallucinationToleranceLevel] } |
#context_awareness ⇒ Boolean?
Whether to enable context awareness for this workflow’s evaluations.
29 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 29 optional :context_awareness, Deeprails::Internal::Type::Boolean |
#custom_hallucination_threshold_values ⇒ Hash{Symbol=>Float}?
New mapping of guardrail metrics to floating point threshold values to be used when threshold_type is set to custom. Possible metrics are correctness, completeness, instruction_adherence, context_adherence, ground_truth_adherence, or comprehensive_safety.
38 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 38 optional :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float] |
#description ⇒ String?
New description for the workflow.
44 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 44 optional :description, String |
#file_search ⇒ Array<String>?
An array of file IDs to search in the workflow’s evaluations. Files must be uploaded via the DeepRails API first.
51 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 51 optional :file_search, Deeprails::Internal::Type::ArrayOf[String] |
#improvement_action ⇒ Symbol, ...
The new action used to improve outputs that fail one or more guardrail metrics for the workflow events. May be regen, fixit, or do_nothing. ReGen runs the user’s input prompt with minor induced variance. FixIt attempts to directly address the shortcomings of the output using the guardrail failure rationale. Do Nothing does not attempt any improvement.
61 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 61 optional :improvement_action, enum: -> { Deeprails::DefendUpdateWorkflowParams::ImprovementAction } |
#max_improvement_attempts ⇒ Integer?
Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.
68 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 68 optional :max_improvement_attempts, Integer |
#name ⇒ String?
New name for the workflow.
74 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 74 optional :name, String |
#threshold_type ⇒ Symbol, ...
New type of thresholds to use for the workflow, either automatic or custom. Automatic thresholds are assigned internally after the user specifies a qualitative tolerance for the metrics, whereas custom metrics allow the user to set the threshold for each metric as a floating point number between 0.0 and 1.0.
84 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 84 optional :threshold_type, enum: -> { Deeprails::DefendUpdateWorkflowParams::ThresholdType } |
#web_search ⇒ Boolean?
Whether to enable web search for this workflow’s evaluations.
90 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 90 optional :web_search, Deeprails::Internal::Type::Boolean |
#workflow_id ⇒ String
13 |
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 13 required :workflow_id, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 127
|