% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/policy.R
\name{policy}
\alias{policy}
\title{Load a built-in policy}
\usage{
policy(name = "enterprise_default", overrides = list())
}
\arguments{
\item{name}{Built-in policy name. Defaults to \code{"enterprise_default"}.}

\item{overrides}{Optional list with \code{rules}, \code{thresholds}, \code{rate_guard}, or
\code{trusted_sources} entries. \code{controls} may be supplied with
\code{\link[=policy_controls]{policy_controls()}} to tune orchestration behavior in \code{\link[=secure_chat]{secure_chat()}}.}
}
\value{
A \code{shieldr_policy}.
}
\description{
\code{policy()} is the easiest way to start. It returns a ready-to-use policy for
common safety profiles such as \code{"enterprise_default"}, \code{"pharma_gxp"}, and
\code{"comprehensive"}.
}
\details{
Built-in policies are assembled from the rule helpers in \code{R/rules.R}. They
use OWASP GenAI / LLM Top 10 categories as the organizing taxonomy, then add
common controls such as PII patterns, secret patterns, system-prompt
extraction checks, excessive-agency language, domain-specific claims, and
optional rate guards.

Policy names:
\itemize{
\item \code{enterprise_default}: broad production baseline for injection, NLP intent,
PII/PHI, secrets, system prompt extraction, and agency language.
\item \code{pharma_gxp}: \code{enterprise_default} plus clinical identifiers, diagnosis
and treatment language, unsafe code checks, and stricter thresholds.
\item \code{finance_strict}: \code{enterprise_default} plus account numbers, investment
advice language, autonomous trading language, and a token-rate guard.
\item \code{education_safe}: \code{enterprise_default} plus minor-related PII and
academic-integrity bypass language.
\item \code{open_research}: a smaller open-workflow profile focused on injection and
secrets, with higher thresholds.
\item \code{comprehensive}: a maximum-coverage profile combining the enterprise,
pharma, finance, education, code-safety, and rate-guard controls. Uses
moderate thresholds (\code{redact_at = 0.4}, \code{block_at = 0.7}). For pharma-tier
strictness, supply \code{overrides = list(thresholds = list(redact_at = 0.3, block_at = 0.6))} explicitly.
\item \code{custom}: no rules, default thresholds.
\item \code{baseline}: backward-compatible alias for \code{enterprise_default}.
}

These policies are starting points. They are transparent, testable, and can
be extended with \code{\link[=add_rule]{add_rule()}} for application-specific requirements.
}
\examples{
policy()
policy("open_research", overrides = list(thresholds = list(redact_at = 0.7)))
}
