Skip to content

Conversation

@zzstoatzz
Copy link
Collaborator

  • scourge

  • small tweak

Copilot AI review requested due to automatic review settings June 23, 2025 17:12
@zzstoatzz zzstoatzz merged commit 9422f43 into main Jun 23, 2025
3 checks passed
@zzstoatzz zzstoatzz deleted the bot-prompts-tweak branch June 23, 2025 17:12
Copy link
Contributor

Copilot AI left a 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.py to 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...").

Comment on lines +60 to +66
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
Copy link

Copilot AI Jun 23, 2025

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.

Suggested change
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}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants