Skip to content
Learn › Get data in: open the docs menu

Generate test data with AI

When you don't have real data yet, Generate with AI in the Data Library's New dataset dialog builds a dataset (up to 500 rows) from a plain-language description. The result is an ordinary dataset to test pipelines, prototype dashboards, train people or run demos. For ready-made data with no prompt, use Sample Files (see Load a built-in sample dataset).

Generate a dataset with AI

New Dataset dialog on Generate with AI, with a description of monthly marketing sales data typed in, User defined set to 30 rows, and the Generate button
  1. In the Data Library, click New dataset, then Generate with AI.
  2. Describe the dataset you want in plain language.
  3. Set the row count. User defined is selected by default with 30 rows. Enter an exact number from 1 to 500, or choose Let AI decide.
  4. Click Generate and wait for the preview to load.
  5. Check the suggested dataset name (you can edit it), the columns and the sample records. The preview is read-only. Select the X button in the preview bar to discard it.
  6. Click Create new dataset. To change the result instead, click the collapsed prompt to edit it (this discards the preview), then click Generate again.

The new dataset appears in the Data Library.

From your prompt, the AI works out column names and data types, realistic value ranges (sensible dates and prices), relationships between columns (defects rise with temperature, sales peak in holidays) and industry patterns (financial quarters, manufacturing shifts, appointment types).

When to use AI-generated data

UseExample
Pipeline testingIT is still setting up database access, but you need to start the monthly sales report. Generate sales data with the expected columns, build the pipeline, then swap in real data.
Dashboard prototypingThe board meets in 2 weeks and the warehouse is a month away. Generate executive metrics, build the layout and get the design and KPIs approved.
Team trainingNew analysts can't see customer data during training. Generate customer transactions for hands-on practice.
Documentation and demosGenerate industry-specific datasets for tutorials, guides and sales demos.

Write prompts that generate useful data

Instead ofWrite
"Generate sales data""Generate sales data with date, salesperson, product, quantity, unit price, total amount, and customer region"
"Include dates and amounts""Include order dates from January-March 2024, dollar amounts between $100-$5000"
"Add temperature and defect columns""Add temperature readings and defect counts, where defects increase when temperature exceeds 80°F"
"Include employee data""Include employee data with ID, department, hire date, salary - where IT department salaries are 20% higher"

Start with a broad prompt to get the basic structure, then regenerate with more specific constraints.

Example prompts and results

Manufacturing. Prompt:

Generate production line data with timestamp, line ID, units produced, 
defects found, operator name, and temperature readings for 8-hour shifts

Result: 30 rows; average, minimum and maximum temperature per shift (°C); 8 hours per record; realistic operator names rotating across records; temperatures of 20–26°C with natural variation; a shift-level production summary.

New Dataset dialog on Generate with AI: the manufacturing prompt and a preview of the generated Production Line Shift Data, 6 columns and 30 rows, with Create new dataset

Financial services. Prompt:

Create monthly revenue data by product category and region for 2024, 
including columns for month, category, region, revenue, and growth rate

Result: 120 rows (an AI-chosen size); columns Month, Category, Region, Revenue and Growth Rate; months of 2024 in YYYY-MM format; revenue with decimals; growth rates such as -0.05 to 0.05; categories and regions chosen from the prompt.

Healthcare. Prompt:

Generate patient appointment data including appointment ID, patient demographics, 
appointment type, provider name, insurance type, and appointment date/time

Result: sequential appointment IDs (APT-2024-0001); a realistic age and gender spread; types such as Physical, Specialist, Lab Work and Follow-up; providers with matching specialties; insurance such as Medicare, Blue Cross, Aetna and Self-Pay; times in business hours.

E-commerce. Prompt:

Create customer transaction data with order ID, customer name, product, 
quantity, price, order date, and shipping address for online retail

Result: order IDs in ORD-20240001 format; realistic customer names (no actual people); electronics, clothing and home goods; 1-5 items per order; prices of $15-$300 matched to category; recent dates with weekend and holiday patterns; realistic US addresses (no real locations).

Refine a first generation

Check the first result: do the column names, types and value ranges make sense, and are the columns related the way they should be? Then refine:

Original: "Generate customer data"
Refined: "Generate customer data with ages 18-75, email addresses, 
phone numbers, and purchase amounts between $25-$500"
Original: "Include sales rep and revenue"
Refined: "Include sales rep and revenue, where senior reps 
(5+ years experience) have 30% higher average deals"
Original: "Generate order data"
Refined: "Generate order data including some cancelled orders (10%), 
partial refunds, and missing shipping addresses for pickup orders"

Regenerate when column names don't match your expected schema, values look wrong for your industry, or important relationships or business rules are missing. Accept when the structure is close enough for testing and the goal is pipeline testing, not analysis.

Swap generated data for real data later

Generated datasets work as placeholders in a generate, build, replace workflow:

  1. Generate sample data that matches the schema you expect.
  2. Build the transformation pipeline on it.
  3. Test the logic and business rules.
  4. Validate the output format and dashboard fit.
  5. Replace it with a connector or a file upload when real data arrives.

To keep the schema close to production, name exact columns, formats and relationships in the prompt:

Good prompt: "Include columns named customer_id, order_date, 
product_sku, quantity, unit_price"
Good prompt: "Use YYYY-MM-DD date format, decimal prices 
with 2 decimal places, integer quantities"
Good prompt: "Each customer should have 1-5 orders, 
each order should have 1-3 line items"

See Add or replace data in a dataset for replacing the rows.

What AI-generated data can't do

  • Row count: with User defined, the maximum is 500 rows per generation (see Limits and quotas). That suits testing, not analysis.
  • Generic patterns: distributions are realistic but not specific to your business.
  • Static: no refresh. Generate again if you need new data.
  • Approximate schema: it follows general patterns but won't exactly copy your production schema.

Troubleshooting AI-generated data

SymptomFix
Column names or types aren't what you expectedName the exact columns and formats in the next prompt
Values look unrealistic (prices, date ranges, patterns)Add constraints: "prices between $X-$Y", "dates in 2024 only", "include seasonal patterns"
Columns that should be related look independentDescribe the relationship: "higher prices should correlate with luxury categories"
Your production schema is too complexGenerate the core columns needed for testing first, then add detail through refinement
Was this page helpful?

Something wrong? support@mammoth.io