Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seedmock

Seed-controlled LLM data generation: the same seed and schema produce the same records every time.

Demo: defining a schema and generating 10 records in the seedmock UI

git clone https://github.com/mohanish3/seedmock
cd seedmock
pip install -r requirements.txt
export OPENAI_API_KEY=sk-...
streamlit run app.py

Requires an OpenAI API key: generation calls GPT-4o with temperature=0 and a fixed seed. No local or offline mode currently.

[
  { "id": "3e4a1b2c-...", "full_name": "Maya Chen",    "email": "maya.chen@techwave.io",    "job_title": "Senior Engineer" },
  { "id": "9f7c3d1a-...", "full_name": "Lucas Rivera", "email": "l.rivera@orbitsoft.com",   "job_title": "Product Manager"  }
]

Same seed and schema produce identical output indefinitely. A different seed produces a different, equally realistic dataset.

Problem

Faker produces a different result every run — fine for unit tests, a problem for integration tests that assert against fixed values. Hand-written fixtures go stale as schemas change. Calling an LLM directly is not deterministic.

Deterministic Realistic Type-aware
Faker.js / Faker.py Yes (with seed) No Partial
OpenAI / Claude, direct No Yes Partial
seedmock Yes Yes Yes

Schema format

[
  {"name": "id",         "type": "uuid"},
  {"name": "full_name",  "type": "full_name"},
  {"name": "email",      "type": "email"},
  {"name": "age",        "type": "integer", "min": 18, "max": 65},
  {"name": "plan",       "type": "string",  "options": ["free", "pro", "enterprise"]}
]

More schema examples in examples/.

Supported types: uuid, full_name, first_name, last_name, email, phone, company_name, job_title, street_address, city, country, integer, float, boolean, date, datetime, url, username, short_bio, sentence, paragraph, product_name, product_description, price, color, file_name, ip_address.

How it works

The schema is converted into a structured prompt, sent to GPT-4o with temperature=0 and the given seed, and the response is parsed into JSON. Same seed and schema produce the same prompt, which produces the same output.

Who it's for

  • Backend engineers writing integration tests that assert against fixed expected values in CI
  • QA engineers who need realistic edge-case data without maintaining fixtures by hand
  • Frontend developers who want fake API responses that stay consistent across sessions

License

MIT · Mohanish

About

Deterministic fake data generator powered by GPT-4o. Same seed and schema produce identical test records every run, for CI pipelines and integration tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages