Instructing large language models to identify and ignore irrelevant conditions improves accuracy in solving math word problems.