Skip to content

About

Agentic workflow for synthetic data generation & evaluation.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

guided-sdg-image

DOI CI Release Python 3.13 uv License: GPL-3.0-or-later

About

GuidedSDG is a Large Language Model (LLM) assisted workflow for synthetic tabular data generation and evaluation.

The application guides users through data preparation, generator selection, synthetic data generation, and evaluation. It incorporates human-in-the-loop (HITL) interactions, allowing users to review and revise agent recommendations throughout the workflow.

Getting started

1. Prerequisites

1.1 Install the project dependencies

Verify that UV is installed. Enter the following into the terminal:

uv sync

1.2 Install one of the following container engines

Verify that one of the following is on your system:

Verify the installation:

# If Podman and Podman-Compose is installed:
podman --version
podman compose version

# If Docker and Docker-Compose is installed:
docker --version
docker compose version

2. Configure environment variables

Create a .env file with the necessary API credentials for the configured language model.

  • Note: OpenAI compatible APIs are currently permitted.
# Supported Streamlit providers: openai, ollama, lm-studio
MODEL_PROVIDER=openai
MODEL_ID=your-model-identifier

# Authentication (required for hosted OpenAI-compatible APIs)
OPENAI_API_KEY=your-api-key

# API endpoint (optional if using the provider's default)
BASE_URL=https://your-provider-endpoint/v1

3. Start the application

The application uses two containers:

guided-sdg: Runs the Streamlit interface and workflow.

sdr: Runs the Synthetic Data Release generators through an HTTP API.

# Using Podman:
podman build -t guided-sdg .
podman compose up -d --build

# Using Docker:
docker build -t guided-sdg .
docker compose up -d --build

Click here to access the Streamlit interface after running the container.


Troubleshooting: Podman network issues

When using Podman, network creation may fail if its automatically assigned subnet conflicts with an existing network.

If the following error occurs:

Error: could not find free subnet from subnet pools

Create the project's network manually using an available subnet:

podman network create --subnet 172.31.250.0/24 guided-sdg_default

Then restart the application:

podman compose up -d --build

To stop the containers:

# Using Podman:
podman compose down

# Using Docker:
docker compose down

4. Start the Streamlit user interface

Enter the following into the terminal:

streamlit run ./src/agentic_synth_data/ui/main.py
podman run --rm --env-file .env -p 8080:8080 guided-sdg
# If podman is installed:
podman-compose up # To start the containers
podman-compose down # To stop and remove services

# If docker is installed:
docker compose up # ""
docker compose down # ""

Workflow:

Step Description LLM assistance
1 Load dataset and configure LLM agent.
2 Select synthesis preferences.
3 a) Detect and standardize missing value markers.
b) Infer Python data types and semantic types. ✓
c) Select covariates.
d) Split data into training and test sets.
e) Recommend generator (CTGAN, PATEGAN, BayesianNet, PrivBayes). ✓
f) Recommend and apply a missing value handling strategy (if necessary). ✓
4 a) Save the prepared dataset.
b) Generate metadata for generator input.
5 Generate synthetic data using the selected generator.
6 a) Calculate fidelity and privacy evaluation metrics.
b) Interpret evaluation results and recommend improvements. ✓
c) Generate a workflow report.
7 Optionally revise workflow decisions and repeat generation and evaluation. ✓

Info: Each check mark (✓) indicates that the LLM agent is invoked to assist during the workflow. The agent is only involved in making suggestions.

References

  • Syndat: Adams, T., Birkenbihl, C., Otte, K., et al. (2025). On the fidelity versus privacy and utility trade-off of synthetic patient data. iScience, 28. Publication | GitHub
  • Anonymeter: Giomi, M., Boenisch, F., Wehmeyer, C., & Tasnádi, B. (2023). A Unified Framework for Quantifying Privacy Risk in Synthetic Data. Proceedings on Privacy Enhancing Technologies. Publication | GitHub
  • Synthetic Data Release: Stadler, T., Oprisanu, B., & Troncoso, C. (2022). Synthetic Data – Anonymisation Groundhog Day. 31st USENIX Security Symposium. Publication | GitHub

Icon attribution

Project structure

guided-sdg
├── compose.yaml # Container configuration
├── .env # LLM API configuration
├── data # Input and prepared datasets
├── demo_data # Example dataset
│   └── mix_titanic.csv
├── notebooks # Example workflow notebook
├── output # Versioned generation results
│   └── version_1
│       ├── synthetic_*_*_v*.csv # Generated synthetic dataset
│       ├── plots # Evaluation visualizations
│       └── report_*.md # Workflow report
├── sdr_service # Synthetic data generator service
└── src
    └── agentic_synth_data

About

Agentic workflow for synthetic data generation & evaluation.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages