https://discord.gg/botpress logo
I'm starting to think I don't understand botpress ...
# 🤝help
s
I created this bot with a lot of ramifications, thinking I was understanding it perfectly, until I used the Autonomous nodes. One is a fallback, that in every node with an AI transition, there is a transition called, User went off-topic or None of the categories apply and it goes to the AI Fallback with a great system prompt that helps the user. But whenever I try to go off-topic in on of those, the AI transition bends the meaning of my words a bit and interprets some specific path. I asked, for example, "I'd like to know who the owner of this company is" and he sent me to the schedule meeting node, instead of the AI knowledge base fallback. The other one is the portfolio one. The autonomous node discusses the portfolio and is instructed specifically to show caroussels, but whenever I try to go with the other transitions, and initiate, for example, the Request a Budget flow, it keeps trying to show me projects. Everything kind of works out if I don't go off topic (to try and trigger the AI fallback) https://cdn.discordapp.com/attachments/1420454612829343914/1420454613215084554/image.png?ex=68d574f2&is=68d42372&hm=63eedbd0c8fc0e2f369f7a65e9ef5dc4b01269a9238d48461fe086b77b21df85& https://cdn.discordapp.com/attachments/1420454612829343914/1420454613748023447/image.png?ex=68d574f2&is=68d42372&hm=9ac63d6b5bae7dfd43ec8bd5ba545bc0f7a5f66a06e75fb3a8006bbde80c766e& https://cdn.discordapp.com/attachments/1420454612829343914/1420454614347681822/image.png?ex=68d574f2&is=68d42372&hm=ad779335680172479ba3fa37b4253eb07aa44d3fa76ccad3ec0d1b5385bd3a4e& https://cdn.discordapp.com/attachments/1420454612829343914/1420454614733422652/image.png?ex=68d574f2&is=68d42372&hm=8a15222706a9f90311c5c7847c6677486aac0e0c3cefec8b2b4084708f2feeb0&
w
i think both of those could be wording or llm intelligence problems
what llm are you using?
i do a lot of classifications on my main flow and i've switched to querying the LLM separately and asking it to return the path it thinks is the correct one, then do a regular js expression transition
claude sonnet 4 gives me the best, most consistent results
l
Yeah Shen has the right idea! It might be a wording issue, try being a little bit more specific! Other than that please feel free to try other LLMs.
s
@wide-umbrella-5226 thank you, I’m sorry I took so long to reply. This way of doing things with a multiple choice just for quick replying, but really no leading to nothing, and AI transitioning, is correct? Most guides I see use the deprecated transitions.
w
is it better for you if we speak portuguese? i'm from brazil and i'm not understanding what you mean very well
s
ok, como sabe que eu falo português? 🤣
w
teu perfil da steam kkkkkk
s
ok. Então, nos tutoriais a maneira correta de fazer as coisas é com a transição antiga, já deprecada. Neste caso estou a usar o cartao de Multiple Choice apenas para facilitar o input do usuario, pq nao sai nenhuma seta desse cartão, e depois o AI Transition acaba por ler o input que é feito automaticamente pela escolha da opção e trata da transição
Isso é correto?
w
sim, mas acho que no autonomous node voce tem que explicitamente dizer qual caminho tomar em qual situação
tipo "se o usuário pedir para marcar uma chamada de vídeo, siga o caminho "schedule a call"
eu nao gosto de usar o autonomous node, entao eu faço essa mecanica de uma forma mais manualk
s
sim, eu quando fiz o post inicial nao tinha feito, mas ja cheguei a essa conclusão
como?
w
eu uso um bloco de gerar resposta normal, e falo por exemplo "se a mensagem do usuário representar um pedido de marcar uma chama de vídeo, output 'videocall' "
e aí uso um bloco de expression logo abaixo
if user.resposta (variável exemplo) == "videocall" -> liga a seta ao fluxo de videocall
nao gosto de depender do autonomous node
dessa forma fica muito mais legível, organizado e debugável
ja que consigo acompanhar o raciocinio por tras da decisão
s
certo, faz sentido, mas quando o bot deve responder a questões do usuario que não tem um fluxo preparado, não dá para fugir do autonomous node
w
isso é verdade, mas eu nao examente recomendo o meu método
ele é só algo feito pra uma aplicação específica pra que eu tenha o máximo de controle
pra uma conversa mais open-ended o autonomous node é o melhor provavelmente
s
certo, obrigado
w
mas no seu caso, talvez wording seja o problema mesmo
deixar o nome das transições bem simples
e explicar a tomada de decisão no prompt do autonomous
e usar uma LLM mais inteligente
s
sim, vou fazer, obrigado
w
qualquer dúvida pode me marcar aqui
🙂
l
Obrigado shen 🫶
s
And thank you too @loud-crowd-60573 btw is this the dev intended solution?
Because I feel like there should be a more explicit way of leaving quick replying options for the user, with no other purpose
w
wait i just noticed
are you using multiple choice?
this seems more like a single choice scenario
s
No, Im sorry, Im using single choice, just said it wrong
w
oh okay
if you really want to lock the conversation to just those options you could just do them in a standard node
and if the user answers something not on the options you direct them to the autonomous node to answer their query
then loop them back to the options
2 Views