mbakgun commited on
Commit
cd56ff8
·
verified ·
1 Parent(s): 5be8909

Update README: Add OpenAI format documentation

Browse files
Files changed (1) hide show
  1. README.md +128 -35
README.md CHANGED
@@ -1,36 +1,57 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
3
  task_categories:
4
- - text-generation
5
  language:
6
- - en
7
- tags:
8
- - n8n
9
- - workflow
10
- - automation
11
- - no-code
12
- - low-code
13
- - axolotl
14
- - fine-tuning
15
  size_categories:
16
- - 1K<n<10K
17
  ---
18
 
19
  # n8n Workflow Templates Dataset
20
 
21
- A curated collection of n8n workflow automation templates formatted for LLM fine-tuning.
22
 
23
  ## Dataset Description
24
 
25
- This dataset contains **2,737** n8n workflow templates from the official n8n template library, formatted in Alpaca style for fine-tuning LLMs to generate n8n workflows.
 
 
 
 
 
 
26
 
27
- ### Data Fields (Alpaca Format)
 
 
28
 
29
- | Field | Description |
30
- |-------|-------------|
31
- | `instruction` | System prompt for n8n workflow generation |
32
- | `input` | User's workflow requirements/description |
33
- | `output` | Complete n8n workflow JSON |
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  ### System Prompt
36
 
@@ -40,43 +61,115 @@ All records share the same instruction:
40
 
41
  ## Dataset Structure
42
 
 
43
  ```json
44
  {
45
  "instruction": "You are an expert n8n workflow generation assistant...",
46
  "input": "Create a workflow that retrieves Google Analytics data...",
47
- "output": "{\"id\": \"...\", \"nodes\": [...], \"connections\": {...}}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
  ```
50
 
51
  ## Loading the Dataset
52
 
 
 
53
  ```python
54
  from datasets import load_dataset
55
 
56
- dataset = load_dataset("mbakgun/n8nbuilder-n8n-workflows-dataset")
 
 
 
 
 
 
 
57
  ```
58
 
59
- ## Fine-tuning with Axolotl
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ```yaml
62
  datasets:
63
  - path: mbakgun/n8nbuilder-n8n-workflows-dataset
64
  type: alpaca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  ```
66
 
 
 
 
 
67
  ## Use Cases
68
 
69
- - Fine-tuning LLMs to generate n8n workflows from natural language
70
- - Training models to understand workflow automation patterns
71
- - Building AI assistants for no-code/low-code automation
 
72
 
73
  ## Statistics
74
 
75
- | Metric | Value |
76
- |--------|-------|
77
- | Total Workflows | 2,737 |
78
- | Format | JSONL (Alpaca) |
79
- | File | train.jsonl |
80
 
81
  ## License
82
 
@@ -84,15 +177,15 @@ MIT License
84
 
85
  ## Acknowledgments
86
 
87
- This dataset is currently maintained by [n8nbuilder.dev](https://n8nbuilder.dev) — an AI-powered n8n workflow generation tool.
88
 
89
  ### Data Sources & Attribution
90
 
91
- - **Template Source**: All workflow templates in this dataset are sourced from [n8n's public template gallery](https://n8n.io/workflows). Template creators retain all rights to their workflows.
92
- - **Indexing**: Templates were indexed using [n8n-mcp](https://github.com/czlonkowski/n8n-mcp) by [@czlonkowski](https://github.com/czlonkowski).
93
- - **n8n**: [n8n](https://n8n.io) is the workflow automation platform that powers these templates.
94
 
95
- If you are a template creator and have concerns about your template being included, please [open an issue](https://huggingface.co/datasets/mbakgun/n8nbuilder-n8n-workflows-dataset/discussions).
96
 
97
  ## Citation
98
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - n8n
5
+ - workflow
6
+ - automation
7
+ - no-code
8
+ - low-code
9
+ - axolotl
10
+ - fine-tuning
11
+ - text-generation
12
  task_categories:
13
+ - text-generation
14
  language:
15
+ - en
 
 
 
 
 
 
 
 
16
  size_categories:
17
+ - 1K<n<10K
18
  ---
19
 
20
  # n8n Workflow Templates Dataset
21
 
22
+ A curated collection of n8n workflow automation templates formatted for LLM fine-tuning in multiple formats.
23
 
24
  ## Dataset Description
25
 
26
+ This dataset contains **2,737** n8n workflow templates from the official n8n template library, formatted in multiple formats for fine-tuning LLMs to generate n8n workflows.
27
+
28
+ ### Available Formats
29
+
30
+ 1. **Alpaca Format** (`train` split)
31
+ - Traditional instruction-input-output format
32
+ - Compatible with Axolotl and other Alpaca-based training frameworks
33
 
34
+ 2. **OpenAI Messages Format** (`train_openai` split)
35
+ - Chat-based format with role-based messages
36
+ - Compatible with OpenAI fine-tuning API and similar chat-based training
37
 
38
+ ### Data Fields
39
+
40
+ #### Alpaca Format
41
+ | Field | Description |
42
+ | ----------- | ----------------------------------------- |
43
+ | instruction | System prompt for n8n workflow generation |
44
+ | input | User's workflow requirements/description |
45
+ | output | Complete n8n workflow JSON |
46
+
47
+ #### OpenAI Messages Format
48
+ | Field | Description |
49
+ | -------- | ----------------------------------------- |
50
+ | messages | Array of message objects with role and content |
51
+
52
+ Each message object contains:
53
+ - `role`: "user" or "assistant"
54
+ - `content`: The message content (instruction or workflow JSON)
55
 
56
  ### System Prompt
57
 
 
61
 
62
  ## Dataset Structure
63
 
64
+ ### Alpaca Format Example
65
  ```json
66
  {
67
  "instruction": "You are an expert n8n workflow generation assistant...",
68
  "input": "Create a workflow that retrieves Google Analytics data...",
69
+ "output": "{"id": "...", "nodes": [...], "connections": {...}}"
70
+ }
71
+ ```
72
+
73
+ ### OpenAI Messages Format Example
74
+ ```json
75
+ {
76
+ "messages": [
77
+ {
78
+ "role": "user",
79
+ "content": "You are an expert n8n workflow generation assistant...\n\nCreate a workflow that retrieves Google Analytics data..."
80
+ },
81
+ {
82
+ "role": "assistant",
83
+ "content": "{"id": "...", "nodes": [...], "connections": {...}}"
84
+ }
85
+ ]
86
  }
87
  ```
88
 
89
  ## Loading the Dataset
90
 
91
+ ### Using Hugging Face Datasets
92
+
93
  ```python
94
  from datasets import load_dataset
95
 
96
+ # Load Alpaca format
97
+ alpaca_dataset = load_dataset("mbakgun/n8nbuilder-n8n-workflows-dataset", split="train")
98
+
99
+ # Load OpenAI format
100
+ openai_dataset = load_dataset("mbakgun/n8nbuilder-n8n-workflows-dataset", split="train_openai")
101
+
102
+ # Load both
103
+ full_dataset = load_dataset("mbakgun/n8nbuilder-n8n-workflows-dataset")
104
  ```
105
 
106
+ ### Using Hugging Face Hub
107
+
108
+ ```python
109
+ from huggingface_hub import hf_hub_download
110
+ import json
111
+
112
+ # Download Alpaca format
113
+ alpaca_file = hf_hub_download(
114
+ repo_id="mbakgun/n8nbuilder-n8n-workflows-dataset",
115
+ filename="train.jsonl",
116
+ repo_type="dataset"
117
+ )
118
+
119
+ # Download OpenAI format
120
+ openai_file = hf_hub_download(
121
+ repo_id="mbakgun/n8nbuilder-n8n-workflows-dataset",
122
+ filename="train_openai.jsonl",
123
+ repo_type="dataset"
124
+ )
125
+ ```
126
+
127
+ ## Fine-tuning
128
+
129
+ ### With Axolotl (Alpaca Format)
130
 
131
  ```yaml
132
  datasets:
133
  - path: mbakgun/n8nbuilder-n8n-workflows-dataset
134
  type: alpaca
135
+ split: train
136
+ ```
137
+
138
+ ### With OpenAI Fine-tuning API (OpenAI Format)
139
+
140
+ ```python
141
+ from openai import OpenAI
142
+
143
+ client = OpenAI()
144
+
145
+ # Prepare data from Hugging Face
146
+ dataset = load_dataset("mbakgun/n8nbuilder-n8n-workflows-dataset", split="train_openai")
147
+
148
+ # Convert to OpenAI format and upload
149
+ training_file = client.files.create(
150
+ file=open("training_data.jsonl", "rb"),
151
+ purpose="fine-tune"
152
+ )
153
  ```
154
 
155
+ ### With Other Frameworks
156
+
157
+ Both formats can be easily converted to other training formats as needed.
158
+
159
  ## Use Cases
160
 
161
+ * Fine-tuning LLMs to generate n8n workflows from natural language
162
+ * Training models to understand workflow automation patterns
163
+ * Building AI assistants for no-code/low-code automation
164
+ * Research on code generation and workflow automation
165
 
166
  ## Statistics
167
 
168
+ | Metric | Value |
169
+ | --------------- | -------------- |
170
+ | Total Workflows | 2,737 |
171
+ | Formats | 2 (Alpaca, OpenAI Messages) |
172
+ | Splits | train (Alpaca), train_openai (OpenAI) |
173
 
174
  ## License
175
 
 
177
 
178
  ## Acknowledgments
179
 
180
+ This dataset is currently maintained by n8nbuilder.dev — an AI-powered n8n workflow generation tool.
181
 
182
  ### Data Sources & Attribution
183
 
184
+ * **Template Source**: All workflow templates in this dataset are sourced from n8n's public template gallery. Template creators retain all rights to their workflows.
185
+ * **Indexing**: Templates were indexed using n8n-mcp by @czlonkowski.
186
+ * **n8n**: n8n is the workflow automation platform that powers these templates.
187
 
188
+ If you are a template creator and have concerns about your template being included, please open an issue.
189
 
190
  ## Citation
191