Skip to content

fix(supervisor): wire real intent classifier instead of hardcoded stub#9

Open
AyushAnand413 wants to merge 1 commit into
mainfrom
fix/intent-classifier
Open

fix(supervisor): wire real intent classifier instead of hardcoded stub#9
AyushAnand413 wants to merge 1 commit into
mainfrom
fix/intent-classifier

Conversation

@AyushAnand413

Copy link
Copy Markdown
Owner

Problem

classify_intent() in supervisor.py was a dead stub that always returned "INFORMATION", meaning ACTION-type queries (create ticket, fix issue, request help) were silently routed to the RAG information flow and never handled correctly.

Fix

  • Deleted the always-INFORMATION stub from supervisor.py
  • Imported classify_intent from agent/intent_classifier.py, which calls the LLM to distinguish ACTION vs INFORMATION intents
  • The imported name still lives in the agent.supervisor namespace, so the existing monkeypatch.setattr("agent.supervisor.classify_intent", ...) calls in test_supervisor_contract.py continue to work with no test changes needed

Impact

  • ACTION intents (ticket creation) now route correctly through the ticket-creation flow
  • INFORMATION intents (RAG Q&A) are completely unchanged

Test plan

  • pytest tests/test_supervisor_contract.py — both ACTION and INFORMATION contract tests pass
  • Manual: send an ACTION-style query (e.g. "Create a ticket for my laptop issue") and verify ticket response shape is returned
  • Manual: send an INFORMATION-style query and verify RAG answer is returned

🤖 Generated with Claude Code

Replaced the always-INFORMATION stub in supervisor.py with a proper
import of classify_intent from agent/intent_classifier.py, so ACTION
queries are now routed through the ticket-creation flow. Tests already
patch agent.supervisor.classify_intent via monkeypatch, so the seam
is preserved without any test changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ragify-ai Ready Ready Preview, Comment May 5, 2026 10:05am

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.

1 participant