Use this endpoint to update an existing defend workflow if its details change.
name, description, threshold_type, automatic_hallucination_tolerance_levels, custom_hallucination_threshold_values, and improvement_action when needed. You can also add or remove extended AI capabilities like web_search and file_search. Only fields provided in the request body will be updated.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the workflow to edit.
New name for the workflow.
New description for the workflow.
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.
automatic, custom 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.
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.
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.
regen, fixit, do_nothing Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.
Whether to enable web search for this workflow's evaluations. Defaults to false.
An array of file IDs to search in the workflow's evaluations. Files must be uploaded via the DeepRails API first.
A file ID corresponding to a file to search in the workflow's evaluations.
Workflow updated successfully
A unique workflow ID.
"wkfl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Status of the selected workflow. May be inactive or active. Inactive workflows will not accept events.
inactive, active "active"
The time the workflow was last modified in UTC.
"2025-01-15T10:30:00Z"