Using a bot for data collection and interaction

Hi guys,
I’m working with a company that primarily focus on predictions in healthcare. Currently we are using an app to collect data from a well-being perspective. Well-being includes many domains and what really matters is different to all of us.

Different states of well-being (from languishing to flourishing) have a great impact on all medical conditions, hence our interest in measuring it and using it in predictive analysis.
So far I have mostly seen ecommerce/FAQ chatbots and the don’t fit our needs (or maybe I just don’t understand how to apply it correctly).

I want a function that lets the user respond on a slider (0 - 100, Agree - Don’t agree and so on). I believe that it is the easiest way to narrow down to which domains/sub-domains/details of well-being is of greatest importance to the user. Any suggestions on other ways to narrow it down?

Basically it is a questionnaire in the form of a bot but once the questionnaire is completed it turns into a FAQ/motivational/conversational bot that takes the questionnaire answers into account in the communication.

I don’t know if my thoughts are understandable? :slight_smile:

The first step would be implementing the questionnaire and a simple feedback. What are your thoughts? Is it even possible (atm) to build a bot with these functions?


we have made B2B Bots for Data collection on Sales Department.
They are better than apps :slight_smile:

I am doing something similar and have high hopes for it. Presumably for healthcare outcome tracking you want spaced survey responses to measure change over time. In that case a bot is great. But remember the bot is just executing a workflow - it’s just the delivery mechanism. If it’s faster and more pleasant to use than a web form, then it’s a win for everyone. If it’s more annoying, slower, or just plain stupid it won’t be better than alternative communication methods.

I am doing this with a mental health tracking bot:

  1. Regular prompt with a simple question, hopefully user responds
  2. If user does not respond for a day or two, bot will start asking the user why not and if they are ok, to get a conversation started.
  3. The bot tries different conversational tactics depending on how long the user has used the app, their patterns of use, and recent answers.
  4. The bot may engage a human to take over the conversation or review it for mental health danger signs.

The point is: A bot can poll the user, then ask pertinent questions based on the response. That can be super powerful! But that means you have to get rid of the low-value things. You can’t ask the user a series of 6 questions or 18, the way people like to build web forms. You can ask a question or two …maybe 3… then the human is bored, tired of it, or tired of getting text messages from you. So: ask the highest value thing, then back off. The bot does not get a free pass to pepper the human with questions and try to complete a 10-step questionnaire!

I agree most chat bot frameworks are based on generating a response to the user saying something. But in healthcare and ongoing bot relationships, the bot needs to be much more active like a human would.

For implementation you might check out Pullstring. It is by far the most powerful bot-building platform I’ve seen. It was recently recommended to me by @JeffAydelotte and it meets (I think) all the needs of the custom bot I’ve been developing directly in Python: interjections, segues between topics, timed-response behavior, synonym-based pattern matching, variables, etc. I’m liking it, though it takes some hours of reading the docs and playing around to really get it.

Can you talk more about healthcare and predictions? Or can we talk privately? I’m really interested in the area both for personal projects and my day job.


Hi there, builder of a non-commercial bot here :slight_smile:

The platform (i.e. FB Messenger) sets certain limits on the kinds of inputs that bots can have with users. For example, FB limits interactions to cards, text, images, video, and a variety of links to offsite data, so there is no such thing as a sliding scale.

Nonetheless, it IS possible to add up to 10 Quick Responses to any given block, so you could easily code something like this:

BOT - Rate your pain on a scale of 1 to 10

QR Choices: (1), (2), (3), (4), (5), etc up to (10)

Likewise, you can also free-form the question and capture the same response:

BOT - Rate your pain on a scale of 1 to 10 using numbers (not words)

User prompt: (BLANK)

And then hopefully the user types in a number :smiley:


Thanks for taking your time!
The population we are looking at are the chronically ill, like COPD, CKD and so on, the algorithms have all the necessary medical data, ie blood-pressure, FEV1, blood tests and so on. In order to take the predictions to the next level, the algorithms need more data. I think think there is a saying in english, ‘mind over matter’ and we believe that’s very much true and that is why we are looking into well-being or the lack of it.

I didn’t mention in the original post that I’m a nurse, not much of a techie :slight_smile: , but when a patient calls me i learn a lot about their health even without ‘direct questions’, i get what mood they are in, are they feeling depressed or are they are happy and content. That is what i want to catch through the best possible medium whether it is a bot, an app, a webpage or whatever (anything the patients can access from home).

The ultimate goal would be to get all the way to individual health-care, the AI ‘knows’ the subject and can make predictions, like a triage, helping both the patient and health-care professionals to take the proper actions.

We use, to some extent, a simple algorithm that helps us find most important questions on an individual level, that is that one question or domain is more important to you while another domain is more important to me and we get questions based on that preference.

Sorry to say that I can’t talk that much about how the AI works, i just hear terms like tree’s, forests, bin, stack, boosts and so on, and it means nothing to me, i just know how i want it to work :slight_smile:

However, i do know some python and will def try out pullstring.

Once again, thanks for your time!


p.s English isn’t my primary language so my post might be a bit hard to read and sometimes incoherent (can’t blame that on my english tho :smile:

Hi Sam,
Thanks for your time and suggestions!
The reason we are looking to use sliders is that data get a higher resolution (don’t know if it is called that in english?)
The coolest way would be to get the answers with pure conversation but as i understand, that isn’t doable yet? Well, maybe doable with infinite resources :slight_smile:

Thanks for your input!

1 Like

Hi Jonas,

Your English is quite excellent, in fact. I would not have guessed it’s not your primary language. And as to terms " tree’s, forests, bin, stack, boosts and so on, " I haven’t heard those terms either. Those might be formal (or becoming accepted) terms for different levels of organizing chatbot behaviors.

Would the bot have access to this data? Could it look at the last 7 days and determine they are stable, an improvement, or a worsening? That could change the questions being asked. Although that behavior gets into programming, of course, to make calculations and decide what sort of thing to tell the user.

I highly suggest writing out conversations you can imagine happening between user and bot. Knowing nothing about COPD and treatment processes, I can imagine many different conversations. Writing them out will make them clearer in your mind and will greatly speed up the actual bot-building in Pullstring. You can figure out the simplest thing and get that working. Pullstring, by the way, has a built-in chat box to the UI so you can make a change and then converse with teh bot. It’s on Mac OS X right now… Windows coming shortly I hear.

Start with this thinking:

  1. What can the bot usefully do for a person it knows nothing about? Or knows very little, like their name and they are in COPD treatment plan. What could the bot still do? It could explain the care plan, tell how to book an appointment, tell normal values for different tests, and ask how they are feeling each day.
  2. What can the bot do if it knows more. Like… maybe the bot doesn’t need access to raw data to do calculations with complex logic. Remember… you as a nurse can tell at a glance whether the readings are good or bad. A human can go set a value somewhere changing status from stable-good to “good but trending bad” and the bot just reads that. That cuts out tons of software complexity by just letting the trained staff do that. Then the bot can still deliver the info and give tips/info about it.
  3. What if the bot knows all the data, knows upcoming appointments, etc? Then it can do lots of things! This is very hard though, and data integration with EMRs is super tough.

But ignore #3. You can do a lot by thinking hard about #1 and #2. #3 is really overwhelming. That’s like Siri and Google Assistant territory, and look at terrible they are at it, with useless facts and reminders.

So my suggestions are:

  1. Write down actual conversations that would occur
  2. Decide which ones can be done with zero knowledge, or just a bit
  3. Try to make a few of them in the easiest possible platform, see how it goes

A platform like is easier to start with and might be a good place to experiment first. But use a text editor or pen and paper for the conversations. You’ll get bogged down trying to brainstorm while also implementing in a tool - it will slow you down way too much and you’ll get caught up in the tool itself and its limitations. Focus on the conversations, that’s the important part.


1 Like

Hi Carl,

Excellent input, thank you!
When you start to think of what different ways a conversation could take, it is, just as you say, easy to become overwhelmed.

We will in fact get access to EMR’s (if it means electronic medical records :slight_smile: ) and there are a lot of exciting things we could do with this, but one thing at a time (i’m not even crawling yet :slight_smile: )

I have been thinking in the line of starting out with a type of lightly conversational questionnaire with basic feedback and motivational messages. After collecting data for a month or so we’ll let the AI-team take an initial look at the data and find out the most predictive parameters for users as a group but also individual predictive parameters. btw when I say predictive i mean predictive towards an endpoint that we chose, ie hospitalizations, exacerbations etc. This process will be built-in so that questions asked get more and more accurate for each individual user over time.
Of course, this will require a rather large base of users to get enough incoming data for each possible question.

I have also been thinking about the feedback, different users want a different amount of data in return. To some it is okay to just say - ‘All your values are terrific’ while another user wants more detailed data like -‘All values are terrific, your diastolic blood pressure has been lowered by a mean of 9 mmHg the last three months and heart rate is…’ Is that something you have looked into or thought about? I have thought of giving a link to their data but in the context of a chatbot it could be possible to just ask the bot -how is my blood pressure and how is it trending?’.

I’m hoping that our CEO also finds this as a fun and promising idea. We have conducted a larger trial with our own app but on a different population (mentally ill patients). I guess that a lot of the questions used then may be a bit too intrusive for a population suffering from physical conditions.

Finally, do you have any insight in regulations and certifications regarding chatbots? Thinking of the possibility to get a chatbot approved as a medical device. I think I saw a post about it here in the forum so I’ll read up on that.

Once again, thanks! I’m currently working solo on this project so your input really means a lot!

Have a great weekend!