ster pairs inspect
Report duplicates, refusal-reading sides, length balance, and diversity for a contrastive pair set without loading a model.
Invocation and purpose#
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#
| Input | Required | Meaning |
|---|---|---|
--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> | yes | SimHash Hamming distance at or below which two pairs count as near-duplicates. Ster assumes none. |
--dedupe-bands <BANDS> | yes | Banded-LSH band count. The count must divide the 64-bit fingerprint evenly. |
--refusal-threshold <THRESHOLD> | yes | Refusal score at or above which a side is flagged. |
--unbalanced-ratio <RATIO> | yes | Longer-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.
duplicateisnullunless 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_refusalandnegative_refusalarenullbelow the threshold and otherwise carryscore,family, and the matchedsnippet, for example{"score":0.9,"family":"ai_disclaimer","snippet":"As an AI language model"}. The ten families areai_disclaimer,policy,apology_hedge,unable,cannot_action,prefer_rather,decline_refuse,no_support,no_ability, andrefusal_word, each with its own weight.length_ratiois the longer side over the shorter side in characters.unbalanced_countcounts the pairs above--unbalanced-ratio, which the document echoes asunbalanced_ratio— the length confound described under contrastive pair, made countable at the ratio the caller chose.diversitycarriesunique_unigrams,unique_bigrams,avg_jaccard,mean_simhash_hamming, andmin_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-thresholdor--unbalanced-ratiois a usage error that names the flag, exit 2;ster request pairs/inspectrefuses a body withoutdedupeBits,dedupeBands,refusalThresholdorunbalancedRatioby 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, andpair 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.