Skip to content

The 7 generator types

Everything Phony produces comes from a generator. There are seven kinds. Pick by the nature of the data you need.

NeedTypeExample
Computed from an algorithmLogicUUID, random int, date, sequence
One of a fixed valid setListcountry, HTTP status, currency
Realistic for a localeModelperson names, company names
Composed from other valuesTemplateemail, full address, SKU
Matching a distributionStatisticalages ~ Normal(35, 12)
Coherent across columnsLinkedcity + country + postal
Chronological datesEvent Sequencecreated → paid → shipped

Logic — pure algorithm

No data, no locale, fastest. uuid_v4/uuid_v7/ulid/nanoid, int_between, float_between, boolean, datetime_between/date_between/timestamp, sequence, gaussian, exponential.

json
"age": { "type": "logic", "algorithm": "int_between", "params": { "min": 18, "max": 85 } }

List — a finite valid set

When the value must be correct (a real currency, a valid status). Inline or from a locale asset; optionally weighted.

json
"status": { "type": "list", "values": [
  { "value": "active", "weight": 70 }, { "value": "churned", "weight": 30 } ] }

Model — realistic, locale-flavoured (N-gram)

Trained on real samples, it generates new values that follow the same patterns — Turkish names that sound Turkish, without copying the training set. Modes: word, sentence, text, paragraph, poem, acrostic, real_word.

json
"first_name": { "type": "model", "source": "person.first_names",
                "generation": { "mode": "word" } }

Template — composition

Combines other generators and literals via the expression language: a pattern, weighted variants, and a post-processing operations pipeline.

json
"email": { "type": "template",
           "pattern": "{{lowercase(first_name)}}@{{pick(['gmail.com','yahoo.com'])}}" }

Statistical — distributions

Match real-world shape, not just randomness: categorical (frequencies) or continuous (normal, lognormal, exponential, uniform, poisson, beta, gamma), with optional differential privacy.

json
"customer_age": { "type": "statistical", "mode": "continuous", "distribution": "normal",
                  "params": { "mean": 35, "stddev": 12 }, "constraints": { "min": 18, "max": 85 } }

Linked — coherent multi-column

When columns must agree, one record drives them all — so you never get "Ankara, Japan". A source record, or rules that compute related columns.

json
"location": { "type": "linked", "source": "geo.locations",
              "columns": ["city","country","postal_code"] }

Fields reference its columns: location.city, location.country.

Event Sequence — chronological dates

A base event plus probabilistic, delayed follow-ups that respect order.

json
"timeline": { "type": "event_sequence", "events": [
  { "name": "created_at", "base": true, "range": { "start": "-1year", "end": "now" } },
  { "name": "paid_at", "after": "created_at", "delay": { "min": "0h", "max": "24h" }, "probability": 0.95 } ] }

For exact parameters and edge cases, see the Generator Types spec and the Generator × Asset matrix.

Phony Cloud — Documentation & Specification