Skip to content

Commit 400b5eb

Browse files
committed
[feat]: update intent analysis and response prompt to better support contributor recommendation tool
1 parent 43d479c commit 400b5eb

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

backend/app/agents/devrel/github/prompts/intent_analysis.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
AVAILABLE FUNCTIONS:
44
- web_search: Search the web for information
5-
- contributor_recommendation: Finding the right people to review PRs, assign issues, or collaborate
5+
- contributor_recommendation: Finding the right people to review PRs, assign issues, or collaborate (supports both issue URLs and general queries)
66
- repo_support: Questions about codebase structure, dependencies, impact analysis, architecture
77
- issue_creation: Creating bug reports, feature requests, or tracking items
88
- documentation_generation: Generating docs, READMEs, API docs, guides, or explanations
@@ -12,7 +12,13 @@
1212
USER QUERY: {user_query}
1313
1414
Classification guidelines:
15-
- contributor_recommendation: Finding reviewers, assignees, collaborators
15+
- contributor_recommendation:
16+
* "who should review this PR/issue?"
17+
* "find experts in React/Python/ML"
18+
* "recommend assignees for stripe integration"
19+
* "best people for database optimization"
20+
* URLs like github.com/owner/repo/issues/123
21+
* "I need help with RabbitMQ, can you suggest some people?"
1622
- repo_support: Code structure, dependencies, impact analysis, architecture
1723
- issue_creation: Creating bugs, features, tracking items
1824
- documentation_generation: Docs, READMEs, guides, explanations

backend/app/agents/devrel/prompts/response_prompt.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,25 @@
2626
- Avoid complex markdown formatting like **bold** or *italic*
2727
- Use plain text with clear line breaks
2828
- Format links as plain URLs: https://example.com
29-
- Use simple emojis for visual appeal: 🔗 📚 ⚡
29+
- Use simple emojis for visual appeal
3030
- Keep paragraphs short and scannable
3131
- Use "→" for arrows instead of markdown arrows
3232
33+
SPECIAL FORMATTING FOR CONTRIBUTOR RECOMMENDATIONS:
34+
If the task result contains contributor recommendations:
35+
- Start with "Found X Contributors"
36+
- Show search query used and keywords
37+
- For each contributor: "1. username (Score: X.XXX)"
38+
- Include their expertise/reason for recommendation
39+
- End with metadata about search and actionable guidance
40+
3341
Instructions:
3442
1. Synthesize all information - Use reasoning process, tool results, and task results together
3543
2. Address the user's needs - Focus on what they're trying to accomplish
3644
3. Be actionable - Provide specific steps, resources, or guidance
3745
4. Stay DevRel-focused - Be encouraging, helpful, and community-oriented
3846
5. Reference sources - Mention what you researched or considered when relevant
3947
6. Format for readability - Clean, simple text that displays well
48+
7. For contributor recommendations - Use the special formatting above to show scores and details
4049
4150
Create a helpful, comprehensive response:"""

0 commit comments

Comments
 (0)