From 8b360f5bc87f0ae58630aad6e9f542eafb7e0d7d Mon Sep 17 00:00:00 2001 From: Manmohan Sharma Date: Wed, 22 Apr 2026 16:10:59 -0700 Subject: [PATCH] fix: veto matches shorthand 'u' and 'r' for you/are --- modal/_query_classifier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modal/_query_classifier.py b/modal/_query_classifier.py index 555ecd76..e5ea5923 100644 --- a/modal/_query_classifier.py +++ b/modal/_query_classifier.py @@ -94,9 +94,9 @@ _CATEGORY_REGEXES = [re.compile(p, re.IGNORECASE) for p in _CATEGORY_PATTERNS] # --------------------------------------------------------------------------- _IDENTITY_VETO_PATTERNS = [ # self-referential questions directed at the model - r"\bwho\s+are\s+you\b", - r"\bwhat\s+are\s+you\b", - r"\bwho\s+are\s+you\s+really\b", + r"\bwho\s+(?:r|ru|are)\s+(?:u|you)\b", + r"\bwhat\s+(?:r|ru|are)\s+(?:u|you)\b", + r"\bwho\s+(?:r|ru|are)\s+(?:u|you)\s+really\b", r"\bwhat(?:'|\s+i)s\s+your\s+name\b", r"\bintroduce\s+yourself\b", r"\btell\s+me\s+about\s+(?:yourself|you|you\s+first)\b",