Skip to contents

A shared generic across the LLMR method packages. It returns the small, machine-readable set of health numbers behind a result object (the part you would assert in a test or drop into a table), as distinct from report(), which drafts methods-section prose.

Usage

diagnostics(x, ...)

Arguments

x

An LLMR experiment or an object returned by an LLMR method package.

...

Passed to methods.

Value

A method-defined object, by convention a tibble of diagnostic values.

Details

LLMR defines the generic and an erroring default only. The method packages (LLMRcontent, LLMRpanel) provide the implementations, each returning a tibble of the key numbers for its own result classes.

See also

Examples

# A method package defines a method for its own result class:
diagnostics.toy_result <- function(x, ...) {
  tibble::tibble(n = length(x$scores), mean_score = mean(x$scores))
}
res <- structure(list(scores = c(0.2, 0.4, 0.9)), class = "toy_result")
diagnostics(res)