Ster/Docs

ster pairs inspect

Report duplicates, refusal-reading sides, length balance, and diversity for a contrastive pair set without loading a model.

Invocation and purpose#

text
ster pairs inspect --dedupe-bits <BITS> --dedupe-bands <BANDS> --refusal-threshold <THRESHOLD> --unbalanced-ratio <RATIO> [--pairs <PAIRS>]

Loads a pair set through the same validation ster vector train performs, then audits it: which pairs repeat, which sides read as a refusal instead of an answer, which pairs have one side far longer than the other, and how varied the set is overall. Every judgement is textual, so no model is resolved or loaded and nothing is written.

Inputs and options#

InputRequiredMeaning
--pairs <PAIRS>no*Path to a pair-set JSON document with trait_name and a non-empty pairs array. Named by flag, like every sibling subcommand: pairs add and pairs remove take the set they edit as --pairs, and a positional here was the one place the pair surface disagreed with itself. Omit it to use the active pair set accepted by ster workspace import-pairs; without either source Ster refuses before loading a model.
--dedupe-bits <BITS>yesSimHash Hamming distance at or below which two pairs count as near-duplicates. Ster assumes none.
--dedupe-bands <BANDS>yesBanded-LSH band count. The count must divide the 64-bit fingerprint evenly.
--refusal-threshold <THRESHOLD>yesRefusal score at or above which a side is flagged.
--unbalanced-ratio <RATIO>yesLonger-over-shorter character ratio above which a pair is counted as unbalanced.

Output and state#

Makes no durable state change; the file is only read. Stdout is one pretty-printed JSON document. The set level carries trait_name, pair_count, duplicate_count, refusal_count, unbalanced_count, unbalanced_ratio, and diversity; entries then carries one record per pair with index, both texts, positive_chars/negative_chars, positive_words/negative_words, duplicate, positive_refusal/negative_refusal, and length_ratio.

  • duplicate is null unless the pair collided with an earlier one: {"kind":"exact","of":<N>} when the two are identical after normalization, or {"kind":"near","of":<N>,"distance":<BITS>} when the fingerprints are within --dedupe-bits. First occurrence wins, so pair order decides which of two near-identical pairs is flagged.
  • positive_refusal and negative_refusal are null below the threshold and otherwise carry score, family, and the matched snippet, for example {"score":0.9,"family":"ai_disclaimer","snippet":"As an AI language model"}. The ten families are ai_disclaimer, policy, apology_hedge, unable, cannot_action, prefer_rather, decline_refuse, no_support, no_ability, and refusal_word, each with its own weight.
  • length_ratio is the longer side over the shorter side in characters. unbalanced_count counts the pairs above --unbalanced-ratio, which the document echoes as unbalanced_ratio — the length confound described under contrastive pair, made countable at the ratio the caller chose.
  • diversity carries unique_unigrams, unique_bigrams, avg_jaccard, mean_simhash_hamming, and min_simhash_hamming, measured over the positive sides only: the two sides of a pair are near-copies of each other by construction, so scoring both would report the contrast as repetition.

Refusals#

  • Leaving out --dedupe-bits, --dedupe-bands, --refusal-threshold or --unbalanced-ratio is a usage error that names the flag, exit 2; ster request pairs/inspect refuses a body without dedupeBits, dedupeBands, refusalThreshold or unbalancedRatio by name.
  • The set is loaded first, so the pair-set load refusals apply unchanged: failed to read pair set <PATH>, invalid pair set JSON in <PATH>, pair set <PATH> contains no pairs, and pair set <PATH> contains an empty positive or negative prompt.
  • A band count that does not divide the 64-bit fingerprint evenly is refused as dedupe band count <N> must divide the 64-bit simhash evenly, such as 4, 8, 16, or 32.
  • A threshold wider than the fingerprint is refused as dedupe threshold <N> exceeds the 64-bit simhash width.