IBM Cloud Docs
Creating custom entities and relations models

Creating custom entities and relations models

The Natural Language Understanding Free plan limits the size and performance of your custom model. To test a custom model to its full extent, use it with the Natural Language Understanding Standard plan.

  1. Get started with Knowledge Studio.

  2. Create a custom model.

    1. To create a custom entities and relations model, see Creating a machine learning model
    2. You can also create a custom entities model with a rule-based model. See Creating a rule-based model for details.
  3. Deploy your model to Natural Language Understanding

  4. To use your model, specify the model that you deployed in the entities or relations options of your API request:

    • Example parameters.json file:

        "url": "www.url.example",
        "features": {
          "entities": {
            "model": "your-model-id-here"
          "relations": {
            "model": "your-model-id-here"
    • Example curl request:

      curl --user "apikey":"{apikey}" \
      "{url}/v1/analyze?version={date}" \
      --request POST \
      --header "Content-Type: application/json" \
      --data @parameters.json

Deleting custom entities and relations models

To delete an entities or relations model from your service instance, use the Delete model method. Replace {url} and {apikey} with your service URL and API key, and replace {model_id} with the model ID of the model you want to delete.

  • The following example undeploys an entities or relations model.

    curl --user "apikey":"{apikey}" "{url}/v1/models/{model_id}?version={date}"
    --request DELETE