evaluatePromptPolicies()
evaluatePromptPolicies(
policies,subjects,context?,scope?):PolicyViolation[]
Defined in: validator/src/policy/prompt-evaluator.ts:248
Evaluate the prompt policy kinds on prompts.
Every policy matches on policy risk: the higher of the effective risk (unset
counts as low) and the floor of every risk-floor policy, whatever its
severity. required-approvals, required-evals and max-experiment-weight are not
evaluated here.
Parameters
policies
readonly PolicyDefinition[]
Parsed policy definitions
subjects
readonly PolicySubject[]
Prompts as policies see them
context?
PolicyContext = {}
Model catalog settings and the blocked-pattern setup of PS005
scope?
Risk and selection to use for every subject instead of its own
Returns
Violations, each at the location of its prompt