Haku Lab

Experiment

Resolving natural-language dates with a tiny specialist model

Large language models are surprisingly unreliable at dates — "next tuesday at 6pm," "end of the quarter," "in three weeks" quietly turn into the wrong day. So don't ask the model to do calendar arithmetic. A tiny (14M) specialist maps the phrase to a small structured grammar (e.g. wd next fri 15 00), and a few lines of ordinary code resolve that against the current time. The model only has to learn language → structure; the arithmetic is exact and deterministic.

Note. A compact, focused specialist (14M) — it handles relative offsets, weekdays, named days, and most everyday phrasings reliably. A few constructions still trip it (some spelled-out numbers, unusual idioms); it’s a prototype scoped to date resolution, not a general parser.

Or try one

next friday at 3pmtomorrow at 9amin 3 daysend of monththis saturday at noonin 45 minutesnext mondayin 2 weeks

you said  
model output  
resolved against  

Method

The model is a ~14M-parameter decoder that reads now=<ISO> | <phrase> and emits a compact grammar — relative offsets (off hr +2), weekdays (wd next fri), boundaries (bnd eom), named days (nm christmas), and so on. A deterministic resolver turns that grammar into an exact ISO datetime with the current time as reference. Keeping the arithmetic out of the network is the whole point: the model never has to count days or carry months, so a tiny specialist can be both fast and reliable at the part it is good at — understanding the phrase.

Get new experiments

Occasional notes when we publish. No spam.