Skip to contents

Returns a tidy frame shaped for an external validator (the LLMRcontent package's content-validation entry point): one row per labeled unit with the aligned id, prediction, and gold. This is the hand-off frame; it does not call LLMRcontent. Pass the result to LLMRcontent's validator (for example LLMRcontent::validate_against_gold(frame)) for the heavier diagnostics (confusion matrix, per-class precision/recall, calibration curves) that are out of scope for this thin local estimator.

Usage

as_llmrcontent_validation(predictions, gold, id = NULL)

Arguments

predictions

The model's predictions on the labeled units (a vector), or a tibble with a single prediction column.

gold

The human labels on the same units, aligned to predictions.

id

Optional ids for the units; defaults to a 1..n sequence.

Value

A tibble with columns id, prediction, gold.

Examples

frame <- as_llmrcontent_validation(
  predictions = c("pos", "neg", "pos"),
  gold        = c("pos", "neg", "neg"))
frame