Repository navigation
fix: classify greetings as chitchat in planner fallback - #255
Open
panshularora wants to merge 1 commit into
Open
panshularora wants to merge 1 commit into
panshularora wants to merge 1 commit into
Conversation
When classify_intent() is unavailable, unmatched input defaulted to search, so "hello" and "thanks" went through retrieval. Detect short greetings/thanks first, keep topic queries on search. Fixes c2siorg#254 Assisted-By: Grok
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
When Hugging Face intent classification is unavailable,
_keyword_fallback_intent()defaulted unmatched input tosearch. Greetings likehelloandthanksthen went through retrieval and came back asFound N articles...even thoughResponderAgentalready has chitchat replies.The fallback now returns
chitchatwhen every token is a greeting/thanks (punctuation stripped, sothanks!counts). A message that also has a topic, e.g.hello ransomware, still goes to search.Related Issue
Fixes #254
Motivation and Context
classify_intent()already returnsNonewithout a workingHUGGINGFACE_TOKEN. The keyword fallback is the path that actually runs in that case, and it never setintent: "chitchat".How Has This Been Tested?
From
api-service:30 passed.
Covers:
hello/thanks/thanks!/thank you/bye->chitchathello ransomwareandransomwarestaysearchFound ... articlesScreenshots (if appropriate):
N/A
Types of changes
Checklist: