Generating synthetic data with ChatGPT, Copilot, LLMs and Python, plus healthcare uses

Making synthetic data with ChatGPT, Copilot, generative AI, LLMs and Python, where it comes from, real vs synthetic, healthcare and market research.

Pranjul Rathour, GenAI engineer, India
Pranjul Rathour, GenAI engineer, India

Key takeaways

  • ChatGPT and Copilot can generate synthetic records directly or write generator scripts.
  • LLM pipelines need seed variety, structured outputs, deduplication and validation.
  • Python tools include Faker, SDV, NumPy and scikit-learn's dataset generators.
  • Synthetic data supplements real data but cannot replace real-world evaluation.
  • Healthcare and market research use synthetic data for privacy and exploration, with careful validation.

Synthetic data can be generated with chat assistants such as ChatGPT and Copilot, with LLM pipelines, or with Python libraries that model real distributions. Each suits different needs, from quick test fixtures to privacy-safe research datasets. I built FineTune Studio for QLoRA fine-tuning, where training data quality decides results, so this page covers ChatGPT, Copilot and generative AI, LLM and Python methods, where synthetic data comes from, whether it can replace real data, and uses in healthcare and market research.

Can ChatGPT generate synthetic data?

Yes. ChatGPT can generate synthetic text, such as questions, reviews and dialogues, and tabular data, either directly as CSV or JSON or by writing and running Python code that creates larger files with libraries such as Faker and NumPy.

For small datasets, describe the schema, number of rows, value ranges and relationships, and ask for edge cases. For larger or statistically realistic data, ask it to write a script, which you can run and modify. Watch for repetitive examples and unrealistic distributions, so request variety explicitly and check summary statistics. Never paste real personal data to model from, and review OpenAI's terms if you plan to use outputs to train other models.

Can Copilot generate synthetic data?

Yes. GitHub Copilot can write scripts and test fixtures that generate synthetic data, such as Faker-based factories for users and orders, while Microsoft 365 Copilot can create sample tables in Excel or draft example records in documents.

For developers, Copilot is most useful for producing data generators inside your codebase: seeded factories for tests, SQL insert scripts for development databases and mock API responses. Ask it to include boundary values, missing fields and unusual characters, which catch bugs. Review generated code for correctness and keep a fixed random seed so tests are reproducible. For business users, Copilot in Excel can produce realistic-looking sample data for demos and training spreadsheets.

Can generative AI create synthetic data?

Yes. Generative AI is one of the main ways to create synthetic data: language models produce text, diffusion models produce images, and specialised models such as CTGAN or variational autoencoders produce tabular data mirroring real distributions.

Each type learns patterns from real data, then samples new examples. Image generators create training images for rare defects or unusual conditions, while text models create instruction datasets, conversations and labelled examples. Simulation complements generative AI, especially for robotics and autonomous driving, where rendered environments produce perfectly labelled data. Quality depends on how well the generator captures real variation, so always validate synthetic data against real samples before relying on it.

How do you generate synthetic data using an LLM?

Define the schema and target distribution, write a prompt template, vary seeds such as topics, personas and difficulty, request structured JSON output, generate in batches, then deduplicate, filter low-quality examples and validate against real data.

Also asked as: how to generate synthetic data using llm

Diversity is the main challenge, so build a seed list covering the space you need, such as fifty topics times five personas, rather than asking for many examples in one prompt. Use moderate temperature, and ask for edge cases explicitly. Filter with rules and an LLM judge, then review random samples by hand. Libraries such as distilabel organise these pipelines. For fine-tuning data, test the result with base-versus-tuned evaluation, as in FineTune Studio.

How do you generate synthetic data in Python?

Use Faker or Mimesis for realistic fake records, NumPy and SciPy for values from chosen distributions, scikit-learn's make_classification and make_regression for machine learning test sets, and SDV for synthetic tables learned from real data.

Also asked as: how to generate synthetic data in python

For test data, Faker creates names, addresses, emails and dates in many locales, including Indian formats. For statistical realism, fit an SDV model, such as GaussianCopula or CTGAN, on real data and sample new rows, then evaluate quality with SDMetrics. For classification experiments, make_classification controls the number of features, informative features and class balance. Set random seeds for reproducibility, save datasets with their generation scripts, and document the assumptions behind each distribution.

Where does synthetic data come from?

Synthetic data comes from rules and templates, statistical models fitted to real data, simulations such as game engines and digital twins, and generative AI models, including language models, GANs and diffusion models.

Most methods start from real data or expert knowledge. Statistical and generative models learn patterns from real samples, so their quality and biases reflect that source. Simulations encode physics and scenarios designed by engineers, producing labelled images or sensor data. Rule-based generators follow formats specified by developers, suiting software testing. Knowing the origin matters, because it determines what the data can represent faithfully and where it may mislead, such as rare cases the source never contained.

Can synthetic data replace real data?

Not fully. Synthetic data can supplement real data, protect privacy, fill gaps and enable early testing, but final models and decisions should be validated on real data, since synthetic data can miss rare patterns or carry generator biases.

Some tasks rely heavily on synthetic data successfully, such as software testing, simulation-trained robotics with real-world fine-tuning, and instruction tuning with LLM-generated examples. But a 2024 Nature paper on model collapse found that models trained repeatedly on generated data can degrade, losing diversity. The safest approach mixes synthetic with real data, measures performance on a real held-out test set, and tracks where synthetic examples help or hurt. Treat synthetic data as a tool, not a substitute for reality.

What is the difference between real and synthetic data?

Real data is collected from actual events, people or measurements. Synthetic data is generated artificially to resemble real data's structure and statistics, without corresponding to real individuals or events.

Real data captures true complexity, including rare cases and messy errors, but may be scarce, costly, biased or restricted by privacy laws. Synthetic data is cheap to scale, privacy-friendlier and easy to label, but only as faithful as its generator, and it may smooth over important outliers. Real data is the ground truth for evaluation; synthetic data is best for augmentation, testing and sharing. Many projects use both, with clear labels showing which records are synthetic.

What is synthetic data in healthcare?

In healthcare, synthetic data means artificial patient records, medical images or clinical trial data generated to resemble real populations without exposing real patients. It supports research, software testing, education and AI development under strict privacy rules.

Synthea, an open-source tool from MITRE, generates realistic synthetic patient histories, widely used for testing health software and interoperability standards such as FHIR. Generative models create synthetic medical images to augment rare conditions in training data. Benefits include faster data access and safer sharing, but risks remain: re-identification from poorly generated data and clinical patterns that do not match reality. Validate with clinicians, measure privacy risk, and confirm models on real, approved datasets before clinical use.

How does synthetic data work in market research?

In market research, synthetic data often means simulated survey responses or synthetic personas generated by language models conditioned on demographic profiles, used to pretest questionnaires, explore hypotheses and estimate likely reactions quickly.

Also asked as: how synthetic data in market research works

A 2023 study by Argyle and colleagues found that language models can reproduce some aggregate opinion patterns from real surveys, but such simulations also flatten diversity, reflect training biases and miss emerging trends. Synthetic panels are therefore best for early exploration, such as refining question wording or generating hypotheses, not for final decisions. Validate key findings with real respondents. Synthetic data also helps share research datasets safely, by generating records that preserve statistical relationships without exposing participants' identities.

Sources

  1. Synthea, synthetic patient generatorsynthetichealth.github.io
  2. SDV, Synthetic Data Vault documentationdocs.sdv.dev
  3. distilabel, repositorygithub.com
  4. Faker, Python library documentationfaker.readthedocs.io
  5. scikit-learn, make_classificationscikit-learn.org
  6. Argyle et al., Out of One, Many: Using Language Models to Simulate Human Samplesarxiv.org
Pranjul Rathour
Pranjul Rathour
GenAI Engineer · India

GenAI engineer and AI product builder with 2+ years shipping production-grade AI systems: RAG pipelines, fine-tuned LLMs, hybrid retrieval and multi-modal apps across vision, speech and OCR, architected end to end from ingestion to deployment. Leads engineering for SCULT INDIA's 14-member team, founded the 500+ member TechVerse Enclave community and has mentored 200+ students. Three hackathon first prizes: Changethon 2025 (IIT Roorkee), Product Genesis at Vividhotsava 2025 (CSJMU) and BYTEBATTLE (MeetKats).

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way. Email pranjulrathour41@gmail.com.

Keep reading

More on Fine-tuning LLMs

All Fine-tuning LLMs guides →
Campus talks · hackathon judging · mentoring

Want this as a live session at your college?

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way.

Pranjul Rathour, GenAI engineer in India