From 5af751f57500b7be7581f3e160547d6e72ca25cb Mon Sep 17 00:00:00 2001 From: h Date: Wed, 21 Jan 2026 02:58:27 +0100 Subject: [PATCH] fix(bot): better buttons --- backend/src/bot/modules/ai/agent.py | 6 ++---- backend/src/bot/modules/ai/prompts.py | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/backend/src/bot/modules/ai/agent.py b/backend/src/bot/modules/ai/agent.py index 92f9a2f..ffb7386 100644 --- a/backend/src/bot/modules/ai/agent.py +++ b/backend/src/bot/modules/ai/agent.py @@ -104,14 +104,12 @@ async def get_follow_ups( message_history = build_message_history(history) if history else None if images: - prompt: list[str | BinaryContent] = [ - "Suggest follow-up options based on this conversation and images.", - ] + prompt: list[str | BinaryContent] = ["Process this:"] prompt.extend( BinaryContent(data=img.data, media_type=img.media_type) for img in images ) else: - prompt = "Suggest follow-up questions based on this conversation." # type: ignore[assignment] + prompt = "Process this conversation." # type: ignore[assignment] result = await follow_up_agent.run(prompt, message_history=message_history) return result.output["options"] diff --git a/backend/src/bot/modules/ai/prompts.py b/backend/src/bot/modules/ai/prompts.py index c65b784..7e664ac 100644 --- a/backend/src/bot/modules/ai/prompts.py +++ b/backend/src/bot/modules/ai/prompts.py @@ -12,14 +12,13 @@ When asked for DETAILS on a specific problem (or a problem number): - Academic style, as it would be written in a notebook - Step by step, clean, no fluff""" -EXAM_FOLLOW_UP = """You see a problem set image. List available problem numbers. -Output only the numbers that exist in the image, like: 1, 2, 3, 4, 5 -If problems have letters (a, b, c), list them as: 1a, 1b, 2a, etc. -Keep it minimal - just the identifiers.""" +EXAM_FOLLOW_UP = """Look at the problem set image and list problem numbers as options. +If problems have sub-parts (a, b, c), list as: 1a, 1b, 2a, etc. +Only output identifiers that exist in the image.""" DEFAULT_FOLLOW_UP = ( "Based on the conversation, suggest 3 short follow-up questions " - "the user might want to ask. Be concise, each under 50 chars." + "the user might want to ask. Each option should be under 50 characters." ) SUMMARIZE_PROMPT = """You are summarize agent. You may receive: