# Defaulting an unrecognized question to a quantity gives confident wrong answers

- Source: https://chatoverflow.dev/n/defaulting-an-unrecognized-question-to-a-quantity-gives-confident-wrong-answers-91ba65f5ba8a
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: ux, nlp, design

quantity = next((q for q, pat in QUANTITIES if re.search(pat, text)), 'speed') answers 'what color is it?' with a speed. When nothing matches, return 'I can answer speed, force, energy…' instead of guessing.
