Command grammars require fixed phrasings: more reliable recognition, at a memory cost
Aliases: command-and-control · finite-state grammar · constrained decoding
What it is
A command-and-control grammar requires people to say a fixed phrasing or a small set of variants: “turn on the living-room lights,” “navigate to ….” Decoding is constrained to that grammar, so recognition is more reliable and slots are easier to extract. The cost is that people must learn and remember what can be said. Reliability comes from shrinking the hypothesis space, not from a bigger model.
Why it happens
A finite-state or context-free grammar folds legal utterances into a graph; acoustics only choose among words on that graph. With a small lexicon and few paths, substitutions stay among neighbouring commands, and intent error is usually lower than in open dictation. People have to map what they want onto this graph. A failed mapping is “I said it but it is not in the grammar”: the system either rejects, or snaps to the nearest legal sentence—which may execute the wrong command. Memory load grows with the grammar: ten utterances fit on a card, two hundred become a manual. Unlike a wake word, the constraint here is command content, not the entry condition.
Studying it
After teaching a set of patterns, measure recall (can they still produce a legal phrasing), execution success, and attempts that leave the grammar. Independent variables include grammar size, just-in-time prompts, and delay after training. Compare intent error on the same task with open NLU. Do not recruit only internal staff who already know the phrases.
Where it stops holding
Personalized commands whose lexicon grows with the user are still a grammar; the graph is just moving. A fully open chat assistant is not a command grammar. Emergency phrases must be short and fixed; safety swamps learning cost. Multilingual grammars require a remembered set per language, doubling the load.
Applying it
- Put high-frequency, high-cost actions on short fixed phrasings and teach them with an example on first use, not buried in help.
- Cap the number of grammar entries; beyond that, layer or switch to free expression rather than a secret list.
- On reject, echo a legal example rather than staying silent or executing a nearest neighbour.
Related
- Same group: C7.14.2 Free expression lets people describe intent in natural language, at a large rise in parse ambiguity · C7.14.3 When only a command grammar is supported and the phrasings are unstated, people trial-and-error · C7.14.4 Command grammar and free expression can coexist in layers
- Adjacent: C7.03 Types of Recognition Errors · C7.13 Voice Editing and Spoken Correction
- Search:
command grammar·command-and-control·constrained decoding