Synthetic data is data created artificially, by rules, simulations or by other AI models, instead of being collected from the real world. It mimics the format and characteristics of real data.

How it works

There are three common ways to generate this data:

  • Rules and programs: a script creates records following a pattern, such as fictitious customers with name, city and purchase value.
  • Simulation: a virtual environment produces situations, such as traffic to train an autonomous car.
  • Generative models: a language model writes questions and answers, or an image model creates photos.

After generation comes the most important step: filter and validate. Synthetic data can have errors or repeat the same patterns. For that reason, it is common to check quality, remove duplicates and test the trained model on real data.

Practical example

You want to test a system that processes orders, but you cannot use real customer data because of LGPD. Instead, you generate fake orders.

A simple Python example:

Python · gerar.py
import random
nomes = ["Ana", "Bruno", "Carla"]
pedidos = [
    {"cliente": random.choice(nomes), "valor": round(random.uniform(20, 500), 2)}
    for _ in range(100)
]
print(pedidos[:3])

Another case: you have 50 examples of customer questions and use a language model to create variations, expanding the set to fine tune a classifier. A human reviews a sample before using it.

What it's used for

It is used to protect privacy, since it does not expose real people. It is used to augment small datasets, when the original set is small. It helps cover rare cases, such as fraud or failures, that almost never appear in real data. And it is used to test systems without relying on production data.

It is also used to create instruction and response examples for fine tuning language models.

Caveats

The main risk is training models with data that does not reflect reality. If a model learns only from data generated by another model, errors and biases can accumulate and quality can drop over time.

For that reason, mix with real data when possible, always validate on real data and manually review samples. Synthetic data is also not automatically anonymous: if it is very similar to the originals, it can reveal information.