Math is different in Voiceflow Alexa simulator and Alexa Developer Console/real alexa

I am making a medical chatbot. However, I am encountering some weird shenanigans with my program. When I do math to calculate which disease a user has, I get different numbers in the Voiceflow simulator and Alexa Developer Console. On Voiceflow, I get the expected results (and verified manually), but when running in the Alexa Developer Console or on a real Alexa, all numbers are wrong. I don’t understand how this can be when they are supposedly doing the same thing.

I’m not sure about your problems, but there’s a diffrenece in test between voiceflow and alexa.

see the picture in the middle.

In this picture, voiceflow would be “Your service”.

In ADC test, Alexa gets users’ speech with their speech recognitiion, machine learning, and natural language understanding in their cloud, then pass it to the Voiceflow.
In Voiceflow test, those are directly get and passed to Voiceflow, without Alexa’s cloud.(my guess)

IMO, the most importantt thing for Alexa skill development is knowing how alexa recognizes it and how we can adjust the way she recoginzes.(after that, speech converts to text and passed to the backend such as voiceflow).

VF test is nice for testing simple logic or just simple speech, but ADC test is more reliable especially for capturing user’s saying and if you are going to publish your skill to store, must work on ADC test.

That’s why I recommend ADC test.

Resolved. Turns out, on the Amazon tester, one of my variables was set to an incorrect value upon startup which led to the calculations being done with a wrong value. I have no idea how this could happen but I just added a code block that sets everything to 0 at startup and now it works. On Voiceflow, the variable was not changed at startup.

I see. Voiceflow has two types of variables, project variable and flow variable. Project variable is global and persistant, That means variable holds its value betwern sessions. flow variable lives only in each session and in each flow, that means everytime you start session, it will be initialized.

In alexa, its persistency is based on user id, which is provided when you enable your skill and it has not changed until you disable the skill.

ADC test simulates this, but VF test does nit simulates this and variables are always initialized when you start test