answers from KBs
# 🤝help
m
Hello guys, why sometimes the chatbot does not provide the good answers from KBs but when the user repeat the question second time, it will reply correctly. I'm using gpt4o. Any tips to solve this please ? Thanks ! https://cdn.discordapp.com/attachments/1250384878411976725/1250384878739128390/chatbot_framework.png?ex=666abf2a&is=66696daa&hm=795ed513b67f3e2d2272004aa065804d9149d67736b4876c93429c3aa3ac02d6&
b
can you show me an example of this happening?
b
and what do your logs say?
the logs will show why a bot made a certain decision or action
m
@bumpy-butcher-41910, Any thoughts ?
b
you should be inspecting what the knowledge agent is doing, as that's what's generating the answer
in the logs above you're not showing me the knowledge agent functioning
m
@bumpy-butcher-41910 , here another example with logs
b
hmm, strange
does the same behaviour happen in the emulator?
m
@bumpy-butcher-41910 , yes same behaviour in the emulator also
b
can you humour me - what do the logs in the emulator show you for the same set of requests?
@bumpy-butcher-41910 it is the same question in the emulator
b
can you do me a favour and not put a space before the question mark? just for fun
m
in this example, it seems it answer when there is a space lol
@bumpy-butcher-41910 the workflow seems ok right ?
b
my suspicion is the problem with the translator agent, where it's not translating the message
in the example you just shared, you see the language was successfully detected
m
@bumpy-butcher-41910 yes I notice that and many times when it does not give the correct answer in the logs I found "User language already set to "fr" but message too short (5 tokens) to trigger a language switch, minimum is 6 tokens when language is already set"
but when just we repeat the question, it reply !
b
my suspicion, and I could be wrong, is that the bot is unable to detect a question after it tried and failed to detect a user language
only because I've never seen this happen in English
since the conversation is already in French, can you disable the setting to detect the language changes at every turn?
m
the chatbot is for users who speak English and French so I activated the automatic language detection option
b
yeah but I'd like to verify if that's what's causing the issue
m
ok I'm going to deactivate it
@bumpy-butcher-41910 , when I deactivate "Detect Language Change" it reply correctly !
2 Views