The Realism Engine: How v0.5.2 Achieves 100% Mathematical Consistency
2026-03-08•By Misata Team
The Realism Engine
Every synthetic data tool has the same problem: columns don’t know about each other. Faker generates a random total of $847.23 and a random subtotal of $312.00 — but those numbers have no relationship.
Misata v0.5.2 introduces the Realism Engine, a post-generation pass that enforces 11 cross-column consistency rules.
The 11 Rules
Monetary Integrity
- total = subtotal + tax + shipping — Every order’s total is the exact sum of its components.
- cost < price (30–70% margin) — No product costs more than its selling price.
- line_total = qty × unit_price − discount — Every line item is mathematically computed.
- discount ≤ 30% of unit_price — Discounts stay realistic.
- tax = subtotal × rate — Tax is derived, never random.
Temporal Integrity
- delivered_at > created_at — Deliveries happen 1–14 days after orders.
- delivered_at = NULL when status ≠ delivered — Pending orders don’t have delivery dates.
- updated_at ≥ created_at — Updates can’t predate creation.
Identity Integrity
- email = f(first_name, last_name) — Emails are composed from the person’s actual name.
- slug = slugify(name) — URL slugs derive from category names.
- FK referential integrity — Every foreign key points to a real parent row.
The Result
After applying all 11 rules to our 1,515-row e-commerce dataset, we achieved 100% consistency — every single mathematical and logical relationship holds.
Try It
pip install misata==0.5.2
misata generate --smart —db your_database.db
The --smart flag enables the realism engine automatically.