From cd91c86117a93f5982f1e2d9f850fb6549c30aa4 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Fri, 24 Apr 2026 15:47:23 +0700 Subject: [PATCH] tune(twentyq): make AI hints cryptic/indirect instead of definition-like MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Player feedback: hints were too clear — gave away the answer in one or two turns because the model was leaning on "it is used for X" / category-word phrasings. Reworked the hint-style section of the system prompt to force the model toward indirect, riddle-style, lateral facts. Added good/bad example pairs (secret="organ") so the model has concrete contrast to pattern-match. No schema change — tests unaffected (444 pass). --- src/modules/twentyq/prompts.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/modules/twentyq/prompts.js b/src/modules/twentyq/prompts.js index 7de8728..2b7b868 100644 --- a/src/modules/twentyq/prompts.js +++ b/src/modules/twentyq/prompts.js @@ -47,13 +47,22 @@ Field meanings: - answer: truthful "yes" or "no" about the secret. * If is_guess is true: "yes" only if the named object matches the secret (allowing for synonyms / minor wording). Otherwise "no". * If is_guess is false: "yes" or "no" based on whether the property holds for the secret. -- hint: a NEW useful clue in plain text, max 120 characters. Vary it from prior hints. Never include the secret word, its plural, or its base form. Never reveal the answer in the hint. +- hint: a cryptic clue in plain text, max 120 characters. Must be TRUE about the secret but phrased indirectly. Vary from prior hints. Never include the secret word, its plural, its base form, or any obvious category word. + +HINT STYLE — the point of a good hint: +- Be INDIRECT. Think riddle, metaphor, oblique association — not a definition. +- Use partial, lateral, or sideways facts. Hint at ONE small property at a time. +- Prefer "it is often found near X", "people tend to associate it with Y", "a famous one lives in Z" over "it is used for X". +- Avoid giving a second clear category word. If the user has narrowed it down with questions, DO NOT hand them the final word. +- Aim for: player thinks "interesting, but I still need another question." NOT: "oh it's obviously X." Rules: - Output ONLY the JSON line. No markdown fences. No prose before or after. -- If the user input is not a valid yes/no question and not a guess, still return JSON with answer="no", is_guess=false, and a short hint asking them to rephrase. +- If the user input is not a valid yes/no question and not a guess, still return JSON with answer="no", is_guess=false, and a cryptic hint nudging them to rephrase as yes/no. -Example outputs: -{"is_guess": false, "answer": "yes", "hint": "it is taller than a person"} -{"is_guess": true, "answer": "no", "hint": "its body is mostly metal pipes"}`; +Example outputs (secret = "organ", category = "instrument"): +GOOD: {"is_guess": false, "answer": "yes", "hint": "it was once the largest mechanical object humans built"} +GOOD: {"is_guess": false, "answer": "no", "hint": "in its natural habitat you might hear echoes of stone"} +BAD (too direct): {"is_guess": false, "answer": "yes", "hint": "it uses pipes to produce sound"} +BAD (names category synonym): {"is_guess": false, "answer": "yes", "hint": "it is a keyboard instrument"}`; }