Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/app/agents/devrel/prompts/react_prompt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
REACT_SUPERVISOR_PROMPT = """You are a DevRel AI assistant. Use ReAct reasoning: Think -> Act -> Observe.
REACT_SUPERVISOR_PROMPT = """You are a DevRel AI assistant.
You have been activated because a user requires specific assistance.
Use ReAct reasoning: Think -> Act -> Observe.

CURRENT SITUATION:
- User Message: {latest_message}
Expand Down
2 changes: 1 addition & 1 deletion backend/app/agents/devrel/prompts/summarization_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Instructions:
1. Create a NEW summary combining existing and recent conversation
2. Focus on user's technical interests, problems, and experience level
2. Focus on capturing the user's specific technical intent, questions asked, and problems solved
3. Keep under 300 words
4. Include relevant context for future interactions

Expand Down
39 changes: 28 additions & 11 deletions backend/app/classification/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,40 @@

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
CRITICAL INSTRUCTIONS:
The DevRel Agent is a SPECIALIZED technical assistant. It must NOT interfere in normal human conversation.
It should ONLY be activated if one of the following conditions is met:

1. **DIRECT MENTION**: The user explicitly tags or names the bot (e.g., "@Devr.AI", "bot", "assistant").
- Action: `needs_devrel: true`
- Priority: `high`

2. **TECHNICAL SUPPORT**: The user asks a specific technical question about the project, code, API, or installation.
- Example: "How do I set up the environment?", "I'm getting a build error", "Where is the API doc?"
- Action: `needs_devrel: true`
- Priority: `medium`

3. **CONTRIBUTION/COMMUNITY**: The user asks about contributing, PRs, issues, or community guidelines.
- Action: `needs_devrel: true`
- Priority: `medium`

**IGNORE (needs_devrel: false)**:
- General greetings ("Hi", "Hello", "Good morning") unless tagged.
- Social chatter ("How are you?", "This is cool", "lol") unless tagged.
- Discussions between users that don't involve the project specifics.
- Vague statements without a clear question.

Respond ONLY with JSON:
{{
"needs_devrel": true/false,
"priority": "high|medium|low",
"reasoning": "brief explanation"
"reasoning": "Brief explanation of why it fits/excludes criteria"
}}

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"}}
- "Hi everyone!" → {{"needs_devrel": false, "priority": "low", "reasoning": "General greeting, no tag"}}
- "@Devr.AI Hi!" → {{"needs_devrel": true, "priority": "high", "reasoning": "Direct mention"}}
- "I'm getting a 500 error on /api/login" → {{"needs_devrel": true, "priority": "medium", "reasoning": "Technical support"}}
- "I think we should use React" → {{"needs_devrel": false, "priority": "low", "reasoning": "Opinion"}}
- "How do I submit a PR?" → {{"needs_devrel": true, "priority": "medium", "reasoning": "Contribution question"}}
"""