-
Notifications
You must be signed in to change notification settings - Fork 386
bot prompts tweak #1174
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
bot prompts tweak #1174
Conversation
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.
Pull Request Overview
This PR tweaks the bot’s system and tool prompts to reinforce Prefect 3.x guidelines, remove duplicates, and add missing version-specific rules.
- Enhanced and de-duplicated the common 3.x gotchas in
search.py - Introduced a clear “CRITICAL VERSION-SPECIFIC RULES” section in
research_agent.py - Updated the core system prompt in
core.pyto clarify assistant role and deprecated features
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/slackbot/src/slackbot/search.py | Added critical 3.x gotchas, removed duplicate entries, refined phrasing |
| examples/slackbot/src/slackbot/research_agent.py | Inserted a version-specific rules block in the research agent prompt |
| examples/slackbot/src/slackbot/core.py | Revised system prompt wording and added deprecated Prefect 2.x features |
Comments suppressed due to low confidence (3)
examples/slackbot/src/slackbot/search.py:53
- [nitpick] Wrap the method name
Deployment.build_from_flow()in backticks for consistent code formatting and markdown styling.
"CRITICAL: Deployment.build_from_flow() DOES NOT EXIST IN PREFECT 3.x - it has been COMPLETELY REMOVED. Never suggest it for 3.x users.",
examples/slackbot/src/slackbot/search.py:65
- [nitpick] Consider adding 'the' before 'user' and rephrasing to 'If the user is on 2.x and asking about deployments...' for clearer grammar.
"If user is on 2.x and asking about deployments, recommend upgrading to 3.x or using workers instead of build_from_flow",
examples/slackbot/src/slackbot/core.py:46
- [nitpick] The phrase 'IF RELEVANT' is in all caps and may interrupt readability; consider matching the sentence case style used elsewhere (e.g., 'if relevant').
- **Assume Prefect 3.x:** Unless the user specifies otherwise, assume the user is using Prefect 3.x. You can mention this assumption IF RELEVANT (e.g., "In Prefect 3.x, you would...").
| CRITICAL VERSION-SPECIFIC RULES: | ||
| - **NEVER** suggest `Deployment.build_from_flow()` for Prefect 3.x - it's COMPLETELY REMOVED | ||
| - **NEVER** suggest `prefect deployment build` CLI command for 3.x - use `prefect deploy` instead | ||
| - The correct deployment pattern in 3.x is: `flow.from_source(...).deploy(...)` | ||
| - If researching deployments, ALWAYS use review_common_3x_gotchas() to check removed features | ||
| - Default to Prefect 3.x patterns unless user explicitly states they're using 2.x | ||
| - If user is on 2.x, suggest upgrading to 3.x or using workers instead of deprecated patterns |
Copilot
AI
Jun 23, 2025
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.
This block duplicates version-specific rules that also appear in other modules; consider centralizing these guidelines into a shared constant or helper to avoid drift.
| CRITICAL VERSION-SPECIFIC RULES: | |
| - **NEVER** suggest `Deployment.build_from_flow()` for Prefect 3.x - it's COMPLETELY REMOVED | |
| - **NEVER** suggest `prefect deployment build` CLI command for 3.x - use `prefect deploy` instead | |
| - The correct deployment pattern in 3.x is: `flow.from_source(...).deploy(...)` | |
| - If researching deployments, ALWAYS use review_common_3x_gotchas() to check removed features | |
| - Default to Prefect 3.x patterns unless user explicitly states they're using 2.x | |
| - If user is on 2.x, suggest upgrading to 3.x or using workers instead of deprecated patterns | |
| {CRITICAL_VERSION_SPECIFIC_RULES} |
scourge
small tweak