Safe Regeneration is a feedback loop: evaluate a response, and if it falls below your threshold, send it back to the LLM with targeted improvement instructions until it passes. If the iteration limit is reached, the best version so far is returned.Documentation Index
Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
API endpoint:
POST /railscore/v1/safe-regenerate | Python: client.safe_regenerate() | JavaScript: client.safeRegenerate()How it works
Each iteration costs the same credits as a standalone evaluation. Up to 5 iterations per request.Basic usage
Credit cost
Total credits =eval_credit × (number of evaluations + regenerations).
| Mode | Per evaluation | 3-iteration example |
|---|---|---|
| Basic | 1.0 | 3.0 credits max |
| Deep | 3.0 | 9.0 credits max |
What’s next
API Reference: Safe Regeneration
Full parameter reference.
Python SDK: Safe Regeneration
Python SDK examples and options.
Concepts: Middleware
Auto-regenerate via provider wrappers.
Credits & Pricing
Understand iteration costs.