How to setup LUIS AI required entities / items for an action? - nlp

I am using LUIS for a chat bot.
I created an action. I require certain entities to be present and would like to prompt the user to enter the entities if they're missing from the action.
How do I do this?
All the tutorials online show setting it up from the bot builder web UI but Microsoft has since deprecated setting up prompts from LUIS's web UI.

Instead of relying upon Microsoft to do this, I prefer to only use LUIS for intent analysis and entity extraction.
You can store all the entities required to perform an operation(mapped to an intent) in some DB or just cache in a Map. Once you have Intent and entities corresponding to user input, you can match whether it contains all the entities or not. If not, just club all the missing entities and prompt user for remaining entities.
This might add some coding effort, but reduces a lot of dependency from cloud based applications. You also won't need to make any change if there is any change in endpoint URLs from LUIS or any of the cloud providers.

Related

Resource Ownership evaluation/authorization in an API

I am developing a side project where i was struggling to understand how to authorize the ownership of a resource, that user is trying to edit/delete using an API
Ex: We have three resources
A. Organization has
a. Workspaces has
1. Projects has
(it can have another level)
Let's say a user who is the admin of organization trying to edit the projects, I need to verify if that project belong to his current organization. Traditional way to do this is search through database to find the organization and match the ids. But I want to know if there is any better approach. Organizations like GCP / AWS or any other SAAS based platforms gives flexibility of what a user can edit or which project he can see, if I wanted this kind of approach, how do i design my db.
I tried looking through online to find a good article or books on this but everybody posting a simple approach of 1:1 relation.

dialogflow - private agent and user authentication

Is it possible to build and deploy an agent available only for some users , like for example a company, or limiting access ?
It depends on exactly what your needs are.
While not exactly what you are looking for, you can deploy an Action to Alpha test status. This lets you make it available to up to 20 users without going through the review process.
Additionally, you can deploy it to up to 200 users if you deploy to Beta. However, this still will require a review by the Action review team.
If you need more than this (and probably a wise idea even in other use cases), you'll need to use Google Sign in for Assistant or other identity methods to get the identity of the user and then determine if this is an authorized user as part of your Action. This will require review by the Action review team.

WSO2 APIM How to limit user to execute only in sandbox

I want to publish my API, but I want to limit so users can only execute in sandbox environment (I want to limit production to specific user/customers with specific agreement).
This is a basic functionality in other API managers, but I don't find how to do in WSO2.
I have found this article in Medium, and also noticed that when I create an aplication, a couple of new roles are created (Application/user_application_SANDBOX and Application/user_application_PRODUCTION), but I don't find how to use them.
Deep dive in doc doesn't helped me.
Option 1:
You can use application registration workflow to control key generation for production and sandbox, by sending it through an approval process.
If you want to automate it based on a property or something, you can write a custom workflow extension.
However, this is applied to applications but not to APIs. That means if you allow generating prod keys for an application, all APIs, that the application has subscribed to, are accessible with prod keys.
Option2:
If you want to do this in API level, you can write a custom mediation sequence. Within the custom sequence, you can read the key type (i.e. production or sandbox), subscriber, enduser (if required) etc. and decide whether you want to allow the request or not.

Azure Custom Decision Service API

I'm using Azure Custom Decision Service (https://learn.microsoft.com/en-us/azure/cognitive-services/custom-decision-service/custom-decision-service-overview) and have a few API questions.
From the documentation, I'm seeing that there is a Reward API for user clicking on the first recommended article. But is there other click events? Is the service also "learn" when user click on an article that isn't in the recommended list?
I couldn’t find where we send user info, how does Custom Decision Service helps with article “personalization”? Is it based on a cookie?
At the moment, we're only learning from a click on the top slot or first recommended article. We are considering enhancing the Decision Service to support learning from clicks on multiple slots but this is not yet in the service.
We automatically generate user features, today we use geo location and device type. We do use cookies but we're not learning from those yet.

Configuring Lists for use with Azure LUIS

I am using microsoft LUIS in my application.
I am configuring the intents and entities. When I set up the intents I can select works and mark them as entities. These create simple entities.
Simple entities cannot have Canonical Form and Synonyms as far as I can see and I cannot use any list entities I create in the intents screen.
How do I set an entities to be a list and link them to intents?
To create/add non-simple entities you need to create them via the Entities view. This view is accessible by clicking on Entities in the Sidebar menu:
Documentation on Adding List Entities to LUIS App

Resources