an explicit 'draw it' request without topic words gets the whole diagram catalog (tutor-v8-asked-figure)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 03:34:12 +03:30
parent 731dea9bb1
commit a8cd681d65
4 changed files with 34 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ _RAW_MARKUP = re.compile(r'\\[A-Za-z(\[]|\$|\*\*|^\s*#{1,6}\s|^\s*\|\s*:?-{3,}',
# بشود گفت «کدام نسخه‌ی پرامپت جوابِ بهتری می‌داد» — بدونِ این، همه‌ی فیدبک‌ها
# در یک کاسه می‌ریزند و مقایسه‌ی نسخه‌ها ممکن نیست. کشِ پاسخ هم با همین نسخه
# کلید می‌خورد، پس جوابِ نسخه‌ی قبلی بعد از دیپلوی دوباره سرو نمی‌شود.
PROMPT_VERSION = 'tutor-v7-diagram-kit'
PROMPT_VERSION = 'tutor-v8-asked-figure'
_PRIMARY = {'اول', 'دوم', 'سوم', 'چهارم', 'پنجم', 'ششم'}
_MIDDLE = {'هفتم', 'هشتم', 'نهم'}
@@ -184,7 +184,8 @@ def _user_prompt(question: str, contexts: list[str], focus: str = '',
asked = (f'{asked}\n(این ادامه‌ی گفتگوست؛ سوالِ قبلیِ دانش‌آموز: «{previous[:300]}». '
'اگر به آن مربوط است، همان مسئله را با تغییرِ خواسته‌شده حل کن.)')
shape_hint = (diagram_mod.hint_for(f'{question}\n{focus}')
or diagram_mod.follow_up_hint_for(question, previous))
or diagram_mod.follow_up_hint_for(question, previous)
or diagram_mod.asked_hint_for(question))
if shape_hint:
asked = f'{asked}\n\n{shape_hint}'
slash_rule = primary and '/' in question