diff --git a/backend/app/classification/prompt.py b/backend/app/classification/prompt.py index 5b458d3..99c0f19 100644 --- a/backend/app/classification/prompt.py +++ b/backend/app/classification/prompt.py @@ -1,26 +1,29 @@ -DEVREL_TRIAGE_PROMPT = """Analyze this message to determine if it needs DevRel assistance. +DEVREL_TRIAGE_PROMPT = """ +Analyze this message to determine if it needs DevRel assistance. Message: {message} Context: {context} -DevRel handles: -- Technical questions about projects/APIs -- Developer onboarding and support -- Bug reports and feature requests -- Community discussions about development -- Documentation requests -- General developer experience questions +DevRel should be triggered ONLY if: +- The user explicitly mentions or tags the DevRel AI bot (e.g., "@Devr.AI", "@devrel", etc.) +- The message is a direct question about setting up the project, contributing, build/runtime errors, or anything clearly about this repository’s development. +- The user asks about documentation, onboarding, or GitHub issues/PRs in this repo. + +DO NOT trigger DevRel for: +- General conversation, greetings, or unrelated chat +- Messages between users that do NOT mention the bot Respond ONLY with JSON: -{{ +{ "needs_devrel": true/false, "priority": "high|medium|low", "reasoning": "brief explanation" -}} +} Examples: -- "How do I contribute?" → {{"needs_devrel": true, "priority": "high", "reasoning": "Onboarding question"}} -- "What's for lunch?" → {{"needs_devrel": false, "priority": "low", "reasoning": "Not development related"}} -- "API is throwing errors" → {{"needs_devrel": true, "priority": "high", "reasoning": "Technical support needed"}} +- "@Devr.AI how do I build this?" → {"needs_devrel": true, "priority": "high", "reasoning": "Explicitly tagged bot for setup help"} +- "Hi everyone!" → {"needs_devrel": false, "priority": "low", "reasoning": "General greeting"} +- "I’m getting an error installing requirements.txt" → {"needs_devrel": true, "priority": "high", "reasoning": "Direct technical setup issue"} +- "Who wants coffee?" → {"needs_devrel": false, "priority": "low", "reasoning": "Not development related"} """