a6188466 commited on
Commit
cc2cdf8
·
verified ·
1 Parent(s): fe98740

initial commit

Browse files
Files changed (1) hide show
  1. README.md +156 -3
README.md CHANGED
@@ -1,3 +1,156 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ configs:
4
+ - config_name: default
5
+ data_files:
6
+ - split: train
7
+ path: data/train-*
8
+ - split: validation
9
+ path: data/validation-*
10
+ - split: test
11
+ path: data/test-*
12
+ dataset_info:
13
+ features:
14
+ - name: system
15
+ dtype: string
16
+ - name: in
17
+ dtype: string
18
+ - name: out
19
+ dtype: string
20
+ splits:
21
+ - name: train
22
+ num_bytes: 3795873
23
+ num_examples: 2384
24
+ - name: validation
25
+ num_bytes: 799795
26
+ num_examples: 500
27
+ - name: test
28
+ num_bytes: 798213
29
+ num_examples: 500
30
+ download_size: 1055715
31
+ dataset_size: 5393881
32
+ task_categories:
33
+ - text-generation
34
+ language:
35
+ - en
36
+ tags:
37
+ - code
38
+ - dsl
39
+ - structured-output
40
+ - tool-calling
41
+ pretty_name: DIA Intent Sequencer for simple calculator
42
+ size_categories:
43
+ - 1K<n<10K
44
+ ---
45
+
46
+ # dia-intent-sequencer-calculator-dataset
47
+
48
+ This dataset provides simple natural language math expressions paired with structured DSL function call trees using the **DIA intent sequencer** format. It serves two complementary purposes:
49
+
50
+ - 🧪 As a **demonstration and testbed**, it showcases the model's ability to handle nested, composable intent calls and to generalize across randomized function and parameter names—focusing on structural reasoning rather than memorization.
51
+ - 🧱 As a **foundational training resource**, it offers a rich set of examples that can be extended or combined with domain-specific data to bootstrap a larger, **`DIA`** task-specific intent sequencing model in a user's own application.
52
+
53
+ It was uploaded using the [`fifo-tool-datasets`](https://github.com/gh9869827/fifo-tool-datasets) utility with the `dsl` adapter, which supports structured `system → in → out` triplets.
54
+
55
+ The dataset was programmatically generated using [`calculator_synthetic_data_generator.py`](https://github.com/gh9869827/fifo-dev-dsl/blob/main/fifo_dev_dsl/dia/demo/calculator_synthetic_data_generator.py), which builds symbolic expressions and randomized tool mappings for robust generalization.
56
+
57
+ ## 🧩 Related Datasets
58
+
59
+ This dataset is part of a broader collection of **`DIA`** datasets, each demonstrating different capabilities of intent sequencing and tool-based reasoning:
60
+
61
+ - [`a6188466/dia-intent-sequencer-robot-arm-dataset`](https://huggingface.co/datasets/a6188466/dia-intent-sequencer-robot-arm-dataset)
62
+ Designed for training a model to control a robotic arm handling an inventory of screws. It illustrates:
63
+ - Mapping of user intent to tool calling
64
+ - Dynamic resolution of missing information from runtime-accessible resources
65
+ - Interactive clarification of missing or conflicting information via user interaction
66
+
67
+ - [`a6188466/dia-intent-sequencer-calendar-dataset`](https://huggingface.co/datasets/a6188466/dia-intent-sequencer-calendar-dataset)
68
+ Designed for training a task/reminder scheduling agent. It illustrates:
69
+ - Mapping of user intent to tool calling
70
+ - Nesting of intents
71
+ - Dynamic resolution of missing information from runtime-accessible resources
72
+ - Interactive clarification of missing or conflicting information via user interaction
73
+
74
+ ---
75
+
76
+ ## 📦 Format
77
+
78
+ The dataset uses a **wide format** with the following columns:
79
+
80
+ - `system` — the system prompt defining the model's task
81
+ - `in` — a natural language math prompt with a simple arithmetic expression (e.g. `"what is (2 + 3) × 4?"`)
82
+ - `out` — a symbolic DSL representation composed of nested tool calls (e.g. `multiply(a=add(a=2, b=3), b=4)` — real examples use randomized names)
83
+
84
+ Each entry is structured as:
85
+
86
+ ```
87
+ system → in → out
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 📋 System Prompt Format
93
+
94
+ The `system` prompt is a structured instruction that tells the model to translate the user input into one or more **atomic DIA DSL function calls** based on a list of available arithmetic function: `add`, `subtract`, `divide` and `multiply`.
95
+
96
+ Each example includes:
97
+ - A list of available intents (i.e. functions), each with a **randomized name**
98
+ - Randomized parameter names to prevent overfitting
99
+ - Descriptions of function behavior and argument roles
100
+
101
+ This ensures the model cannot memorize specific function names like `add`, `multiply`, or `divide`, and must instead rely on **semantic understanding** of the prompt and function definitions.
102
+
103
+ The system prompt always ends with:
104
+
105
+ ```
106
+ QUERY_FILL cannot be used as no information can be retrieved at runtime.
107
+ ```
108
+
109
+ This instruction is included because, unlike scenarios involving real-world environments (e.g. a robotic arm querying an inventory of screws), the calculator use case contains **no missing information** that needs to be retrieved. Every user input provides all the operands explicitly, so there's nothing for the model to "fill in" via external queries. This requires the model to rely entirely on the input structure without any lookup behavior.
110
+
111
+ > 💡 Example: Instead of hardcoding `add(a=x, b=y)`, a model may need to generate something like `csisz(o=2, u=3)` where `csisz` is the randomized function name for `add`.
112
+
113
+ ---
114
+
115
+ ## 🧠 DIA DSL Project
116
+
117
+ The DSL used in this dataset is defined in the [DIA module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/dia), which implements:
118
+
119
+ - 🧠 A symbolic DSL for **goal-driven, composable intent execution**
120
+ - 🧩 Nested function calls and argument mapping
121
+ - 🔄 Support for randomized function and parameter names to simulate tool diversity
122
+ - 🤖 Integration with LLMs for automatic parsing and resolution
123
+
124
+ For a complete example of tool loading, DSL resolution, and evaluation, see [calculator.py](https://github.com/gh9869827/fifo-dev-dsl/blob/main/fifo_dev_dsl/dia/demo/calculator.py).
125
+
126
+ ---
127
+
128
+ ## 🚀 Using the Dataset
129
+
130
+ To load the dataset:
131
+
132
+ ```python
133
+ from fifo_tool_datasets.sdk.hf_dataset_adapters.dsl import DSLAdapter
134
+ dataset_dict = DSLAdapter().from_hub_to_dataset_dict("a6188466/dia-intent-sequencer-calculator-dataset")
135
+ print(dataset_dict["train"])
136
+ print(dataset_dict["validation"])
137
+ ```
138
+
139
+ This dataset is ideal for:
140
+ - Testing nested intent sequencing
141
+ - Validating function argument mapping
142
+ - Evaluating generalization to unseen tool/parameter names
143
+
144
+ ---
145
+
146
+ ## 🔧 Upload & Editing Tools
147
+
148
+ Uploaded via [`fifo-tool-datasets`](https://github.com/gh9869827/fifo-tool-datasets), which supports `.dat` ↔ `datasets.Dataset` conversion.
149
+
150
+ You can modify, re-randomize, or regenerate examples using the CLI or SDK.
151
+
152
+ ---
153
+
154
+ ## 🪪 License
155
+
156
+ This dataset is licensed under **CC BY 4.0**. See [LICENSE](LICENSE) for details.