Skip to content

Main content

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.

Loading tool…

Description

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.

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 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.

When to use this tool

Use this generator to create reproducible lsh candidate 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, pairCount, leftCount, rightCount, sharedCount, hashCount, bandCount 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 settings, pairs, candidateCount. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Construct set pairs with fixed overlap, compute exact and MinHash-estimated Jaccard similarity, and delegate banded locality-sensitive candidate selection. Return signatures, per-pair evidence, and candidate count.1

Input fieldMeaning and unitsAccepted input
universeUniverseRequired. Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 512.
pairCountPair CountRequired. Safe integer; minimum 1; maximum 32.
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.
bandCountBand 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
settingsSettingsRequired. Object; no unknown keys.
settings.hashCountHash CountRequired. Safe integer; minimum 1; maximum 256.
settings.bandCountBand CountRequired. Safe integer; minimum 1; maximum 256.
settings.rowsPerBandRows Per BandRequired. Safe integer; minimum 1; maximum 256.
pairsPairsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
pairs[].leftLeftRequired. Array of Text; maximum UTF-16 length 64.; maximum items 128.
pairs[].rightRightRequired. Array of Text; maximum UTF-16 length 64.; maximum items 128.
pairs[].sharedSharedRequired. Array of Text; maximum UTF-16 length 64.; maximum items 128.
pairs[].exactJaccardExact JaccardRequired. Finite number; minimum 0; maximum 1.
pairs[].estimatedJaccardEstimated JaccardRequired. Finite number; minimum 0; maximum 1.
pairs[].leftSignatureLeft SignatureRequired. Array of Safe integer; minimum 0; maximum 4294967295.; minimum items 1; maximum items 256.
pairs[].rightSignatureRight SignatureRequired. Array of Safe integer; minimum 0; maximum 4294967295.; minimum items 1; maximum items 256.
pairs[].candidateCandidateRequired. Boolean.
pairs[].matchingBandsMatching BandsRequired. Array of Safe integer; minimum 0; maximum 255.; maximum items 256.
candidateCountCandidate CountRequired. Safe integer; minimum 0; maximum 32.
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"
    ],
    "pairCount": 2,
    "leftCount": 2,
    "rightCount": 2,
    "sharedCount": 1,
    "hashCount": 4,
    "bandCount": 4,
    "seed": 42
  },
  "output": {
    "settings": {
      "hashCount": 4,
      "bandCount": 4,
      "rowsPerBand": 1
    },
    "pairs": [
      {
        "left": [
          "a",
          "d"
        ],
        "right": [
          "b",
          "a"
        ],
        "shared": [
          "a"
        ],
        "exactJaccard": 0.3333333333333333,
        "estimatedJaccard": 0.5,
        "leftSignature": [
          2111704691,
          1185767313,
          1377171301,
          2111704691
        ],
        "rightSignature": [
          1185767313,
          1185767313,
          444641715,
          2111704691
        ],
        "candidate": true,
        "matchingBands": [
          1,
          3
        ]
      },
      {
        "left": [
          "d",
          "b"
        ],
        "right": [
          "a",
          "d"
        ],
        "shared": [
          "d"
        ],
        "exactJaccard": 0.3333333333333333,
        "estimatedJaccard": 0,
        "leftSignature": [
          1185767313,
          3736780160,
          444641715,
          3736780160
        ],
        "rightSignature": [
          2111704691,
          1185767313,
          1377171301,
          2111704691
        ],
        "candidate": false,
        "matchingBands": []
      }
    ],
    "candidateCount": 1,
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • hashCount must divide evenly into bandCount. Candidate status is an approximate retrieval filter, not exact similarity or guaranteed recall; hash work and universe size 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 LSH Candidate Workload Generator — tool.io

Similar or alternative tools

  • 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.

  • 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.