Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 6.4 KB

alignmentplugin.mdx

File metadata and controls

17 lines (13 loc) · 6.4 KB
title AlignmentPlugin

Beta. States the listed rules to the model and evaluates every turn against them; the configuration, metadata, and error shapes may change.

Fields

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.