One Intent per each FAQ entry? - amazon-lex

I was asked to create an Amazon Lex chat bot containing around 40 entries from an existing online FAQ.
I ended up having to create one intent per FAQ entry.
For each intent I added the question as an utterance and the answer as a conclusion statement.
Is there a better way of accomplishing this?
For example, to have all questions and answers in a single intent, such as a FaqIntent.
I hope I'm missing something here.

I think one intent per FAQ is correct way, all the FAQ's can be asked in different ways so just don't forget to add multiple and distinct utterances for each intent.
Example: FAQ -> What are the user policy?
This can be asked as "give me the user policies", "where can i find the user policies" etc.
If you have only one intent for all FAQ's then you will have to handle many things at your end, and using Lex will be pointless.

Check the AWS QnABot example:
https://aws.amazon.com/blogs/machine-learning/creating-a-question-and-answer-bot-with-amazon-lex-and-amazon-alexa/
It uses Lamdba/Elastic Search in the backend so you don't have to create all the possible utterance.

Related

Passing specific delivery instructions through to ChowNow from online ordering link

I'm helping develop an online ordering process for a local business, and they are offering food delivery to their location from specific partnered restaurants. The problem we're looking to solve is making the experience as smooth as possible for the user, so we're aiming to fill out these specific data fields to make the process smoother. They have QR codes on their tables, that link directly to their websites ordering page, from there the user can select from a few local restaurants, and are linked to their online ChowNow menus.
Does anyone have any experience using ChowNow, and knows if there is any way to pass off specific delivery instructions to ChowNow, specifically an address, from the link provided to the users from the QR code on their table?
We haven't found anything too helpful on this problem from ChowNow's official documentation or support. There are alternate ways that we have in mind to solve this problem if need be, but this is the desired solution from the client, and we would like to have stick with this method if possible.

Connect to Twilio Autopilot with Dynamic Stylesheet

My use case requires me to have users pick their desired voice for the autopilot questions. The thing is there doesn't seem to be a way of Dynamically choosing the Stylesheet of the Assistant (without actually updating the resource).
My perfect scenario would be something like:
connect.autopilot(SID, {voice: 'Polly.Joanna'})
I've also checked in The JSON Encoded Actions Schema but it doesn't seem to have a way of changing the voice of a specific Autopilot Action like this:
"say": {
"say_voice": "Polly.Joanna",
"speech: "Example speech"
}
The only reasonable solutions so far seem to be either:
create an Assistant for each user. (May lead to overloading Twilio)
have only one Assistant but update its stylesheet before connecting the user (This would probably lead to concurrency issues, right?)
Any other suggestions on how to tackle this problem? Thanks in advance
You are right, an Assistant has one directly linked StyleSheet and that is how you define the voice. You also don't want to update the Assistant with a new StyleSheet as that would likely change the voice of any calls that are already in progress (though I haven't tested this).
You do suggest creating an Assistant for each user. According to the Autopilot documentation you can create up to 500 Assistants per account. I don't know how many users you have that need Assistants, but that could work? I would guess that if your users want to customise the voice, they may end up wanting to customise other aspects of the Assistant, including the phrases it uses, so it might be useful to have an Assistant each too.
I don't have any other ideas for this though, I'm afraid.

How to force Siri to search for text in my application

I have app with several short texts. I want Siri to be able to search for these texts.
The only way I found is to use INSearchForNotebookItemsIntent. But when using this approach, the user should say the word "note" (in my example below - at the end of the sentence). The words "list" and "task" are also suitable.
That is, a search using Siri works well if to say to it(her?):
On TextBook show Movies note
But this phrase makes Siri to search in the Internet:
On TextBook show Movies
My goal is to give users a convenient search through the application (without having to say the strange words "note", "list", which do not reflect the essence of what the user is looking for)
So I need:
either to force Siri to search without saying the word "note"
or make Siri understand other words instead of "note" (for example, "record").
How can I do that?
Please feel free to asking more details if you need
Short answer: you can't.
The INSearchForNotebookItemsIntent is designed to search notes, tasks or reminders, not to search any arbitrary text.
Apple doesn't let you change most of the necessary keywords Siri is looking through when calling an Intent Handler. Sadly it isn't documented explicitly what are the necessary keywords for each intent or what are the sentences that a specific intent will recognize. You can try to create a custom vocabulary to make Siri call your app intent with sentences slightly different than what it would recognize by default, but you still won't be able to omit some keywords or change the structure of the recognized sentences completely. Moreover, this is a trial and error process due to the lack of exact documentation.
If you are still interested in solving your issue by using a custom vocabulary file, see the Registering custom vocabulary with SiriKit article from the official documentation.

How many submissions can be made using praw at a time?

I used praw to submit a link on a subreddit, but when I tried to add one more it asked me to do it after an hour. But when I do the same thing using the reddit site, It allows me to add as many links as I want. Does praw inhibits us to add more than one link per hour per user or is it checked by reddit api?
The answer is still no. Asking the question a fifth time will not change that.

Track pageviews in Google Analytics on partial url of Grails application

For my Grails application I want to set up Google Analytics to track only "partial" url's. I 'll explain:
a typical Grails url consists of the following parts: domain + application-name + controller + action + id
e.g. www.mydomain.com/myapp/controller/action/12345
As far as I understand for Google Analytics the page to be tracked is identified by the entire url. For my purpose I'm not interested in the id part of the url: I want to know which actions have been performed, but I need not know for which id the action was executed.
And of course I would like a generic solution, because I have multiple controllers and multiple actions... Maybe some kind of filter stating "I want to track pages 3 levels deep (/myapp/controller/action)" would do? Or a filter stating "exclude everything from url after the last /"?
Any help would be much appreciated.
Kind regards,
Pieter
I think this issue is best solved within the realm of Google Analytics, where you can create a specific report that ignores the id-part of the url.
That way you can just use Google Analytics at its easiest and need not make any code changes to your project
There can be several approaches. First thing comes to my mind is taking one of these steps:
Using profile filters (more info)
Generating the same virtual pageviews on each action id (more info)
Using advanced segments tool with a proper condition (page url pattern match) (more info)
Each approach has its pros and cons, choosing proper one depends on the goal you are trying to achieve.
I think this question is best answered by this article.
As the other contributors suggested, I too thought the issue should be resolved in Google Analytics. I clicked around a bit and got hopelessly confused.
Solving the issue within Grails is much much easier. In short the answer is:
in the Google Analytics tracking javascript there is a
"_trackpageview" action
this action can take as parameter the url you want to track
in Grails I can simply add the stuff I want to track:
application/controller/action
my Google Analytics script is in my main template
I just use: _gaq.push(['_trackPageview','myapp/${controllerName}/${actionName}']);
("myapp" should be the name of your application)
(${controllerName} and ${actionName} are generically available
variables in the Grails views)
Hope this will help others.
Thnx for the other answers.

Resources