Skip to contents

Checks a piece of text for population-estimate language and either appends a scope sentence (action = "scope", the default) or raises llmragent_claim_error (action = "error"). No current claim type authorizes population-estimate language. Used by report(); exported so custom report code can reuse it.

Usage

llm_claim_lint(text, run = NULL, action = c("scope", "error"))

Arguments

text

Character vector of prose to check.

run

An object accepted by as_agent_run() (supplies the claim type named in a scope message), or NULL.

action

"scope" (append a caveat when a population claim is found) or "error" (raise).

Value

The text (a character vector), possibly with a caveat appended.