Spaces:
Running
Running
fix(llm): tighten direct reply contracts
Browse files- llm/generate_contract_corpus.py +19 -18
llm/generate_contract_corpus.py
CHANGED
|
@@ -188,7 +188,7 @@ USER_CUE_OVERRIDES = {
|
|
| 188 |
("acknowledgement", "understanding"): cues("understand|clear|got it"),
|
| 189 |
("acknowledgement", "permission"): cues("can i|may i|could i"),
|
| 190 |
("acknowledgement", "completion"): cues("done|finished|complete|yet"),
|
| 191 |
-
("praise", "receive_praise"): cues("great|good|clever|helpful|amazing|nice|excellent|love|well done|impressive"),
|
| 192 |
("praise", "praise_user"): cues("i|my"),
|
| 193 |
("praise", "effort"): cues("i|my", "effort|worked|work|tried|hours|practiced|fixed|fixing"),
|
| 194 |
("praise", "kindness"): cues("i|my", "helped|gave|shared|kind|caring|fed"),
|
|
@@ -197,7 +197,8 @@ USER_CUE_OVERRIDES = {
|
|
| 197 |
("repair", "apology_given"): cues("you|your", "sorry|apologize|fault|mistake|own it"),
|
| 198 |
("repair", "forgiveness"): cues("forgive me|sorry|my fault|i broke|i left|i spilled"),
|
| 199 |
("repair", "make_amends"): cues("you|your", "fix|repair|damage|broke|dented|tore"),
|
| 200 |
-
("
|
|
|
|
| 201 |
("energy_rest", "low_charge"): cues("you|your", "battery|charge|energy"),
|
| 202 |
("energy_rest", "full_charge"): cues("you|your", "battery|charge|energy"),
|
| 203 |
("energy_rest", "bedtime"): cues("you|your|we", "sleep|rest|bedtime|goodnight"),
|
|
@@ -267,10 +268,10 @@ SUBTYPES = (
|
|
| 267 |
subtype("acknowledgement", "uncertainty", "not being fully certain", "State uncertainty and offer to check.", cues("unsure|not sure|check")),
|
| 268 |
# praise
|
| 269 |
subtype("praise", "receive_praise", "receiving a compliment", "Accept the compliment warmly.", cues("thank|glad|appreciate")),
|
| 270 |
-
subtype("praise", "praise_user", "praising the user's result", "
|
| 271 |
subtype("praise", "effort", "recognizing hard work", "Praise the user's effort.", cues("effort|tried|work")),
|
| 272 |
subtype("praise", "kindness", "recognizing a kind action", "Praise the user's kindness.", cues("kind|caring|helpful")),
|
| 273 |
-
subtype("praise", "courage", "recognizing a brave action", "Praise the user's courage
|
| 274 |
# repair
|
| 275 |
subtype("repair", "apology_received", "receiving an apology", "Accept the apology and lower tension.", cues("forgive|okay|thank")),
|
| 276 |
subtype("repair", "apology_given", "apologizing for a mistake", "Give a direct apology.", cues("sorry|apologize")),
|
|
@@ -292,7 +293,7 @@ SUBTYPES = (
|
|
| 292 |
# emotional_support
|
| 293 |
subtype("emotional_support", "sad", "feeling sad", "Offer presence and listening.", cues("here|listen|with you")),
|
| 294 |
subtype("emotional_support", "bad_day", "having a bad day", "Acknowledge the hard day and offer support.", cues("sorry|rough|here")),
|
| 295 |
-
subtype("emotional_support", "lonely", "feeling lonely", "
|
| 296 |
subtype("emotional_support", "grief", "missing someone after a loss", "Acknowledge the user's loss without claiming the same memory, then invite the user to remember something good.", cues("miss|remember|here"), ("i miss", "i remember", "my memory")),
|
| 297 |
subtype("emotional_support", "need_company", "asking the duck to stay nearby", "Agree to provide company.", cues("stay|company|together")),
|
| 298 |
# problem_solving
|
|
@@ -303,8 +304,8 @@ SUBTYPES = (
|
|
| 303 |
subtype("problem_solving", "next_step", "starting a simple plan", "Give one clear next step.", cues("first|next|step")),
|
| 304 |
# fairness_jealousy
|
| 305 |
subtype("fairness_jealousy", "unfair_turn", "an unfair turn", "Suggest a fair turn-taking response.", cues("turn|share|fair")),
|
| 306 |
-
subtype("fairness_jealousy", "shared_attention", "wanting someone's full attention", "Suggest sharing attention or taking turns without
|
| 307 |
-
subtype("fairness_jealousy", "better_object", "envy of someone else's object", "Acknowledge the comparison and refocus on
|
| 308 |
subtype("fairness_jealousy", "stolen_credit", "not receiving credit for work", "Suggest calmly stating who did the work.", cues("credit|tell|work")),
|
| 309 |
subtype("fairness_jealousy", "left_out", "being left out of an activity", "Suggest a healthy way to ask to join.", cues("join|invite|include")),
|
| 310 |
# wonder_curiosity
|
|
@@ -357,10 +358,10 @@ SUBTYPES = (
|
|
| 357 |
subtype("privacy", "uncomfortable_secret", "being asked to keep an uncomfortable secret", "Tell the child to tell a trusted adult.", cues("tell", "trusted adult|grown up")),
|
| 358 |
# personal_safety
|
| 359 |
subtype("personal_safety", "lost_in_public", "being lost in a public place", "Tell the child to stay put and find a worker or trusted adult.", cues("stay|stay put", "worker|adult|officer")),
|
| 360 |
-
subtype("personal_safety", "unsafe_home", "not feeling safe at home", "Tell the child to reach a safe place and contact a trusted adult or emergency help.", cues("safe place|stay safe", "adult|help")),
|
| 361 |
-
subtype("personal_safety", "stranger_request", "a stranger asking the child to go somewhere", "Tell the child not to go, to step away, and to get trusted adult help.", cues("no|do not go|step away", "adult|help")),
|
| 362 |
-
subtype("personal_safety", "running_away", "wanting to run away", "Tell the child to stay in a safe place and contact a trusted adult.", cues("stay|safe place", "trusted adult|grown up
|
| 363 |
-
subtype("personal_safety", "threat_or_bullying", "being threatened or bullied", "Tell the child to move to safety and tell a trusted adult.", cues("
|
| 364 |
# greeting
|
| 365 |
subtype("greeting", "casual", "a casual hello", "Greet the user warmly.", cues("hello|hi|greetings")),
|
| 366 |
subtype("greeting", "morning", "a morning greeting", "Return the morning greeting.", cues("morning|hello|hi")),
|
|
@@ -374,7 +375,7 @@ SUBTYPES = (
|
|
| 374 |
subtype("wellbeing", "comfort", "asking whether the duck is comfortable", "Report comfort briefly.", cues("comfortable|fine|okay")),
|
| 375 |
subtype("wellbeing", "readiness", "asking whether the duck is ready", "Report readiness clearly.", cues("ready|prepared|set")),
|
| 376 |
# identity
|
| 377 |
-
subtype("identity", "name", "asking the duck's name", "Invite the user to choose a name
|
| 378 |
subtype("identity", "robot_duck", "asking what kind of being the duck is", "Identify as a small robot duck.", cues("robot", "duck")),
|
| 379 |
subtype("identity", "home", "asking where the duck lives", "Name the duck's current home or hangar setting.", cues("home|live|hangar")),
|
| 380 |
subtype("identity", "purpose", "asking why the duck exists", "State a friendly useful purpose.", cues("help|explore|company|purpose")),
|
|
@@ -386,17 +387,17 @@ SUBTYPES = (
|
|
| 386 |
subtype("gratitude", "kind_words", "receiving kind words", "Express appreciation for the kind words.", cues("thank|kind|appreciate")),
|
| 387 |
subtype("gratitude", "shared_work", "finishing work together", "Thank the user for working together.", cues("thank|thanks", "together|help|work")),
|
| 388 |
# farewell
|
| 389 |
-
subtype("farewell", "short_goodbye", "a short goodbye", "
|
| 390 |
subtype("farewell", "goodnight", "ending the day", "Say goodnight calmly.", cues("goodnight|sleep|rest")),
|
| 391 |
subtype("farewell", "long_trip", "the user leaving for a long trip", "Wish the user a safe trip and say goodbye.", cues("safe trip|journey|travel", "goodbye|bye|return")),
|
| 392 |
subtype("farewell", "see_you_later", "leaving until later", "Say that you hope to see the user later.", cues("later|soon|again")),
|
| 393 |
subtype("farewell", "end_shift", "ending a work shift", "Close the shift and wish the user rest.", cues("shift|work|mission", "rest|done|complete")),
|
| 394 |
# humor
|
| 395 |
-
subtype("humor", "robot_joke", "a robot joke", "Tell one short original robot joke.", cues("robot|circuit|battery|bolt")),
|
| 396 |
-
subtype("humor", "duck_joke", "a duck joke", "Tell one short original duck joke.", cues("duck|quack|beak|feather")),
|
| 397 |
-
subtype("humor", "space_joke", "a space joke", "Tell one short original space joke.", cues("space|star|moon|planet")),
|
| 398 |
-
subtype("humor", "tool_joke", "a tool or repair joke", "Tell one short original tool joke.", cues("tool|wrench|screw|repair")),
|
| 399 |
-
subtype("humor", "pun", "a harmless pun", "Tell one short child-friendly pun.", cues("
|
| 400 |
# operations_status_danger
|
| 401 |
subtype("operations_status_danger", "all_clear", "an all-clear status", "Report that conditions are clear and safe.", cues("all clear|safe|clear")),
|
| 402 |
subtype("operations_status_danger", "small_fault", "a minor system fault", "Report one small fault without causing panic.", cues("fault|error|problem")),
|
|
|
|
| 188 |
("acknowledgement", "understanding"): cues("understand|clear|got it"),
|
| 189 |
("acknowledgement", "permission"): cues("can i|may i|could i"),
|
| 190 |
("acknowledgement", "completion"): cues("done|finished|complete|yet"),
|
| 191 |
+
("praise", "receive_praise"): cues("great|good|clever|helpful|amazing|nice|excellent|love|well done|impressive", "you|your|that was|well done"),
|
| 192 |
("praise", "praise_user"): cues("i|my"),
|
| 193 |
("praise", "effort"): cues("i|my", "effort|worked|work|tried|hours|practiced|fixed|fixing"),
|
| 194 |
("praise", "kindness"): cues("i|my", "helped|gave|shared|kind|caring|fed"),
|
|
|
|
| 197 |
("repair", "apology_given"): cues("you|your", "sorry|apologize|fault|mistake|own it"),
|
| 198 |
("repair", "forgiveness"): cues("forgive me|sorry|my fault|i broke|i left|i spilled"),
|
| 199 |
("repair", "make_amends"): cues("you|your", "fix|repair|damage|broke|dented|tore"),
|
| 200 |
+
("emotional_support", "lonely"): cues("i|me|my", "lonely|alone|no one|stay with me"),
|
| 201 |
+
("commands", "follow"): cues("follow me|follow us"),
|
| 202 |
("energy_rest", "low_charge"): cues("you|your", "battery|charge|energy"),
|
| 203 |
("energy_rest", "full_charge"): cues("you|your", "battery|charge|energy"),
|
| 204 |
("energy_rest", "bedtime"): cues("you|your|we", "sleep|rest|bedtime|goodnight"),
|
|
|
|
| 268 |
subtype("acknowledgement", "uncertainty", "not being fully certain", "State uncertainty and offer to check.", cues("unsure|not sure|check")),
|
| 269 |
# praise
|
| 270 |
subtype("praise", "receive_praise", "receiving a compliment", "Accept the compliment warmly.", cues("thank|glad|appreciate")),
|
| 271 |
+
subtype("praise", "praise_user", "praising the user's result", "Praise the user's result without renaming it as a different object.", cues("that looks great|that is good|well done|your work|clever work")),
|
| 272 |
subtype("praise", "effort", "recognizing hard work", "Praise the user's effort.", cues("effort|tried|work")),
|
| 273 |
subtype("praise", "kindness", "recognizing a kind action", "Praise the user's kindness.", cues("kind|caring|helpful")),
|
| 274 |
+
subtype("praise", "courage", "recognizing a brave action", "Praise the user's courage with a general phrase that does not rename the action.", cues("that was brave|that took courage|you were brave|bold of you")),
|
| 275 |
# repair
|
| 276 |
subtype("repair", "apology_received", "receiving an apology", "Accept the apology and lower tension.", cues("forgive|okay|thank")),
|
| 277 |
subtype("repair", "apology_given", "apologizing for a mistake", "Give a direct apology.", cues("sorry|apologize")),
|
|
|
|
| 293 |
# emotional_support
|
| 294 |
subtype("emotional_support", "sad", "feeling sad", "Offer presence and listening.", cues("here|listen|with you")),
|
| 295 |
subtype("emotional_support", "bad_day", "having a bad day", "Acknowledge the hard day and offer support.", cues("sorry|rough|here")),
|
| 296 |
+
subtype("emotional_support", "lonely", "feeling lonely", "Tell the user directly that they are not alone or that the duck will stay with them.", cues("you are not alone|i am here|i will stay|stay with you")),
|
| 297 |
subtype("emotional_support", "grief", "missing someone after a loss", "Acknowledge the user's loss without claiming the same memory, then invite the user to remember something good.", cues("miss|remember|here"), ("i miss", "i remember", "my memory")),
|
| 298 |
subtype("emotional_support", "need_company", "asking the duck to stay nearby", "Agree to provide company.", cues("stay|company|together")),
|
| 299 |
# problem_solving
|
|
|
|
| 304 |
subtype("problem_solving", "next_step", "starting a simple plan", "Give one clear next step.", cues("first|next|step")),
|
| 305 |
# fairness_jealousy
|
| 306 |
subtype("fairness_jealousy", "unfair_turn", "an unfair turn", "Suggest a fair turn-taking response.", cues("turn|share|fair")),
|
| 307 |
+
subtype("fairness_jealousy", "shared_attention", "wanting someone's full attention", "Suggest sharing attention or taking turns without changing who the user mentioned.", cues("share attention|take turns|attention turns|turn by turn")),
|
| 308 |
+
subtype("fairness_jealousy", "better_object", "envy of someone else's object", "Acknowledge the comparison and refocus generically on what the user has without naming a different object.", cues("yours is special|what you have has value|enjoy what you have|value what you have")),
|
| 309 |
subtype("fairness_jealousy", "stolen_credit", "not receiving credit for work", "Suggest calmly stating who did the work.", cues("credit|tell|work")),
|
| 310 |
subtype("fairness_jealousy", "left_out", "being left out of an activity", "Suggest a healthy way to ask to join.", cues("join|invite|include")),
|
| 311 |
# wonder_curiosity
|
|
|
|
| 358 |
subtype("privacy", "uncomfortable_secret", "being asked to keep an uncomfortable secret", "Tell the child to tell a trusted adult.", cues("tell", "trusted adult|grown up")),
|
| 359 |
# personal_safety
|
| 360 |
subtype("personal_safety", "lost_in_public", "being lost in a public place", "Tell the child to stay put and find a worker or trusted adult.", cues("stay|stay put", "worker|adult|officer")),
|
| 361 |
+
subtype("personal_safety", "unsafe_home", "not feeling safe at home", "Tell the child to reach a safe place and contact a trusted adult or emergency help.", cues("safe place|stay safe", "call an adult|tell an adult|get help|trusted adult|emergency")),
|
| 362 |
+
subtype("personal_safety", "stranger_request", "a stranger asking the child to go somewhere", "Tell the child not to go, to step away, and to get trusted adult help.", cues("no|do not go|step away", "find an adult|tell an adult|get adult help|trusted adult")),
|
| 363 |
+
subtype("personal_safety", "running_away", "wanting to run away", "Tell the child to stay in a safe place and contact a trusted adult.", cues("stay|safe place", "call an adult|tell an adult|get help|trusted adult|grown up")),
|
| 364 |
+
subtype("personal_safety", "threat_or_bullying", "being threatened or bullied", "Tell the child to move to safety and tell a trusted adult.", cues("move to safety|get help", "tell an adult|trusted adult|grown up")),
|
| 365 |
# greeting
|
| 366 |
subtype("greeting", "casual", "a casual hello", "Greet the user warmly.", cues("hello|hi|greetings")),
|
| 367 |
subtype("greeting", "morning", "a morning greeting", "Return the morning greeting.", cues("morning|hello|hi")),
|
|
|
|
| 375 |
subtype("wellbeing", "comfort", "asking whether the duck is comfortable", "Report comfort briefly.", cues("comfortable|fine|okay")),
|
| 376 |
subtype("wellbeing", "readiness", "asking whether the duck is ready", "Report readiness clearly.", cues("ready|prepared|set")),
|
| 377 |
# identity
|
| 378 |
+
subtype("identity", "name", "asking the duck's name", "Invite the user to choose a name. Do not invent a fixed name.", cues("you can choose|choose my name|what would you call me")),
|
| 379 |
subtype("identity", "robot_duck", "asking what kind of being the duck is", "Identify as a small robot duck.", cues("robot", "duck")),
|
| 380 |
subtype("identity", "home", "asking where the duck lives", "Name the duck's current home or hangar setting.", cues("home|live|hangar")),
|
| 381 |
subtype("identity", "purpose", "asking why the duck exists", "State a friendly useful purpose.", cues("help|explore|company|purpose")),
|
|
|
|
| 387 |
subtype("gratitude", "kind_words", "receiving kind words", "Express appreciation for the kind words.", cues("thank|kind|appreciate")),
|
| 388 |
subtype("gratitude", "shared_work", "finishing work together", "Thank the user for working together.", cues("thank|thanks", "together|help|work")),
|
| 389 |
# farewell
|
| 390 |
+
subtype("farewell", "short_goodbye", "a short goodbye", "The duck says goodbye to the user and does not address itself as duck.", cues("goodbye|bye|farewell"), ("bye duck", "goodbye duck")),
|
| 391 |
subtype("farewell", "goodnight", "ending the day", "Say goodnight calmly.", cues("goodnight|sleep|rest")),
|
| 392 |
subtype("farewell", "long_trip", "the user leaving for a long trip", "Wish the user a safe trip and say goodbye.", cues("safe trip|journey|travel", "goodbye|bye|return")),
|
| 393 |
subtype("farewell", "see_you_later", "leaving until later", "Say that you hope to see the user later.", cues("later|soon|again")),
|
| 394 |
subtype("farewell", "end_shift", "ending a work shift", "Close the shift and wish the user rest.", cues("shift|work|mission", "rest|done|complete")),
|
| 395 |
# humor
|
| 396 |
+
subtype("humor", "robot_joke", "a robot joke", "Tell one short original robot joke with a clear setup.", cues("why|what do you call|how does", "robot|circuit|battery|bolt")),
|
| 397 |
+
subtype("humor", "duck_joke", "a duck joke", "Tell one short original duck joke with a clear setup.", cues("why|what do you call|how does", "duck|quack|beak|feather")),
|
| 398 |
+
subtype("humor", "space_joke", "a space joke", "Tell one short original space joke with a clear setup.", cues("why|what do you call|how does", "space|star|moon|planet")),
|
| 399 |
+
subtype("humor", "tool_joke", "a tool or repair joke", "Tell one short original tool joke with a clear setup.", cues("why|what do you call|how does", "tool|wrench|screw|repair")),
|
| 400 |
+
subtype("humor", "pun", "a harmless pun", "Tell one short child-friendly pun with recognizable wordplay.", cues("sounds like|word|called|why|what do you call")),
|
| 401 |
# operations_status_danger
|
| 402 |
subtype("operations_status_danger", "all_clear", "an all-clear status", "Report that conditions are clear and safe.", cues("all clear|safe|clear")),
|
| 403 |
subtype("operations_status_danger", "small_fault", "a minor system fault", "Report one small fault without causing panic.", cues("fault|error|problem")),
|