Concept: Safe Regeneration | Python:
client.safe_regenerate()Parameters
The initial AI-generated text to evaluate and potentially regenerate.
The original user prompt that produced the content. Used to guide regeneration.
Minimum acceptable RAIL score (0–10). Content below this score is regenerated.
Evaluation depth used for each iteration:
"basic" for fast scoring or "deep" for a more detailed analysis.Maximum regeneration attempts (1–5).
Specific dimensions to enforce the threshold on. Omit to apply across all 8.
Request
Response
The final content - either the original (if it passed) or the best regenerated version.
RAIL score of the returned content.
true if the final content meets the threshold.Number of evaluation+regeneration cycles performed.
Usage for the request. Each iteration meters like a standalone evaluation; if the first response already passes, only one is charged.