Class: Deeprails::Models::DefendUpdateWorkflowParams

Inherits:
Internal::Type::BaseModel show all
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

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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_levelsHash{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_awarenessBoolean?

Whether to enable context awareness for this workflow’s evaluations.

Returns:

  • (Boolean, nil)


29
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 29

optional :context_awareness, Deeprails::Internal::Type::Boolean

#custom_hallucination_threshold_valuesHash{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.

Returns:

  • (Hash{Symbol=>Float}, nil)


38
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 38

optional :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float]

#descriptionString?

New description for the workflow.

Returns:

  • (String, nil)


44
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 44

optional :description, String

#file_searchArray<String>?

An array of file IDs to search in the workflow’s evaluations. Files must be uploaded via the DeepRails API first.

Returns:

  • (Array<String>, nil)


51
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 51

optional :file_search, Deeprails::Internal::Type::ArrayOf[String]

#improvement_actionSymbol, ...

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_attemptsInteger?

Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.

Returns:

  • (Integer, nil)


68
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 68

optional :max_improvement_attempts, Integer

#nameString?

New name for the workflow.

Returns:

  • (String, nil)


74
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 74

optional :name, String

#threshold_typeSymbol, ...

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_searchBoolean?

Whether to enable web search for this workflow’s evaluations.

Returns:

  • (Boolean, nil)


90
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 90

optional :web_search, Deeprails::Internal::Type::Boolean

#workflow_idString

Returns:

  • (String)


13
# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 13

required :workflow_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/deeprails/models/defend_update_workflow_params.rb', line 127