Returns the internal prompt used by the semantic reviewer path in
scan_prompt(), scan_context(), scan_output(), and secure_chat().
This helper is for inspection and auditability; the returned value is not a
package option. Users who need custom reviewer instructions should wrap their
reviewer function or chat object and prepend additive organization-specific
context before delegating to the model, while preserving llmshieldr's JSON
finding schema.
Examples
reviewer_prompt()
#> [1] "You are a security reviewer for llmshieldr. Return only JSON: an array of objects with rule_id, owasp, severity, description, and optional confidence, evidence, recommended_action, and span. Use severity values low, medium, high, or critical. Use recommended_action values allow, redact, or block when supplied."
base_reviewer <- function(prompt) "[]"
reviewer <- function(prompt) {
custom_context <- paste(
"Additional reviewer policy:",
"- Treat PHI leakage as high severity.",
"- Return [] when there are no findings.",
sep = "\n"
)
base_reviewer(paste(custom_context, prompt, sep = "\n\n"))
}
