Skip to content

Main content

Random MinHash Similarity Workload Generator

Generate seeded string sets with exact supplied left/right/shared cardinalities, reuse exact intersection/union and deterministic 32-bit MinHash signatures, and retain exact versus estimated Jaccard separately; empty-union Jaccard is one, and estimates are not guarantees or semantic-similarity judgments.

Loading tool…

Description

Generate seeded string sets with exact supplied left/right/shared cardinalities, reuse exact intersection/union and deterministic 32-bit MinHash signatures, and retain exact versus estimated Jaccard separately; empty-union Jaccard is one, and estimates are not guarantees or semantic-similarity judgments.

Synthetic statistical data separates a specified generating model from the values observed in a finite draw. A model parameter, a sample summary, and the result of a fitted analysis answer different questions; retaining them separately makes numerical and statistical checks easier to interpret.

Generate seeded string sets with exact supplied left/right/shared cardinalities, reuse exact intersection/union and deterministic 32-bit MinHash signatures, and retain exact versus estimated Jaccard separately; empty-union Jaccard is one, and estimates are not guarantees or semantic-similarity judgments.

When to use this tool

Use this generator to create reproducible minhash similarity workload cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply universe, leftCount, rightCount, sharedCount, hashCount in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read sets, similarity, signatures. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Construct two sets with exact requested sizes and shared count from a distinct universe, then compute existing MinHash signatures and estimated Jaccard similarity. Independently verify the exact intersection-over-union value.1

Input fieldMeaning and unitsAccepted input
universeUniverseRequired. Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 512.
leftCountLeft CountRequired. Safe integer; minimum 0; maximum 128.
rightCountRight CountRequired. Safe integer; minimum 0; maximum 128.
sharedCountShared CountRequired. Safe integer; minimum 0; maximum 128.
hashCountHash CountRequired. Safe integer; minimum 1; maximum 256.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
setsSetsRequired. Object; no unknown keys.
sets.leftLeftRequired. Array of Text; maximum UTF-16 length 64.; maximum items 256.
sets.rightRightRequired. Array of Text; maximum UTF-16 length 64.; maximum items 256.
sets.intersectionIntersectionRequired. Array of Text; maximum UTF-16 length 64.; maximum items 256.
sets.unionUnionRequired. Array of Text; maximum UTF-16 length 64.; maximum items 256.
similaritySimilarityRequired. Object; no unknown keys.
similarity.exactJaccardExact JaccardRequired. Finite number; minimum 0; maximum 1.
similarity.estimatedJaccardEstimated JaccardRequired. Finite number; minimum 0; maximum 1.
signaturesSignaturesRequired. Object; no unknown keys.
signatures.leftLeftRequired. Array of Safe integer; minimum 0; maximum 4294967295.; minimum items 1; maximum items 256.
signatures.rightRightRequired. Array of Safe integer; minimum 0; maximum 4294967295.; minimum items 1; maximum items 256.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "universe": [
      "a",
      "b",
      "c",
      "d"
    ],
    "leftCount": 2,
    "rightCount": 2,
    "sharedCount": 1,
    "hashCount": 4,
    "seed": 42
  },
  "output": {
    "sets": {
      "left": [
        "a",
        "d"
      ],
      "right": [
        "b",
        "a"
      ],
      "intersection": [
        "a"
      ],
      "union": [
        "a",
        "d",
        "b"
      ]
    },
    "similarity": {
      "exactJaccard": 0.3333333333333333,
      "estimatedJaccard": 0.5
    },
    "signatures": {
      "left": [
        2111704691,
        1185767313,
        1377171301,
        2111704691
      ],
      "right": [
        1185767313,
        1185767313,
        444641715,
        2111704691
      ]
    },
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • The estimate depends on the linked deterministic hash family and hashCount. It can differ from exact similarity; finite set construction and hashing work are bounded.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random MinHash Similarity Workload Generator — tool.io

Similar or alternative tools

  • Random LSH Candidate Workload Generator

    Generate bounded string-set pair batches with exact supplied overlaps, then delegate banded MinHash candidate flags and signatures; retain exact Jaccard, estimated Jaccard, matching bands, and actual candidate counts separately, without interpreting a candidate as semantic similarity or a guaranteed retrieval outcome.

  • Random Heavy-Tail Comparison Experiment Generator

    Compare matched-size Cauchy and Pareto Type I samples with visible derived sampler seeds, observed extremes, medians, and linearly interpolated empirical quantiles; preserve Pareto sampler 10-significant-digit rounding and epsilon tail clipping, and do not report a finite Cauchy population mean or variance.