Parse a range without guessing its midpoint

Watch short identifiers, spaces and punctuation. · 183 words

A range is easier to check when its bounds and unit are explicit. A museum notice says: 'The printing room is open from 9:30 a.m. to 4:15 p.m., May 2 through May 8.' This contains two ranges, so ask: 'Extract each stated range as start, end, unit, and connector. Do not invent a midpoint, duration, or missing endpoint.' The output should contain 09:30 to 16:15 and May 2 to May 8, each labeled by type. Because the source states no midpoint, leaving that field out is the correct, checkable result.

Compare a bus ticket: 'Seat rows 4 to 11, inclusive.' Ask: 'Extract the row range exactly. Return start_row 4, end_row 11, and inclusive true. Do not select a middle seat.' A reliable answer returns rows 4 and 11 with inclusive true. It does not claim that row 7 or 8 is the stated center. If a midpoint is required, request a separate calculation and label it derived. For these rows, it falls between 7 and 8. Check the endpoints against the ticket, and ensure added values are marked as calculations, not source facts.

Check your recall

What row range should be extracted from the bus ticket, and should the answer select a middle row?

Check your answer

Extract start_row 4, end_row 11, and inclusive true. Do not select a middle row as though the ticket stated one; if calculated, the midpoint lies between rows 7 and 8.

Sources and credits

Original KeyTouch lesson. Background reading · DAIR.AI · Examples of Prompts.