name
for the workflow, a workflow type
, a metrics
object specifying which guardrail metrics to evaluate against, and an improvement_action
. If workflow type
is automatic
, then automatic_tolerance
must be specified to inform threshold selection.The type of the workflow determines how hallucination thresholds are configured:
-
automatic
- Uses internal threshold logic based on tolerance level. The automatic_tolerance
field must be specified as low
, medium
, or high
to indicate how strict the thresholds should be. When automatic is selected, the float values in the metrics dictionary are ignored, as the automatic_tolerance
parameter determines the threshold instead.-
custom
- Allows the user to set custom thresholds (0.0-1.0) for each metric.Improvement actions determine the remediation step for events that have one or more metric evaluations fail below the threshold.
-
regenerate
- Re-runs the user’s prompt with minor variance-
fixit
- Directly addresses shortcomings using the guardrail failure rationale(s)-
null
- No improvement is attempted by DeepRailsWhen you create a workflow, you’ll receive a workflow ID. Use this ID to submit new events for evaluation and remediation for the defend workflow.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Name of the workflow.
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
Mapping of guardrail metrics to floating point threshold values. If the workflow type is automatic, only the metric names are used (automatic_tolerance
determines thresholds). Possible metrics are correctness
, completeness
, instruction_adherence
, context_adherence
, ground_truth_adherence
, or comprehensive_safety
.
The action used to improve outputs that fail one or guardrail metrics for the workflow events. May be regenerate
, fixit
, or null which represents “do nothing”. Regenerate 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.
regenerate
, fixit
Description for the workflow.
Hallucination tolerance for automatic workflows; may be low
, medium
, or high
. Ignored if type
is custom
.
low
, medium
, high
Max. number of improvement action retries until a given event passes the guardrails. Defaults to 10.
Response
Workflow created successfully
A unique workflow ID.
Name of the workflow.
Description for the workflow.
The action used to improve outputs that fail one or more guardrail metrics for the workflow events. May be regenerate
, fixit
, or null which represents “do nothing”. Regenerate 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.
regenerate
, fixit
Status of the selected workflow. May be archived
or active
. Archived workflows will not accept events.
archived
, active
The time the workflow was created in UTC.
The most recent time the workflow was modified in UTC.
Rate of events associated with this workflow that passed evaluation.
Max. number of improvement action retries until a given event passes the guardrails.