Description
Deduplicate a supplied string universe, sample a distinct insertion set and controlled present/absent query pools, and delegate deterministic Bloom responses; report exact labels and observed false positives separately from the core's 8-significant-digit ideal-hash probability approximation, not a guaranteed error rate.
An operation trace pairs an ordered request stream with the state after each step. Empty operations, ties, evictions, and boundary indexes are part of the modeled contract rather than incidental display details.
Deduplicate a supplied string universe, sample a distinct insertion set and controlled present/absent query pools, and delegate deterministic Bloom responses; report exact labels and observed false positives separately from the core's 8-significant-digit ideal-hash probability approximation, not a guaranteed error rate.
When to use this tool
Use this generator to create reproducible bloom filter 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
- Supply universe, insertCount, queryCount, presentQueryProbability, bitCount, hashCount in the field shapes below. Set seed when you need an explicit replay.
- 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.
- Read inserted, queries, filter, summary. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Sample distinct inserted values and present/absent membership queries from a deduplicated universe. Delegate an insertion-only Bloom filter, compare each query with exact membership, and return estimated and observed false-positive diagnostics.1
Delegated operations used for this result: bloom filter. Their calculation or parsing conventions apply to the corresponding result fields.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| universe | Universe | Required. Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 512. |
| insertCount | Insert Count | Required. Safe integer; minimum 0; maximum 512. |
| queryCount | Query Count | Required. Safe integer; minimum 1; maximum 128. |
| presentQueryProbability | Present Query Probability | Required. Finite number; minimum 0; maximum 1. |
| bitCount | Bit Count | Required. Safe integer; minimum 8; maximum 65536. |
| hashCount | Hash Count | Required. Safe integer; minimum 1; maximum 16. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| inserted | Inserted | Required. Array of Text; maximum UTF-16 length 64.; minimum items 0; maximum items 512. |
| queries | Queries | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 128. |
| queries[].query | Query | Required. Text; maximum UTF-16 length 64. |
| queries[].exactlyPresent | Exactly Present | Required. Boolean. |
| queries[].possiblyPresent | Possibly Present | Required. Boolean. |
| queries[].falsePositive | False Positive | Required. Boolean. |
| filter | Filter | Required. Object; no unknown keys. |
| filter.bitCount | Bit Count | Required. Safe integer; minimum 8; maximum 65536. |
| filter.hashCount | Hash Count | Required. Safe integer; minimum 1; maximum 16. |
| filter.setBits | Set Bits | Required. Safe integer; minimum 0; maximum 65536. |
| filter.estimatedFalsePositiveProbability | Estimated False Positive Probability | Required. Finite number; minimum 0; maximum 1. |
| summary | Summary | Required. Object; no unknown keys. |
| summary.truePositiveCount | True Positive Count | Required. Safe integer; minimum 0; maximum 128. |
| summary.negativeQueryCount | Negative Query Count | Required. Safe integer; minimum 0; maximum 128. |
| summary.falsePositiveCount | False Positive Count | Required. Safe integer; minimum 0; maximum 128. |
| summary.observedFalsePositiveFraction | Observed False Positive Fraction | Required. Finite number; minimum 0; maximum 1. or Null. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. 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.
{
"input": {
"universe": [
"a",
"b",
"c",
"d"
],
"insertCount": 2,
"queryCount": 4,
"presentQueryProbability": 0.5,
"bitCount": 8,
"hashCount": 2,
"seed": 42
},
"output": {
"inserted": [
"a",
"d"
],
"queries": [
{
"query": "b",
"exactlyPresent": false,
"possiblyPresent": true,
"falsePositive": true
},
{
"query": "b",
"exactlyPresent": false,
"possiblyPresent": true,
"falsePositive": true
},
{
"query": "c",
"exactlyPresent": false,
"possiblyPresent": false,
"falsePositive": false
},
{
"query": "a",
"exactlyPresent": true,
"possiblyPresent": true,
"falsePositive": false
}
],
"filter": {
"bitCount": 8,
"hashCount": 2,
"setBits": 4,
"estimatedFalsePositiveProbability": 0.15481812
},
"summary": {
"truePositiveCount": 1,
"negativeQueryCount": 3,
"falsePositiveCount": 2,
"observedFalsePositiveFraction": 0.6666666666666666
},
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Possibly present is not exact membership. With this insertion-only model, inserted queries are cross-checked for no false negatives. Observed false-positive fraction is null if no negative queries occur and is not a guaranteed future rate.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- 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
Similar or alternative tools
- Random Counting Bloom Filter Workload Generator
Generate with-replacement string insertions, remove only eligible remaining occurrences, and query a delegated counting Bloom filter against exact retained multiplicities; query estimates may overcount through collisions, and the fixed batch is not an arbitrary interleaved deletion trace.
- Random Cardinality Sketch Workload Generator
Construct a seeded shuffled stream with an exact caller-selected number of distinct strings and duplicate occurrences, then delegate the existing fixed-hash HyperLogLog estimate; report signed and relative errors separately from exact cardinality, with null duplicate/relative fractions when their denominator is zero.