| title | AlignmentPlugin |
|---|
Beta. States the listed rules to the model and evaluates every turn against them; the configuration, metadata, and error shapes may change.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id |
components.AlignmentPluginID | ✅ | N/A | |
instruct |
Optional[bool] | ➖ | Whether the rules are stated to the model in a system message on every provider call. Default true. | |
max_retries |
Optional[int] | ➖ | Provider calls made again after a blocked turn, in enforce mode. Default 1. | |
mode |
Optional[components.AlignmentPluginMode] | ➖ | enforce: a turn that breaks a rule is withheld, retried, and finally returned as an error. audit: every turn is evaluated and returned. Default enforce. |
|
rules |
List[str] | ✅ | Texts that state what the reply must do or must not do. Each rule is evaluated on its own. | [ "Never offer a discount.", "End with exactly one question." ] |
threshold |
Optional[float] | ➖ | Probability at or above which a rule is broken. Default 0.7. |