| plan_screening | R Documentation |
Applies the SAFE rule from Spillias et al. (2026) to a ranking produced
by rank_records(). Walks the ranked corpus from highest score to
lowest, and returns the position where SAFE fires along with the
subset of records the human should screen (everything at or above that
position). Defaults reproduce the paper's advance-choosable recommended
setting: minimum coverage 50\
plan_screening(
ranked,
target_recall = .DEFAULT_TARGET_RECALL,
safe_min_cover = .DEFAULT_SAFE_MIN_COVER,
safe_run_length = .DEFAULT_SAFE_RUN_LENGTH,
spot_check_n = .DEFAULT_SPOT_CHECK_N,
spot_check_labels = NULL,
seed = 1L
)
ranked |
A |
target_recall |
Target recall (default 0.95). |
safe_min_cover |
Minimum-coverage fraction (default 0.50). |
safe_run_length |
Consecutive-negatives run length (default 50). |
spot_check_n |
Number of records in the SAFE spot-check (default 200). |
spot_check_labels |
Optional named vector of accept/reject decisions
for the spot-check records (names = record ids, values in
|
seed |
Random seed for the spot-check draw. |
Because SAFE's spot-check gate depends on a random sample, the returned
plan is only deterministic when seed is set.
A screenllm_plan object.
# A minimal example. In practice, `ranked` comes from `rank_records()`.
ranked <- data.frame(
id = paste0("r", 1:100),
universal_best_score = sort(runif(100, 0, 100), decreasing = TRUE),
rank = 1:100
)
plan <- plan_screening(ranked, safe_run_length = 10, spot_check_n = 20)
plan
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.