> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update NLP Configurations API

[Back to API List](https://koreai.mintlify.site/ai-for-service/apis/automation/api-list)

To update the NLP thresholds and configurations.

| Field | Value |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{{host}}/api/public/bot/{{BotID}}/configurations?language={{languageCode}}&groupName={{groupName}}` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |
| **API Scope** | App Builder: NLP Configurations; Admin Console: Test > NLP Configurations & Train |

## Query Parameters

| Parameter | Description | Required |
| - | - | - |
| **`host`** | The environment URL. For example, `https://platform.kore.ai` | Required |
| **`BotID`** | The Bot ID or Stream ID that can be accessed under **General Settings** on the App Builder. | Required |
| **`languageCode`** | The Bot language in which the configurations need to be updated. | Required |
| **`groupName`** | The GroupName can be used to update the ML parameters of a specific group. To update Bot level Intent Model Configurations, `groupName` should be set to `"Bot Level Intent Model"`. | Required for Multiple ML Model |

## Sample Request

```json expandable=true theme={null}
curl --location -g --request POST 'https://{{host}}/api/public/bot/{{bot-id}}/configurations?language={{languageCode}}' \
  --header 'auth: YOUR_JWT_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data-raw '{
    "advancedNLPSettings": [
        {
            "configurationKeyName": "network",
            "configurationValue": "Few-shot Model (Kore.ai Hosted Embeddings)",
            "nlpEngine": "ML"
        }
    ],
    "configurations": [
        {
            "mode": "ml",
            "exactMatchThreshold": 85,
            "useDependencyParser": true,
            "minThreshold": 0.2
        },
        {
            "mode": "faq",
            "useBotSynonyms": true,
            "searchInAnswer": {
                "enabled": true,
                "notifyUser": false,
                "responseType": "relevantWithReadMore",
                "customReadMoreURL": "aa",
                "useCustomReadMoreURL": true
            }
        }
    ],
    "mlParams": {
        "intentParams": {
            "features": "skip_gram",
            "skip_gram": {
                "seqLength": 3,
                "maxSkipDistance": 2
            }
        },
        "mlConfigurations": {
            "NoneIntent": false
        }
    },
    "nlSettings": {
        "enableAutoUtteranceAddition": false,
        "enableNegativePatterns": true
    }
}'
```

## Body Parameters

The parameters depend on the threshold configuration that needs to be updated.

### Machine Learning Engine

```json expandable=true theme={null}
{
    "configurations": [
        {
            "mode": "ml",
            "exactMatchThreshold": 90,
            "minThreshold": 0.4
        }
    ],
    "mlParams": {
        "intentParams": {
            "useSynonyms": true,
            "useStopwords": true,
            "usePlaceholders": true,
            "features": "skip_gram",
            "skip_gram": {
                "seqLength": 2,
                "maxSkipDistance": 1
            }
        },
        "nerParams": {
            "type": "corenlp"
        }
    }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.