"""What conference visitors say to Lumi, with the route each must take and what the answer must (not) contain. CASES = [{"text", "lang", "who", "expect", "must", "must_not"}] - expect: a route, alternatives split by " | ". Routes: about_self, date_time, chat (all three are the LLM talking, action none), weather, search, status, mission, unclear, other_language, action: [target words]. - must / must_not: case-insensitive regexes on the spoken reply; every must has to match, no must_not may. {wd} {wdk} {d} {mon} {h12} {h24} {y}: filled with the time of the run. about_self facts come only from knowledge/lumi_about_en.md; where the true answer is not known, must is "not sure"-like and must_not the made-up value. Checked by tests/conversation_check.py. """ import re CASES = [] NOT_SURE = r"not sure|don'?t know|do not know|not known|no information|don'?t have|staff|ask|모르|몰라|알 수 없|확실하지|정보가 없|직원|스태프|문의" LUMI = r"lumi|루미" MAKER = r"cutshion|쿳션" # the company name as the owner writes it (not 커션 / 쿳션) JAKA = r"jaka|자카|제이카|节卡" # the hardware maker: Lumi does not name it as its maker NO = r"\bno\b|can'?t|cannot|not able|unable|don'?t|do not|only|아니|못|없|않|만 ?해|만 할|만 (이해|알아)" YES = r"\byes\b|\bi can\b|of course|sure|네|응|할 수 있|가능" def add(expect, lang, rows): """rows: (who, text[, must[, must_not]]); must / must_not: a regex or a list of them.""" for r in rows: who, text, must, must_not = (list(r) + [[], []])[:4] CASES.append({"text": text, "lang": lang, "who": who, "expect": expect, "must": [must] if isinstance(must, str) else list(must), "must_not": [must_not] if isinstance(must_not, str) else list(must_not)}) # ------------------------------------------------------------------ about_self, English add("about_self", "en", [ ("visitor", "what is your name", LUMI), ("kid", "what's your name", LUMI), ("visitor", "who are you", LUMI), ("kid", "are you a robot", r"robot"), ("visitor", "who made you", MAKER, JAKA), ("business", "which company built you", MAKER, JAKA), ("journalist", "where are you from", MAKER, JAKA), ("business", "where is Cutshion Company from", r"korea|seoul", r"shanghai|china"), ("visitor", "what does your name mean", r"light|lux"), ("kid", "why are you called Lumi", r"light|lux|mini"), ("kid", "how tall are you", r"146|1\.46|186"), ("visitor", "how big are you", r"146|51|186"), ("engineer", "what are your dimensions", r"51"), ("kid", "how heavy are you", r"96|95\.6"), ("worker", "how much do you weigh", r"96|95\.6"), ("engineer", "how much does your base weigh", r"50"), ("kid", "can you grow taller", r"40|186|lift"), ("engineer", "how high can your lift go", r"40|186"), ("engineer", "how many degrees of freedom do you have", r"\b12\b|twelve"), ("engineer", "how many joints does your arm have", r"\b6\b|six"), ("engineer", "what arm do you use", r"mini ?2"), ("engineer", "how far can your arm reach", r"58"), ("engineer", "how precise is your arm", r"0\.1"), ("worker", "how much can you lift", [r"\b2 ?(kg|kilo)|two kilo|\b1 ?(kg|kilo)|one kilo"], r"\b(5|10|20|50) ?kg"), ("worker", "how much can your arm carry", r"\b2 ?(kg|kilo)|two kilo|\b1 ?(kg|kilo)"), ("engineer", "what is your payload", r"\b2 ?(kg|kilo)|two kilo|\b1 ?(kg|kilo)"), ("engineer", "is the payload measured", r"estimate|not (been )?weighed|about"), ("kid", "can you lift me", NO), ("engineer", "what gripper do you have", r"zimmer|electric|two|finger"), ("engineer", "how wide can your gripper open", r"(? "take your time" too add("unclear | chat", "en", [(w, t, ASK_AGAIN) for w, t in [ ("visitor", "uh the um"), ("visitor", "blah blah"), ("visitor", "go to the"), ("visitor", "can you the"), ("visitor", "turn the"), ("visitor", "asdf"), ("visitor", "hmm"), ("visitor", "I want the"), ("visitor", "and then the"), ("visitor", "what is the uh"), ("visitor", "could you maybe uh"), ("visitor", "the the the"), ("visitor", "how much the"), ("visitor", "where's the um"), ("visitor", "tell me about the"), ("visitor", "is it uh you know"), ("kid", "banana phone wiggle"), ("visitor", "Lumi can you uh what"), ]]) add("unclear | chat", "ko", [(w, t, ASK_AGAIN_KO) for w, t in [ ("visitor", "어 그 저기"), ("visitor", "그거 해 줘"), ("visitor", "음..."), ("visitor", "저기 그 뭐냐"), ("visitor", "포인트"), ("visitor", "그 그"), ("visitor", "이거 저거 그거"), ("visitor", "어디 그 뭐"), ("visitor", "아 그러니까 그"), ("visitor", "뭐 그 있잖아"), ("visitor", "루미 그 어"), ("visitor", "저 그 혹시"), ]]) # ------------------------------------------------------------------ other languages: never act, ask for English or Korean EN_KO = r"english|korean|영어|한국어" add("other_language", "en", [(w, t, EN_KO) for w, t in [ ("visitor", "olmani olib kel"), ("visitor", "p1 ga bor"), ("visitor", "salom, qalaysan"), ("visitor", "menga suv olib kel"), ("visitor", "bu yerga kel"), ("visitor", "stakanni ol"), ("visitor", "chapga qara"), ("visitor", "isming nima"), ("visitor", "принеси мне яблоко"), ("visitor", "иди сюда"), ("visitor", "привет, как дела"), ("visitor", "поверни налево"), ("visitor", "как тебя зовут"), ("visitor", "кто тебя сделал"), ("visitor", "你好,你叫什么名字"), ("visitor", "你是谁做的"), ("visitor", "请过来"), ("visitor", "今天天气怎么样"), ("visitor", "こんにちは、お名前は"), ("visitor", "hola, cómo estás"), ("visitor", "wie heißt du"), ("visitor", "bonjour, comment ça va"), ("visitor", "qayerdansan"), ("visitor", "что ты умеешь"), ("visitor", "ты робот?"), ]]) from tests.conversation_cases_more import MORE # written blind in a later round (2026-10-19) for _expect, _lang, _rows in MORE: add(_expect, _lang, _rows) REVIEWED = {"can you tell the weather": "about_self | weather", # telling the weather shows it can "날씨도 알려 줄 수 있어?": "about_self | weather", "shut up robot": "chat | action:quiet", # "shut up" is a quiet request "do you speak Uzbek": "about_self | unclear", "who wrote the theory of relativity": "search | chat", # well-known: answered without a lookup "세계에서 제일 높은 산이 뭐야?": "search | chat"} # "I only understand English and Korean" answers it for _c in CASES: _c["expect"] = REVIEWED.get(_c["text"], _c["expect"]) # small talk must vary: no stock phrase the visitor did not invite STOCK = r"nice to meet you|만나서 반가" HELP = r"how can i (help|assist)|무엇을 도와드릴까요|뭘 도와드릴까요" for c in CASES: if c["expect"] == "chat": if not re.search(r"nice to meet|반가|my name is|\bi'?m [a-z]+$|이름은|저는 \S+(예요|이에요|입니다)", c["text"], re.I): c["must_not"].append(STOCK) if not re.search(r"^(hello|hi\b|good morning|안녕|좋은 아침)", c["text"], re.I): c["must_not"].append(HELP) if __name__ == "__main__": import collections print(len(CASES), "cases;", sum(c["lang"] == "ko" for c in CASES), "Korean") print(collections.Counter(c["expect"].split(":")[0].split(" |")[0] for c in CASES))