Telegram Bot Takes A Long Time To Answer

(Pete) #1

I think I might have over-done my bot now. We’ve been setting up a bot to answer a huge amount of questions that people have about life, love – anything really. It’s set up to answer in the region of 700 different queries now, all grouped and categorised by different flows according to the theme of the answer. However, the telegram bot is now really struggling to find and respond quickly. It usually takes between 5 and 10 seconds for it to come back with a response, not a great experience.

Has anyone encountered this problem and is there a way to speed things up? Many thanks in advance.

(Sarah Palombo) #2

Hello Pete

700 queries is quite a lot. How do you answer those queries?. Have you got lots of different flows triggered by keywords. Are you quering a database or a spreadsheet then returning the answer. Perhaps there’s clever ways to speed these searches up for you if you don’t mind expanding a little for me?

Sarah

1 Like
(Pete) #3

Sorry about the delay.

Yep… it’s a lot… we’ve built a bot that needs to be very broad.

The amount of answers are growing every day too as more ‘missing requests’ are being added to the backlog from what people are asking the bot.

Basically, for now, we have 33 different flows set up. Each flow has a different topic / theme within it. They range from; Signup, General Chit Chat Flows, Questions about Health, Questions about Mood, Questions about Relationships, Questions about Health (both mental and physical).

Within any one of the 33 different flows we’ve got anything from 5 > 100 different questions / statements… some grouped, some individual. It’s becoming a beast.

Now - I’m not surprised it’s getting slow, because each request through the telegram bot has got to navigate through 33 different flows and 700+ potential responses. But I would suggest to the community that as Bots mature and more questions are asked of them it’s necessary to have Bots with this many variables.

I’d love to find a way to make sure Flow is the tool for the job, because so far I’m such a big fan of it and how it’s working. Just need to speed that sucker up a little bit to handle such a massive volume of potential requests.

(Pete) #4

I’d love whatever help someone at flow can give me? Maybe if someone contacts me directly I can give access and you can see what we’ve set-up?

(John Jackson) #5

There are some things we could do to speed things up, we do have some plans in this area. We absolutely want you to use the platform extensively and build a lot of flows (obviously!) so we’ll make sure we keep in top of this.

One technique you can use is to keep responses on a Google Sheet rather than doing a lot of conditional (filtered) messages - but don’t worry if you’re happy working this way because we still plan to speed this up. If you would like details of this technique, please email us at support and we can help.

(Pete) #6

HA. I love the platform dude, I didn’t mean I was suddenly going to jump ship. I just meant I need to find some way (even if it was externally) to get things much slicker. I’ll email support and find out about this Google Sheets idea.

I’m using Google Sheets extensively already for logging missing requests and collecting lots of analytics, generating some of the responses that need to be more random etc… so this could all work very well in the long run.

(Pete) #7

Any thoughts on the above?

(Khashayar) #8

John, how would this work? Could you share a sample flow or some screenshots? Thanks!

1 Like
(Pete) #9

Can you give us an example of how to do this please?

(Pete) #10

I’m still really struggling with the response time with Flow. It’s almost at the point of needing to assess other vendors unfortunately - It’s just really struggling to handle the volume and size of the bot we’re building. If I give some at Flow access to our bot, can they help us with the performance issues please. Thanks.

(Khashayar) #11

My bot is also really slow… It’s running MySQL GET and very very simple queries but takes 5-10 seconds for each answer. At least have the “typing” indicator show up as soon as the flow is triggered.

(Pete) #12

Any news on why performance is so bad and what can be done to speed it up? It’s looking like I’m going to have to move off Flow & onto another platform if I can’t find a fix. It’s become just so unresponsive now it almost makes the bot unusable.

(Augusto Vera) #13

Hi John, I am pushing my efforts to provide bots for small to middle sized business, and the processes for orders are getting rather complicated with lots of conditional filtered steps, I would like to know how keeping the responses on a Google Sheet helps alleviate this spaghetti.

(Daniel Beckett) #14

@Augusto_Vera

If you’d like, you could contact the support team by emailing support@flowxo.com with some more information about your flows and the information you’re capturing so we can offer some advice :slight_smile:

(Kurt) #15

I’m having the same problem. My streams are large: the natural language interpretation is by the API and my answer database is by MSQL. It takes about 5-10 seconds for response. And now the typing icon has stopped appearing. What I can do? What is the solution you are thinking Daniel? I also love flowxo, it’s the perfect solution for my projects to reproduce several bots, but I need to speed up the response time or at least return the typing icon.

(Daniel Beckett) #16

The idea mentioned by John would be if you wanted to use a variable to search Google Sheets for message content rather than having filtered send message actions. I’m not sure if this particular technique will work for your flow since the real bottleneck is the time it takes to send and receive the NLP response.

How it works is that you save the message content in Google Sheets in their own rows and then back in your flow you would have a Google Sheets > Search Rows action to find the message that you need. You could assign ID values or some other identifier to the rows to find the right message from your flow.

(Kurt) #17

Daniel,

We disagree with the proposed solution. First we need a relational database capable of filtering millions of records. We are using MySQL.

In this sense, we did some API request tests outside of flowxo:

  1. Requests for API.AI are coming back in 500ms
  2. And the requests for MysQL are coming back in about 1s.

Thus, it is clear that the performance problem is flowxo. We have identified a difference in small flows and large flows.

  1. When just made the API.AI request, small flow takes 6s and large flow takes 12s.
  2. When the API.AI + MySQL request is made, the delay goes to 22s in the large flow.

We need a solution from you. We are very disappointed because we did a great job at Flowxo. We intend to sell large-scale for healthcare providers, but we need an improvement.

(Kurt) #18

Now, we made improve the time by making the suggestion you have made at the email: we removed the internal loops and filters. However, we still keep the following time: when the API.AI is request, it take 6 seconds; when the API.AI and MsQL is request, it take 8 seconds. We will try to change our server to try to improve this time. But we really need another solution from you.

(Pete) #19

We tried this BTW and the whole thing became much much slower. It’s not a Flow thing (in my opinion), it’s a GoogleSheets thing. GoogleSheets just isn’t very quick at responding to external calls.

1 Like
(Peter) #20

Hi - I know this is an old thread and you might be gone by now…

I am starting to use Google Sheets but reading all this above has me concerned. Is there an internal database we can use instead e.g. like a sort of “Flow Sheets” which is “closer” to the code so it runs way faster? Maybe this is an option and I don’t know it - I’m new to this.