# データデザイナー

[Data Designer](https://github.com/NVIDIA-NeMo/DataDesigner)は、LLMを使用して高品質な合成データセットを生成するためのNVIDIA NeMoのフレームワークです。統計的サンプラー、LLM、または既存のシードデータセットを使用して、多様なデータを作成できます。

## 前提条件

```bash
pip install data-designer
```

## Hubからシードとしてデータセットをダウンロード

`HuggingFaceSeedSource` を使用して、Hub から直接データセットを読み込み、生成用のシードデータとして利用します。

```python
import data_designer.config as dd
from data_designer.interface import DataDesigner

data_designer = DataDesigner()
config_builder = dd.DataDesignerConfigBuilder()

# Load seed data from HuggingFace
seed_source = dd.HuggingFaceSeedSource(
    path="datasets/gretelai/symptom_to_diagnosis/data/train.parquet",
    token="hf_...",  # Optional, for private datasets
)
config_builder.with_seed_dataset(seed_source)

# Reference seed columns in prompts
config_builder.add_column(
    dd.LLMTextColumnConfig(
        name="physician_notes",
        model_alias="openai-gpt-5",
        prompt="Write notes for a patient with {{ diagnosis }}. Symptoms: {{ patient_summary }}",
    )
)

preview = data_designer.preview(config_builder, num_records=5)
```

## 生成されたデータセットをHubにプッシュする

組み込みの`push_to_hub`メソッドを使用して、生成されたデータセットをHubにアップロードします。

```python
# Generate dataset
results = data_designer.create(config_builder, num_records=1000, dataset_name="my-dataset")

# Push to Hub
url = results.push_to_hub(
    repo_id="username/my-synthetic-dataset",
    description="Synthetic dataset generated with Data Designer.",
    tags=["medical", "notes"],
    private=False,
)
```

## リソース

- [Data Designer ドキュメント](https://nvidia-nemo.github.io/DataDesigner/)
- [GitHub リポジトリ](https://github.com/NVIDIA-NeMo/DataDesigner)
- [シードデータセットガイド](https://nvidia-nemo.github.io/DataDesigner/latest/concepts/seed-datasets/)
- [Data DesignerとInference Providersの併用ガイド](https://huggingface.co/docs/inference-providers/integrations/datadesigner)

