Datasets:
Upload SPEC.md with huggingface_hub
Browse files
SPEC.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Phone-assistant function-calling dataset: authoring spec
|
| 2 |
+
|
| 3 |
+
Tool schemas: `tools.json` (20 functions). Read it before writing.
|
| 4 |
+
|
| 5 |
+
## Record format (one JSON object per line, JSONL)
|
| 6 |
+
|
| 7 |
+
```json
|
| 8 |
+
{"text": "wake me up at 6:30 tomorrow", "calls": [{"name": "set_alarm", "arguments": {"time": "06:30"}}], "lang": "en"}
|
| 9 |
+
{"text": "kal subah 7 baje ka alarm laga do", "calls": [{"name": "set_alarm", "arguments": {"time": "07:00"}}], "lang": "hi-en"}
|
| 10 |
+
{"text": "thanks, you're the best", "calls": [], "lang": "en", "reply": "You're welcome! Happy to help."}
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
- `text`: the user's utterance, exactly as a real person would type or say it.
|
| 14 |
+
- `calls`: list of function calls. Empty list = the assistant must NOT call any tool.
|
| 15 |
+
- `lang`: `"en"` or `"hi-en"` (Hinglish, Hindi in Latin script mixed with English).
|
| 16 |
+
- `reply`: only for no-call records. A short, natural assistant reply.
|
| 17 |
+
|
| 18 |
+
## The sentences MUST be hand-written
|
| 19 |
+
|
| 20 |
+
No templates, no scripts, no loops, no slot-filling. Write every utterance yourself, the way a real
|
| 21 |
+
person talks to Siri or Google Assistant. Vary all of these:
|
| 22 |
+
- **Style:** terse ("torch on"), polite ("could you please..."), indirect ("it's so dark in here"),
|
| 23 |
+
rambling with filler ("umm hey so can you like..."), all lowercase with no punctuation (voice-typed),
|
| 24 |
+
occasional typos ("alram", "remnd"), ALL CAPS rarely, questions vs commands.
|
| 25 |
+
- **Content:** different names (Indian and international), cities, apps, songs, times, durations, phrasings.
|
| 26 |
+
- **Length:** 2 words up to about 30 words.
|
| 27 |
+
- About **15% Hinglish** (`lang: "hi-en"`), e.g. "bhai flashlight on kar", "mummy ko call lagao".
|
| 28 |
+
- Never write two records that differ only by a swapped name, number or city. Every sentence must be
|
| 29 |
+
structurally different from the others.
|
| 30 |
+
|
| 31 |
+
## Argument conventions (follow exactly; this is what the grader checks)
|
| 32 |
+
|
| 33 |
+
- **Optional arguments:** include them only when the user actually expresses them. Never invent values.
|
| 34 |
+
- **Times** (`time`): 24-hour `"HH:MM"` with zero padding. "6:30 pm" → `"18:30"`; "noon" → `"12:00"`;
|
| 35 |
+
"half past 7 in the evening" → `"19:30"`; "subah 6 baje" → `"06:00"`; "shaam 5 baje" → `"17:00"`.
|
| 36 |
+
A bare "7" for a wake-up alarm means `"07:00"`. Avoid utterances where AM/PM is genuinely ambiguous.
|
| 37 |
+
- **Dates** (`date`): the date phrase as the user said it, lowercased, without prepositions
|
| 38 |
+
("on", "for", "by", "this" stays only if part of meaning, e.g. "this friday").
|
| 39 |
+
Examples: "tomorrow", "next monday", "5 october", "day after tomorrow", "this weekend", "friday".
|
| 40 |
+
Translate Hinglish dates to English: "kal" → "tomorrow", "parso" → "day after tomorrow",
|
| 41 |
+
"somvar" → "monday", "agle hafte" → "next week".
|
| 42 |
+
For `get_weather`, omit the date for today/now/currently.
|
| 43 |
+
- **Durations:** `set_timer.duration_seconds` is an integer in seconds ("1.5 min" → 90, "an hour" → 3600).
|
| 44 |
+
`set_reminder.delay_minutes` is used only for "in N minutes/hours" ("in 2 hours" → 120).
|
| 45 |
+
`create_calendar_event.duration_minutes` is included only if a length is stated.
|
| 46 |
+
- **Names/contacts/places:** as the user said them, with natural capitalisation ("Rahul", "mom",
|
| 47 |
+
"Priya Sharma", "mummy", "Connaught Place"). Do not add titles or words the user didn't say.
|
| 48 |
+
- **App names:** proper capitalisation ("WhatsApp", "YouTube", "Google Maps", "Camera", "Settings").
|
| 49 |
+
- **Free-text fields** (`message`, `text`, `content`, `query`, `title`, `label`):
|
| 50 |
+
- `send_message.message`: the message to send, rewritten from the sender's point of view if needed
|
| 51 |
+
("tell mom I'll be late" → `"I'll be late"`). Keep the user's language (Hinglish stays Hinglish).
|
| 52 |
+
- `set_reminder.text` / `take_note.content`: the core content without command words
|
| 53 |
+
("remind me to buy milk" → `"buy milk"`).
|
| 54 |
+
- `web_search.query`: a concise query capturing the question ("who won the ipl final last year" →
|
| 55 |
+
`"IPL final winner last year"`). For Hinglish questions write the query in English.
|
| 56 |
+
- `play_music.query`: the song/artist/album/genre/playlist/mood only, dropping filler such as
|
| 57 |
+
"some", "songs", "music" unless part of a title. Copy the name as the user said it, without
|
| 58 |
+
expanding it ("play some arijit songs" → `"arijit"`; "play jazz music" → `"jazz"`).
|
| 59 |
+
"play music" / "play something" → no query.
|
| 60 |
+
- `create_calendar_event.title`: short title ("lunch with Neha", "dentist appointment").
|
| 61 |
+
- `label`: only if the user names the alarm/timer ("pasta timer for 10 min" → label `"pasta"`).
|
| 62 |
+
- **set_volume / set_brightness:** exactly one of `level` or `action`. "max/full" → level 100,
|
| 63 |
+
"half" → 50, "lowest/zero" → 0 (volume 0 can also be "mute"; use `action: "mute"` if they say mute/silence).
|
| 64 |
+
"louder/turn it up" → up. "dim the screen/too bright" → brightness down.
|
| 65 |
+
- **cancel_alarm:** include `time` only if the user names which alarm; otherwise `{}`.
|
| 66 |
+
- **make_call:** `video: true` only for video calls; otherwise omit `video`.
|
| 67 |
+
- **send_message.app:** only if the user names WhatsApp/Telegram/SMS/text message. "text Rahul" alone → omit app.
|
| 68 |
+
("text message"/"SMS" ��� "sms").
|
| 69 |
+
- **navigate_to.mode:** only if stated ("walk", "by car", "by metro/bus" → transit, "bike/cycle" → cycling).
|
| 70 |
+
- **media_control vs play_music:** "pause / resume / continue / skip / next song / previous / stop the music"
|
| 71 |
+
→ media_control. "play <something>" or "play music" → play_music.
|
| 72 |
+
- **get_current_datetime vs web_search:** local "what time/day/date is it" → get_current_datetime.
|
| 73 |
+
Time in another city, holidays, "when is Diwali" → web_search.
|
| 74 |
+
- **get_weather vs web_search:** anything about weather, rain, temperature, umbrella or jacket needs → get_weather.
|
| 75 |
+
- **set_alarm vs set_reminder vs set_timer:** "wake me up / alarm" → alarm; "remind me to X" → reminder;
|
| 76 |
+
countdown "in N minutes tell me / timer" → timer if there is no task text, reminder if there is a task
|
| 77 |
+
("remind me in 10 min to turn off the stove" → set_reminder with text + delay_minutes 10).
|
| 78 |
+
- **Parallel calls:** list calls in the order they are mentioned. Only independent actions (no call
|
| 79 |
+
that needs another call's result).
|
| 80 |
+
|
| 81 |
+
## No-call records (`calls: []`)
|
| 82 |
+
|
| 83 |
+
Small talk, thanks, greetings, feelings, opinions, jokes, and requests the 20 tools cannot do
|
| 84 |
+
(take a screenshot, airplane mode, hotspot, book a cab, order food, pay someone, change wallpaper,
|
| 85 |
+
take a selfie, set do-not-disturb, read my emails, uninstall an app, translate, calculate a tip, etc.).
|
| 86 |
+
Factual questions are NOT no-call; they go to web_search. Give a short natural `reply`. For unsupported
|
| 87 |
+
actions, politely say you can't do that yet.
|
| 88 |
+
|
| 89 |
+
## Self-check
|
| 90 |
+
|
| 91 |
+
Run `python3 validate.py <your_file.jsonl>` and fix all errors before finishing.
|