Show all synonyms of entities in the Watson Dialog response - ibm-cloud

We basically have an Excel sheet with 4 columns First Name, Last Name, User ID, Department.
I want to train a Watson Assistant in such a way that if I pass a value which is belongs to column 1, the response should show me the values for other 3 columns. If I pass a value which belongs to column 4, the response should show me the values for other 3 columns and so on.
I am wondering, if I can achieve this using Watson Assistant. If yes, what intents or entities will I need to create?
What I tried was, create n(no of records) number of entities i.e. column 1 values with 3 synonyms - values of columns 2,3 and 4.
But I am not sure how to pull related values of an entity matched.
I know using a DB would be ideal, but its a small bot and I would like to see if I can build it just using Watson Assistant and nothing else.

I would say "no", that does not work. "Robert Thomas" vs. "Thomas Peters" vs. "Peter Gabriel" vs. "Gabriel Smith". How should Watson Assistant react if only one word is put in?
Watson Assistant is a AI-powered dialog system, a chatbot, but not a database. You could have a dialog in which in the first step you ask for which part of the record is entered. This could be offered through an option the user has to click. Then, the firstname or the userID is provided and the system looks it up. The recommendation is to use a database for it, but it could also be a static list - even managed in Watson Assistant.
Look here for a tutorial on how to build a database-driven bot. The docs have a section on the expression language in Watson Assistant, e.g., for handling your in-memory list of names.

Related

How do I add entities/ types on Google Actions in bulk using a csv or a json?

I am creating an google assistant app on Actions builder and I have some use cases which convert the company name to their codes. For example, BMW becomes BMWG.DE.
In actions builder, under the Types section I can see a way to add entries:
The problem is that the list is VERY long and I can not find a way to upload this list using a csv or a json. On dialogflow one can upload these Entities/ Types in bulk using a csv or JSON which is quite cool.
Does someone knows how to do it or is it not supported on google actions builder?
I can not migrate the dialogflow entity list to actions as it is a one time migration(quite angry on that) and I have used it already.
Project in Actions Builder are backed by a YAML-based file structure in Actions SDK. If you pull your project to a local environment, you can convert your JSON entities to types using a YAML structure and then push the changes back.
Example type:
synonym:
entities:
"0":
synonyms:
- first
"1":
synonyms:
- second
"2":
synonyms:
- third
matchType: EXACT_MATCH

Schema.org type for collectibles or catalogs?

There is the coins catalog https://colnect.com/en/coins/list/year/1889
Each item in list has Product Microdata, some items in marketplace have the offers property. For example: this stamp.
Recently the Structured Data Testing Tool began to show error instead of warning for missing offers property on Product pages against it still described as recommended property in product rich result docs. Also here are 'Either "offers", "review", or "aggregateRating" should be specified' errors in Google Search Console.
What kind of structured data will be most suitable for those items?
How to avoid these structured data errors? Will it be correct to have Thing type for catalog items and then change it to Product when the item will be placed in marketplace?
Update 2019-10-15: Structured Data for mentioned above stamp are here. At the moment it has offers so there are 3 warnings only.
And Structured Data for some other stamp without offers, here is the missing offers filed error.
It seems Google does not allow schema.org Product markup without offers.
Hard to answer your issue (Next time please add some code examples).
In general in this URL:
https://colnect.com/en/stamps/stamp/2376-Snowstorm_-_Steamer_off_a_Harbours_Mouth-Birth_Bicentenary_of_JMW_Turner_painter-United_Kingdom_of_Great_Britain_Northern_Ireland
Without this warning:
'Either "offers", "review", or "aggregateRating" should be specified'
- But read this:
https://www.checkerboard.com/web-development/fix-offers-review-aggregaterating-specified/
Product VS Thing - it's better to use more specific object-type (This is not related to the "marketplace" option to pay Online) (Google rich-snippet related to products).
productontology:
For coins/Sports Cards and so on you could add extra-data by productontology (not mandatory):
http://www.productontology.org/
Related:
Can we make structured page data for any type of entities?

Diaglogflow entity different values with the same synonym can bot ask for clarification?

Under the category of User I have two entries that have the same synonym. If this synonym is the same for two of the entries is it possible for the dialogflow to ask which entry I want?
DialogFlow Entity Entry Screen
When the chat bot prompts for the User and John is said the bot will then answer with something like Which John? 123 or 321?
i don't think what you are doing now will work. dialog flow wont be able to detect which entity you want to use. that you should do with your business logic. one thing you can do is you can create a intent for
Which John? 123 or 321?
and invoke that from the Response of your webhook using followupEventInput.
"followupEventInput": {
"name": "event name",
"languageCode": "en-US",
"parameters": {
"param": "param value"
}
}
https://dialogflow.com/docs/fulfillment#sample_response_from_the_service
or you can use events. events is a feature that allows you to invoke intents by an event name instead of a user query.
https://dialogflow.com/docs/events
This is not possible with Dialogflow alone. You could implement this in your backend, but then you would loose the benefit of the Developer Mapping Entity, which is to give you a primary key (the reference value) without requiring further processing on your part. It might then be simpler to just get the user input with a #sys.any parameter and to do all the id matching in your backend.

Dialog Flow ( Api.ai ) Conversation in chatbot

I am having a welcome intent and it allows user to select three different actions. Ex: Welcome! you can print your firstname, you can print your lastname or you can print your zipcode. If User select or enter last name then it should call the last name intent. So we are providing multiple options at welcome intent itself and user can choose any one of them.
Based on the action selected by user, the conversation should occur.
Please help me how to achieve this.
You are giving the user the option of proceeding by providing their first name, their last name or their zip code.
To capture their response, you will need to create three intents:
Capture First Name
Capture Last Name
Capture Zip Code
For each intent, you would provide a series of example phrases showing how the user might express each thing. For example, "Capture First Name" might contain examples like:
"My first name is Dan"
"Dan"
"Dan is my first name"
I'd recommend providing around 10 examples for each intent.
Dialogflow provides a system entity for zip codes, so it will be able to automatically extract the zip code from the "Capture Zip Code" intent.
However, to make the first and last name intents work, you'll need to create entities to represent the first and last names of all your users. Assuming you know these values ahead of time, you should first create each entity and then write a script to populate it from your datastore using the Dialogflow API's /entities endpoint.
Once you've created and populated these entities, add some examples that make use of them to your intents. Ensure that you highlight and annotate any entity values that are not automatically identified.
When your intents are complete, you can use Dialogflow's fulfillment to send the information they capture to your back-end.
Normally when the welcome intent triggered it will send a request to your backend through webhook,from backend you can send responses as templates or buttons and user can choose one of them ,if you are using backend here
Else in welcome intent response,use a response like you can print firstname ,you can print second name and configure intents for those and use contexts for proper flow.
In the second intent,keep one entity containing some values for first name and use a output context like frstname_output_context
In the another intent,keep one entity containing some values for last name as entity and use a output context like lsttname_output_context
Hope it clarifies using webhook and without webhook.

How to get a Task's "Unique ID" from a Project Web App via REST?

I'm a fairly experienced SharePoint developer, but brand new to MS Project and Project Server / PWA.
In MS Project Pro, there is a column called "Unique ID" that seems to function like SharePoint's built-in list item "ID" field - an auto-incrementing integer (1 based).
How can I find a task's "Unique ID" from a project that has been saved and published to a Project Web App through Project Server's REST API?
The only "ID" on a Task object retrieved through
https://servername/pwa/_api/projectserver/projects('project-id')/tasks('task-id')
is a GUID, there doesn't seem to be any property associated with an integer ID.
I found this other question and answer over on the MSDN help site. It is about Project Server 2010, and about how to show the "Unique ID" field in a report. But the answer says (emphasis mine):
There are three ID fields in the MSP_EpmTask_UserView; TaskUID,
TaskIndex and TaskClientUniqueId. TaskUID is a GUID, TaskIndex
corresponds to the Task positional ID and TaskClientUniqueId
corresponds to the Unique Id field in Project Professional.
So it appears that this information is stored somewhere within Project Server, but... how do I get it through REST?
{PWA Site URL}/_api/ProjectData/Projects(guid'{project guid}')/Tasks()?$Select=TaskName,TaskId,TaskIndex,TaskClientUniqueId
Well, although the other answer here is correct, some explanation might be in order.
Project Server has two different REST endpoints, and they do not return the same data.
There is
<PWA site URL>/_api/ProjectServer/
and
<PWA site URL>/_api/ProjectData/
There is quite a bit of overlap in the data they return, but there are some fields that can only be retrieved through the ProjectServer endpoint, and there are some fields that can only be retrieved through the ProjectData endpoint.
As it turns out, TaskClientUniqueId can only be retrieved from the /_api/ProjectData/ endpoint.