Class: Deeprails::Models::DefendCreateWorkflowParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Deeprails::Models::DefendCreateWorkflowParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/deeprails/models/defend_create_workflow_params.rb
Overview
Defined Under Namespace
Modules: AutomaticHallucinationToleranceLevel, ImprovementAction, ThresholdType
Instance Attribute Summary collapse
-
#automatic_hallucination_tolerance_levels ⇒ Hash{Symbol=>Symbol, Deeprails::Models::DefendCreateWorkflowParams::AutomaticHallucinationToleranceLevel}?
Mapping of guardrail metrics to hallucination tolerance levels (either ‘low`, `medium`, or `high`).
-
#custom_hallucination_threshold_values ⇒ Hash{Symbol=>Float}?
Mapping of guardrail metrics to floating point threshold values.
-
#description ⇒ String?
Description for the workflow.
-
#file_search ⇒ Array<String>?
An array of file IDs to search in the workflow’s evaluations.
-
#improvement_action ⇒ Symbol, Deeprails::Models::DefendCreateWorkflowParams::ImprovementAction
The action used to improve outputs that fail one or more guardrail metrics for the workflow events.
-
#max_improvement_attempts ⇒ Integer?
Max.
-
#name ⇒ String
Name of the workflow.
-
#threshold_type ⇒ Symbol, Deeprails::Models::DefendCreateWorkflowParams::ThresholdType
Type of thresholds to use for the workflow, either ‘automatic` or `custom`.
-
#web_search ⇒ Boolean?
Whether to enable web search for this workflow’s evaluations.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(improvement_action:, name:, threshold_type:, automatic_hallucination_tolerance_levels: nil, custom_hallucination_threshold_values: nil, description: nil, file_search: nil, max_improvement_attempts: nil, web_search: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see DefendCreateWorkflowParams for more details.
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, 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
#initialize(improvement_action:, name:, threshold_type:, automatic_hallucination_tolerance_levels: nil, custom_hallucination_threshold_values: nil, description: nil, file_search: nil, max_improvement_attempts: nil, web_search: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see Deeprails::Models::DefendCreateWorkflowParams for more details.
|
|
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 80
|
Instance Attribute Details
#automatic_hallucination_tolerance_levels ⇒ Hash{Symbol=>Symbol, Deeprails::Models::DefendCreateWorkflowParams::AutomaticHallucinationToleranceLevel}?
Mapping of guardrail metrics to hallucination tolerance levels (either ‘low`, `medium`, or `high`). Possible metrics are `completeness`, `instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.
43 44 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 43 optional :automatic_hallucination_tolerance_levels, -> { Deeprails::Internal::Type::HashOf[enum: Deeprails::DefendCreateWorkflowParams::AutomaticHallucinationToleranceLevel] } |
#custom_hallucination_threshold_values ⇒ Hash{Symbol=>Float}?
Mapping of guardrail metrics to floating point threshold values. Possible metrics are ‘correctness`, `completeness`, `instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.
52 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 52 optional :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float] |
#description ⇒ String?
Description for the workflow.
58 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 58 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.
65 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 65 optional :file_search, Deeprails::Internal::Type::ArrayOf[String] |
#improvement_action ⇒ Symbol, Deeprails::Models::DefendCreateWorkflowParams::ImprovementAction
The 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.
18 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 18 required :improvement_action, enum: -> { Deeprails::DefendCreateWorkflowParams::ImprovementAction } |
#max_improvement_attempts ⇒ Integer?
Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.
72 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 72 optional :max_improvement_attempts, Integer |
#name ⇒ String
Name of the workflow.
24 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 24 required :name, String |
#threshold_type ⇒ Symbol, Deeprails::Models::DefendCreateWorkflowParams::ThresholdType
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.
34 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 34 required :threshold_type, enum: -> { Deeprails::DefendCreateWorkflowParams::ThresholdType } |
#web_search ⇒ Boolean?
Whether to enable web search for this workflow’s evaluations. Defaults to false.
78 |
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 78 optional :web_search, Deeprails::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/deeprails/models/defend_create_workflow_params.rb', line 116
|