How can I keep inputs from being "held over" to subsequent interactions? - bixby

My action has 3 inputs: required Book, optional Chapter, optional Verse.
If I said read [book] [chapter] [verse], I get the correct response.
If I follow that up with read [book] [chapter], I'm getting the Verse value passed in from the previous request. How do I keep that from happening?

I was able to bypass the issue (it appears), but creating three separate actions (required Book, required Book + required Chapter, required Book + required Chapter + required Verse).
Then, I just needed to duplicate my action-endpoint to allow the same endpoint to accept all three actions.
While I see the value of "historical inputs" in certain cases, seems like there should be a way to ignore them, too.

If you absolutely do not want any historical inputs, you can experiment with making those concepts transient

Bixby uses historical inputs (eg. inputs from previous requests) to fill in any missing inputs from a user's utterance as a way to provide a streamlined conversation flow.
In use cases such as your's where such assumptions should not be made, I would recommend using prompt-behavior (AlwaysSelection) in your Action's collect input definition. This would ensure that Bixby does not use historical input to fill in the gaps and, instead, asks the user for the input in question. You can read more about prompt-behavior here.

Related

How can I get bixby to prompt for optional inputs?

At a high level, I would like to set up an action that has some required inputs and some optional ones. After the user begins, he/she will be prompted for any required inputs that are missing. If/when the required inputs are collected, i would like to ask if the user wants to specify more optional inputs.
The specific use case is a voice-based real estate search. I have some required inputs set up like zip code, price, and number of bedrooms. Then I would like bixby to ask "would you like to refine your search even further?" and if the user says yes, we can ask about number of bathrooms, parking arrangements, and other more niche parameters. I do not want to make all of these required and have to prompt everyone if they want to filter by "pools" or some parameter not widely used. And being voice-based, I do not want to just have it as a checkbox on the screen because someone on the speaker won't be able to use that parameter then.
I have thought of 2 potential solutions but I do not know if they will work (at least without relying on the controls on screen for a voice-based capsule):
1) Make the search into a transaction and then instead of a normal confirmation, try to shoe-horn the confirmation to ask if the user wants to add more refinements. Maybe something like the bank transfer one but a negative confirmation would cause bixby to ask for information that she didnt ask for before: https://bixbydevelopers.com/dev/docs/sample-capsules/walkthroughs/simple-transactional#sample-capsule-walkthrough
2) Make 2 more required inputs, one boolean called "WantsOptionalParameters" and the other called "OptionalParameters" that will be a structure containing all of the optional parameters. Then it would prompt for WantsOptionalParameters like a normal required input, and if that is "True", I can have a sub-action that will ask for each one of the parameters to construct an OptionalParameters object. then we could feed that output into the search. And alternatively, if WantsOptionalParameters is false, we can automatically construct OptionalParameters with all negative responses and feed that into the original action.
Both of these solutions will take a bunch more research and testing and i don't even know if they will work, so i was hoping to call on the wisdom of you guys!
Here is my take on it for what its worth. Every domain has key inputs that are typically used to start the conversation and optional inputs that can refine the conversation.
Some general ways to start conversation for the real estate example (totally driven by my own experience, perhaps there are more)
Hows the real estate market in 90210?
Show me homes under $250K in Los Angeles?
Show me homes with 4 bedrooms (near me?)
You can club such inputs into an input-group called RequiredInputs that requires OneOrMoreOf these parameters to get the capsule started.
You can also collect the optional/niche inputs in another input-group called OptionalInputs that requires ZeroOrMoreOf and feed them into your capsule logic
Its also possible that all inputs are equally important and are all Optional! It is totally dependent on the domain and how the capsule developer might handle such inputs.
But in a general sense, once the set of inputs is in and the initial results are shown to the user, the capsule developer then has a great amount of control to
Shape the future conversation AND
Highlight capsule capabilities.
So, rather than presenting the user with a set of options, you can control the conversation and offer options that provide most value to the user (and to the capsule developer!)
e.g your capsule is capable of deep analyzing and refining results in a way that no other capsule on the market can do. So, you want to highlight this capability as the first choice via followup
Or You may have a conversation path based on prior experiences and your knowledge of the domain. So, you could say, I can refine the results further by X, Y, Z options.
This scenario is more likely to be useful and less likely to overwhelm (with options) the end user.
Hope this helps!

How can I have bixby repeat an action but forget previous inputs?

I am working on a capsule that accepts an address and a zip code and will estimate the value of a property. At the results view, I would like to add a conversation driver to see if the user would want to get an estimate of another property. I would want to train an utterance to initiate the same action but also cause Bixby to forget the address and zip from the previous action.
From the testing i've done, it looks like continuations will hold on to values from the previous action. Is there a way to cause a continuation to forget those values? Or is there another way to accomplish this sort of action-repeat?
You might want to look into the transient feature (documentation link) that you can define for concepts (zipcode, address, etc.).
Concepts marked transient will not be preserved in context and should provide you with what you need.

How to create a search form with dialogflow

I am trying to make a search algorithm with dialogflow that could take any combination of: first name, address, phone number, zip code or city as input to a search algorithm. The user does not need all of them, but we will refine our search with each additional answer until we only have one result. Basically we are trying to identify which customer we are talking to.
How should this type of intent (or set of intents) be structured? We have tried one intent with multiple parameters, but we do not need all of them to be required. We have also written a JavaScript function for fulfillment but how can we communicate back to dialogflow as to whether we need more information?
Thank you very much for your help.
Slot filling is designed for this purpose.
Hope that helps.
Please post more code/details to help answers be more specific.
First, keep in mind that Intents reflect what the user is saying, and not typically what you're replying with or what other information you need. Slot filling sometimes bends this rule, but only if you have required slots.
Since you don't - you need a different approach.
This can be done with a single intent, although you may find that multiple intents make it easier in some ways. The approach is broadly the same:
When you ask the question, make sure you set an Outgoing Context with a relatively short lifespan (2-3 is good) to indicate you are collecting user info.
Create an Intent (or Intents) that have sample phrases that capture the information you need.
Some of these will have obvious entity types (phone number and zip code) while others will be more difficult (First name has a system entity type, but it doesn't include all possible first names).
You will need to create sample phrases that collect the parameters by themselves, along with phrases that make sense. You're the best judge of this, and you should probably write some sample conversations before you write the phrases.
In your fulfillment, you'll figure out if you have enough information.
If you do, you can reply and clear the Context that was set. (Clearing it is important so Dialogflow doesn't match the information collecting Intent again.)
If you do not, you can add the information you have as parameters to the Context so you can save it for later processing, make sure you reset the Context lifespan (so it doesn't expire), and prompt the user for additional information. Again, having a conversation mocked out ahead of time will help here.

entities vs follow-up intent

Suppose i want to make a pizza ordering DialogFlow agent. To order a pizza we need 3 things: size, type and toppings.
If we want to go with follow-up intents approach rather than using entities then there will be so many combinations in which user might provide the information.
1: i want a pizza -> no info
2: i want small pizza -> size
3: i want small cheese pizza -> size and type
4: i want small cheese pizza with olives -> size, type and toppings
5: i want small pizza with olives -> size and toppings
...
and so on
How to solve this problem?
There will be so many combinations if we have more entities (2^n combinations)
Note 1: cannot take entities and slotfilling option as there are so many problems if we go down that road, like re-prompts loop, validation etc.
Is there any better solution?
Note 2: If we use entities, mark them required, and set prompts then many times if it does not get desired input from user it get stuck in re-prompt loop, i.e it keeps asking user same (or random) prompt for same entity. In my use case, it is bad for user experience. If we use follow-up intents instead, then we can set fallback intents for all those intents which solved this problem. (please note that this is just example of the use case)
This is another example of why I used follow-up intents, it solved my date capturing problem as well. I took #sys.date.recent and set a fallback intent to capture inputs like last week, last month etc, this was not possible using slots.
First, remember that Intents should reflect what the user says, not necessarily what you are doing.
On the surface, it isn't clear why slot filling (either with fulfillment or using built-in prompts) won't meet your needs. Since you've indicated that all three bits of information are necessary (size, type, and toppings), you can mark them as such in your phrases and Dialogflow will prompt for the missing information until it gets everything.
You almost certainly do not want to use Followup Intents. These are good when you always have a specific response that you send that will always have a very narrow set of replies from the user, but are very poor if the response from your action will prompt the user to reply in many different ways.
Instead, I would use a related concept: Contexts. (At least if you're not going to use slot filling.) When you ask the question of what they want, set a Context so you know they are. Then have one or more Intents that have this as an Input Context that accept the various things the user might say. Your webhook should see if you have the information you need and, if not, prompt them what else you're looking for. At the end, prompt for a confirmation, but they may say something that adjusts the order.

How to encourage a user to fill in long application forms?

What I can think of is pre-populating certain form input elements based on the user's geographical information.
What are other ways can you think of to speed up user input on long application forms?
Or at least keep them focus on completing the application form?
If you have a long form, try to prune it down. Don't ask them to fill in fields that you don't really need.
If the form spans several pages, give the user some feedback as to how many more pages there are. We users hate clicking on the continue button wondering if this will be the last page.
Never lose a field that they filled in, no matter what they do. This could have security implications if passwords are involved.
Use dropdowns to provide the user with options unless there are a lot of options that the user would have to scroll through or if the terms in the dropdown aren't widely accepted (e.g. dropdown filled with Systems Engineer, Solution Developer, IT Application... I just want Programmer.).
Provide help for fields that might be hard to fill in (or provide examples).
If it is possible in your case, just collect the bare minimum up front and then allow the user to use the basic features of your service.
For the user to upgrade to a better level of service, they will need to fill in the 2nd form with more detail.
How important it is to you to collect ALL that information up front ? It is worth losing customers by demanding too much from them ? Why not demand it later at a time more convenient to the user.
Creating a multi-step wizard offering only a small number of input fields per step. Ensure that they are aware of how far they have progressed in the sequence.
The psychology is that once a user is 'invested' in a task, they are more likely to continue. If you present the whole list of input fields at once, you scare them off.
Offering musings at each step (cartoon, humor, sayings etc) makes them move to the next step out of curiosity.
Users won't mind filling in long forms if and only if they feel that the questions that you ask are important: otherwise they will be discouraged, and become impatient with it.
Remember, in a web application people have very, very short attention spans. When the user starts feeling that you are asking too much, they're usually right.
Keep required information as few as possible: other info should only be optional, and you have to give something in return to the user to compel them to complete that information.
However you implement it, please please please use some kind of Ajax hearbeat to store their progress server side and repopulate it if it's lost. There is nothing more infuriating to a user that working through a long form and having a browser or network hiccup lose their entire submission.
Whenever it happens to me I generally never give it a second shot, because at that point recreating my submission isn't worth whatever I was signing up for.
Checklist:
Explain clearly the purpose of the form. (What's in it for them?)
Prune, prune, prune, and keep questions clearly relevant!
Give the user feedback on his/her progress (if the form is split over multiple pages)
Ask for as little as you can up-front and leave the rest for later.
Clearly mark required fields
Group fields logically.
Keep labels/headings brief and easy to understand.
Prefill as much as possible - but not too much.
Spread super long forms over multiple pages and allow backtracking.
Cleverly placed "Back", "Save" and "Cancel" buttons put people's minds at ease - even when redundant.
Provide friendly (but clear!) validation error messages, in a timely manner.
Allow the user to reclaim half-filled in forms - don't lose their data!
No matter what you do, do not include a reset button. :-)
Finally:
Explicitly tell the user when the process is finished. ("Thank you! Your application has been sent.")
Tell the user what will happen next. ("A confirmation e-mail has been sent to your e-mail address, and we'll process your application within two working days.")
use Ajax to populate and update the controls asynchronously.It will speedup the filling of long application forms.
Split it up into multiple pages - there's nothing quite so discouraging as seeing that you have another 100 questions to go.
Put validation on each input and check it onblur(). If they get to the end of the page and then it says "question #2 was incorrect", chances are they've forgotten what that one was anyway and it'll be more difficult to return to it. Plus, if they answer a series of similar inputs in a particular, incorrect way, you should let them know straight away (eg: entering dates as mm/dd/yyyy when you want dd/mm/yyy)
Split the form into several steps. It's like how someone is much more likely to read five 3-sentence paragraphs than one big 15-sentence paragraph of the same length.
I agree with tim; just let them fill in the bare minimum information and then leave the rest to profile updates. If any data is necessary for the service offered on your site, ask for it when they try to avail of the service (and no earlier).
That said, I wouldn't advocate the kind of forcing function that adam suggests. It pays to give your users the warm, fuzzy feeling that they are privileged and can use ALL of the services on your site. Although, if you look at it hard enough, adam's and my suggestions are pretty much the same.
If the application needs to include a lot of information, then make sure the user can save at any point, and log off, and log in later to complete the form. This would make more sense if some of the information is not necessarily easily available. Tax returns are an obvious example, where some of the data may need to be calculated, or the user must find the relevant documentation.
In some cases the user might use the same information in multiple applications. In that case it might make sense for the user to register their details (Name, Address, Telephone numbers, etc), which are automatically filled in on each application. For example, if you had a website for a recruitment agency, they may allow users to register their details, and then to apply for a particular job, they can just include a personal statement that applies to that job in particular.
As another consideration, if some information may be incorrect (particular if this is not always clear, such as a CAPTCHA, or a user name that must be unique), either separate it from the rest of the data, or otherwise make it so a mistake doesn't mean the rest of the information must be reentered.
These are basically ways of avoiding the user having to enter the same information twice.

Resources