Skip to contents

Finds the pairs a run left as NA, scores just those, and returns a Mapping with the successful ones filled in. Everything that already scored is untouched.

Usage

retry_failed(x, llmconfig, verbosity = 1L, ...)

Arguments

x

Mapping object.

llmconfig

rtemis.llm::LLMConfig: Model configuration. Using a different model from the original run is allowed but warns, since the refilled cells then come from a different rater than the rest.

verbosity

Integer [0, Inf): Verbosity level.

...

Additional per-call arguments forwarded to rtemis.llm::generate().

Value

Mapping object with failed pairs re-scored where possible.

Details

The scoring system, block structure, relation, repeats and rationale setting all come from the original run rather than from arguments, because a cell scored under different settings is not comparable to its neighbours. Only the model connection is supplied again – Mapping deliberately does not persist credentials, so the config cannot be reconstructed from run.

Retry granularity follows the block structure, because that is the unit a call actually failed at:

  • "pairwise" re-scores each failed pair on its own.

  • "joint" re-scores every criterion for any candidate with a failed cell, since one joint call produces that candidate's whole row.

A pair that fails again stays NA. The run record gains a retries entry logging each attempt, so a mapping that needed three passes says so.

Author

EDG

Examples

if (FALSE) { # \dontrun{
  mapping <- map_course_to_sessions(...)
  sum(is.na(mapping@edges[["value"]]))
  mapping <- retry_failed(mapping, llmconfig)
  sum(is.na(mapping@edges[["value"]]))
} # }