Skip to contents

Read persona briefs back as text and flag the ways synthetic personas fail representationally. Two layers:

Usage

persona_audit(p_or_set, .config = NULL, dimensions = NULL)

# S3 method for class 'persona_audit'
print(x, ...)

Arguments

p_or_set

A persona_frame(), a persona_variants() result (persona_set), or a list of persona_frame objects.

.config

Optional generative LLMR::llm_config() for model scoring. When NULL (default), only the lexical layer runs and model scores are NA.

dimensions

Optional character vector naming the qualities to score (model layer); defaults to caricature, out-group homogeneity, and essentialism. Recorded in the judge prompt.

x

A persona_audit.

...

Ignored.

Value

A tibble of class persona_audit, one row per persona, with columns id, flag_lexical (any lexical hit), n_lexical_hits, caricature_score (0–1 or NA), essentialism_score (0–1 or NA), and notes.

Details

  • Lexical (always, no model): each brief is scanned against a small built-in lexicon of essentializing and demographic-as-destiny patterns. A brief that says a demographic naturally or always thinks something is flagged.

  • Model (optional, when .config is a generative LLMR::llm_config()): each brief is scored on caricature and essentialism on a 0–1 scale via LLMR::llm_judge(). Without a config these scores are NA.

The lexical layer is a screening pass, not a proof: a clean scan does not certify a brief is unbiased, and a hit may be a false positive in quoted speech. Treat the audit as evidence to read, alongside the briefs themselves.

Examples

set <- persona_variants(
  persona_frame("A small-business owner.", source = "synthetic"),
  vary = list(age = c("35", "60")))
persona_audit(set)
diagnostics(persona_audit(set))
if (FALSE) { # \dontrun{
cfg <- LLMR::llm_config("openai", "gpt-4o-mini")
persona_audit(set, .config = cfg)   # adds model caricature scores
} # }