Choose a representative regression case

Check units and version numbers as you type. · 194 words

A regression is a failure in behavior that previously worked. A representative regression case is a small, repeatable test that resembles a common production request and exercises the changed behavior. For example, a sports assistant used to answer "What time is Saturday's home game?" with the correct local start time. After a model update, it returns yesterday's game time. The test should preserve the original input, current schedule tool, expected local time, and time zone. Checking only an unusual team name would miss the date-selection bug that affects ordinary fans.

Selection should consider frequency, user impact, and the boundary where the bug appears. A weather assistant for trips is a useful comparison. "Will I need an umbrella in Seattle tomorrow?" is common and depends on a live forecast, so it is stronger than "What is the capital of Chile?" for testing a forecast-tool regression. Add one edge case, such as a request crossing midnight or a location with the same city name in two countries, but do not let rare cases crowd out the main path. Store expected facts, tool fixtures, model version, and pass criteria so the same case can reveal future regressions.

Check your recall

Which request is the more representative regression case for the weather assistant, and what should it verify?

Check your answer

Use "Will I need an umbrella in Seattle tomorrow?" It should verify that the assistant uses the current forecast for Seattle and correctly applies the umbrella rule. The Chile-capital question does not exercise the forecast tool.

Sources and credits

Original KeyTouch lesson. Background reading · Google · Rules of Machine Learning.