Skip to content

Conversation

@adot-7
Copy link

@adot-7 adot-7 commented Dec 14, 2025

Closes #93

Description

Refined the agent's system prompts to enforce strict activation boundaries. This ensures the DevRel agent only intervenes when explicitly required, preventing it from responding to general chatter or irrelevant messages.

Changes Made

  1. DEVREL_TRIAGE_PROMPT has been rewritten to prioritize specialized technical assistance over general conversation according to FEATURE REQUEST: Enhance Classification Prompt for Stricter DevRel Query Handling #93

  2. The REACT_SUPERVISOR_PROMPT is updated to explicitly acknowledge that the agent is acting on a validated request. This helps the model stay on track.

  3. The CONVERSATION_SUMMARY_PROMPT was refined to capture the user's specific technical intent and problems. This ensures that future classifications have a clearer signal of the user's ongoing technical context.

These changes significantly reduce false positives, making the bot less intrusive while maintaining high responsiveness for genuine technical support queries.

Screenshots

Before
image
After
image

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

  • Improvements
    • Supervisor prompt now includes an explicit activation preface to clarify when it should engage.
    • Conversation summaries now emphasize the user's specific technical intent, questions asked, and problems solved.
    • Triage rules refined: clearer activation criteria for DevRel involvement, explicit ignore rules for non‑triggering chatter, and tightened response reasoning format.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

Walkthrough

Three prompt files were edited to tighten DevRel activation and clarify summarization and supervisor phrasing: classification rules were rewritten into explicit activation/ignore criteria; the REACT supervisor prompt gained an activation preface; the conversation summary prompt's second instruction was refocused.

Changes

Cohort / File(s) Summary
Classification Prompt Enhancement
backend/app/classification/prompt.py
Replaced broad "DevRel handles" list with a CRITICAL INSTRUCTIONS block that defines explicit activation criteria (direct mentions/tagging, technical support questions, contribution/community inquiries) and an IGNORE section for non-triggering chatter. Updated JSON response reasoning wording and examples.
REACT Supervisor Prompt
backend/app/agents/devrel/prompts/react_prompt.py
Added an explicit activation preface and reformatted the prompt intro into multiple lines; core instructions, actions, and decision logic remain unchanged.
Conversation Summarization Prompt
backend/app/agents/devrel/prompts/summarization_prompt.py
Modified the second instruction in CONVERSATION_SUMMARY_PROMPT to focus on the user's specific technical intent, questions asked, and problems solved (replacing prior wording about interests/problems/experience).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review backend/app/classification/prompt.py for correctness of activation logic, IGNORE edge cases (tagged greetings, indirect mentions), and consistency of JSON output examples.
  • Verify react_prompt.py preface wording doesn't change expected downstream supervisor behavior.
  • Confirm summarization_prompt.py instruction change still satisfies length/context constraints and aligns with classification rules.

Poem

🐰 I hopped through prompts with careful cheer,
Tightened the rules so I only appear,
Tag me, ask tech, or offer to site,
Otherwise I'll nap until called right. ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enforcing strict activation rules for the DevRel agent, which is the primary objective across all three modified prompt files.
Linked Issues check ✅ Passed The pull request fully addresses issue #93 by rewriting the classification prompt with strict activation rules [#93], updating the supervisor prompt for explicit acknowledgment [#93], and refining the summarization prompt for technical intent clarity [#93].
Out of Scope Changes check ✅ Passed All changes are directly aligned with the objectives stated in issue #93: enforcing strict DevRel activation boundaries and refining related system prompts. No unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d18c34 and 5514d31.

📒 Files selected for processing (1)
  • backend/app/classification/prompt.py (1 hunks)
🔇 Additional comments (2)
backend/app/classification/prompt.py (2)

7-28: Well-structured activation criteria.

The CRITICAL INSTRUCTIONS block clearly defines when the DevRel agent should activate with appropriate priority levels. The IGNORE section effectively addresses the linked issue's requirement to filter out general chatter, greetings, and user-to-user conversations. This should measurably reduce false positives.


30-35: LGTM!

The updated reasoning field description provides clearer guidance for the model to explain classification decisions.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8eeacad and 2d18c34.

📒 Files selected for processing (3)
  • backend/app/agents/devrel/prompts/react_prompt.py (1 hunks)
  • backend/app/agents/devrel/prompts/summarization_prompt.py (1 hunks)
  • backend/app/classification/prompt.py (1 hunks)
🔇 Additional comments (3)
backend/app/agents/devrel/prompts/react_prompt.py (1)

1-3: LGTM! Clear activation context.

The explicit activation statement on line 2 aligns well with the PR's goal to enforce strict boundaries. By acknowledging that "a user requires specific assistance," this prompt now operates with the understanding that triage has already occurred.

backend/app/agents/devrel/prompts/summarization_prompt.py (1)

14-14: LGTM! Improved specificity.

The updated instruction now emphasizes capturing "specific technical intent, questions asked, and problems solved" rather than broader interests and experience. This aligns with the stricter activation criteria and provides more actionable context for future triage decisions.

backend/app/classification/prompt.py (1)

7-28: Strong activation boundaries defined.

The CRITICAL INSTRUCTIONS block clearly establishes the three precise activation conditions with assigned priorities. The IGNORE section effectively clarifies non-triggering scenarios, which should significantly reduce false positives as intended.

Amending priority from high to medium as suggested by coderabbit to conform with the earlier assumptions.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEATURE REQUEST: Enhance Classification Prompt for Stricter DevRel Query Handling

1 participant