-
Notifications
You must be signed in to change notification settings - Fork 70
Update prompt.py #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Update prompt.py #114
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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"} | ||
| """ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very sure how this will affect the model response, as the model can also respond with JSON as markdown, I faced this a lot while interacting with the system. Could you please check a bit on this part? A few interactions would be awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for highlighting this—it's a really important point! I've noticed as well that sometimes the model returns JSON wrapped in Markdown code blocks, which can trip up our downstream processing if we're expecting plain JSON.
To make sure the new prompt works as intended, I'll check a variety of typical user inputs—including ones where the bot is mentioned directly, general greetings, technical questions, and even some off-topic messages. I'll pay close attention to whether the model outputs just raw JSON or still adds Markdown formatting. If I see the model consistently adding code blocks, we can tweak the prompt to explicitly ask for plain JSON only.
If you have any particular examples where this was an issue, let me know and I'll make sure to include them in the checks. Otherwise, I'll report back soon with what I find and suggest any further changes if needed!