fix: turn on knowledge grounding skill on 5th turn or if we already ask what user wants to talk about
@@ -244,8 +244,9 @@ class RuleBasedSkillSelectorConnector:
if len(dialog["utterances"]) < 20:
# greeting skill inside itself do not turn on later than 10th turn of the conversation
skills_for_uttr.append("greeting_skill")
- # if len(dialog["utterances"]) > 8:
- # skills_for_uttr.append("knowledge_grounding_skill")
+ if len(dialog["utterances"]) > 8 or prev_bot_uttr.get(
+ "active_skill", "") in ["greeting_skill", "friendship_skill"]:
+ skills_for_uttr.append("knowledge_grounding_skill")
# hiding factoid by default, adding check for factoid classification instead
# skills_for_uttr.append("factoid_qa")
if (factoid_classification > factoid_prob_threshold):
