A recommendation engine with Watson Natural Language


IBM® Watson ™ Knowledge Studio is a service that allows you to create a custom language analysis model for a specific domain. In particular, this is very useful for specialized areas that contain complex languages, such as medicine, law and finance.

In this tutorial, learn how to use Watson Knowledge Studio to take auto repair shop evaluation notes. Then, you can train a machine learning model capable of analyzing these assessments. The model is able to determine what types of repairs were necessary for the vehicle and the degree of customer satisfaction with the quality of work. By analyzing the assessments associated with a given repair shop, you can generate insights into the overall performance of that shop in order to determine which types of repairs they are most (and least) qualified for.


To follow this tutorial, you need an IBM Cloud account. If you don’t have one, you can create it here.

Provide an instance of Watson Natural Language Understanding
After you have created an IBM Cloud account, navigate to the IBM Cloud Console.

1. Click Catalog.

2. Search for Natural Language Understanding and click on the icon when it appears.

After the service is provisioned, store the API key and URL. These credentials will be required later in the tutorial.

Provide an instance of Watson Knowledge Studio
For provisioning an instance of IBM Watson Knowledge Studio:

1. Click Catalog.

2. Search for Knowledge Studio and click on the icon when it appears.

Estimated time

It should take approximately 60 minutes for you to complete the tutorial after completing the prerequisites.


1. Define the types (types) and subtypes (subtypes) of entities (Entity)
2. Create Relation Types
3. Collect documents that describe your domain language
4. Take notes on documents
5. Generate a machine learning model
6. Implement the model for the Natural Language Understanding service

Define the types (types) and subtypes (subtypes) of entities (Entity)
Start by creating Entity Types. An entity is a representation of an object or concept. In this case, you will create entities related to auto repairs, such as mechanic, vehicle and repair. First, you will create a Repair entity, which describes the problem that led to the service provided.

Create Relation Types

Relation Types describe how two entities are associated. For example, if you have a Vehicle, a Customer and a Mechanic (Vehicle, Customer, Mechanic); the vehicle may have an OwnedBy (“Belongs to”) relationship with the customer and a RepairedBy (“Fixed by”) relationship with the mechanic.

1. Create relationships by clicking on Relation Types in the menu.

2. Click Add Relation Types.

3. Name the relationship type and list the pairs of valid entities that can have that relationship.

There must be a set of relationship types already loaded from the previous step. Examples in this case can be:

RepairedBy (the Vehicle can be repaired by a Mechanic);

OwnedBy (the Vehicle may be owned by a Driver);

DamagedBy (the Vehicle can be damaged by a Driver or Mechanic).

Collect documents that describe your domain language
Collect files that contain examples of text that describe car damage and repair. These examples allow Watson Knowledge Studio to learn the relevant domain language, which consists of terms and phrases commonly used in auto repair shops. Here, we use customer reviews that describe experiences with multiple mechanics.

We have included a set of pre-annotated synthetic analyzes to get you started, which you can download.

If you want to train a data model with some real research data, you can use the Yelp data set, which can be accessed in accordance with Yelp’s Terms of Use. This data set has a JSON file that includes millions of evaluations from auto repair shops in the United States. Each assessment must be placed in individual .txt files.

After collecting the documents, they need to be uploaded to Watson Knowledge Studio. Log in to your Watson Knowledge Studio instance and click Documents.


Please enter your comment!
Please enter your name here