> ## 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.

# Test and Debug External NLU

[Back to External NLU Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#external-nlu)

Use these tools to validate that your External NLU adapter is working correctly and to understand intent detection behavior.

***

## Test in Talk to Bot

After completing [Adapter Configuration](https://koreai.mintlify.site/ai-for-service/integrations/external-nlu/external-nlu-adapters#adapter-configuration) and [enabling the Dialogflow API](https://koreai.mintlify.site/ai-for-service/integrations/external-nlu/dialogflow-engine#enable-the-dialogflow-api):

1. Open your app and click **Test**.
2. Enter a user utterance that matches an intent configured in Dialogflow Essentials.
3. In the **Debug Log** panel, confirm the message: **intent identified using External NLU is initiated**.

![Debug Log - intent identified using External NLU is initiated](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img1.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=fe6ee70fe111ab14982f3d41386bf769)

***

## Debug Log

The Debug Log shows whether intent was detected by External NLU before the **Intent node initiated** entry. If the API call fails, an error response appears in the log.

* Intent detected by the external NLU engine is always marked as a **Definitive Match**.

  ![Intent detected by the External NLU engine](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img2.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=3771015b85e8f67c55b78910fb00aac0)

* If intent isn't detected by External NLU, this is also tracked in the Debug Log.

* Hover over the information icon to view the **K-Traceid** and **X-Traceid** for each interaction. K-Traceid tracks and debugs platform activities; X-Traceid is a unique per-message identifier included in platform logs.

  ![K-Traceid and X-Traceid](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/ktrace.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=c84c5386afbc5269491f2975560ee74c)

* Under **Session Context & Variables**, inspect intent and entity variables in detail.

  ![Session Context & Variables](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img3.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=4c22fc03a87261c0331593455ca83189)

  ![Custom Variables](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img4.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=765914a54ce6f2f926a2d57e1081aa06)

***

## Utterance Testing

[Utterance Testing](https://koreai.mintlify.site/ai-for-service/automation/testing/testing-your-bot-with-nlp) provides NLP Analysis for individual utterances. When intent is detected by an external engine, the utterance isn't sent to the Platform NLP engine, and the **Matched Intents** and **Fields/Entities** tables aren't shown.

* **Intent detected by external engine:**

  ![Intent detected by external engine](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img5.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=1e86911ec3cb71983af8e4be923cd3eb)

* Click **View Response** to see the raw API response from the external NLU engine (available whether or not intent was detected).

  ![View the API response in JSON format](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img6.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=a3066f3245a9d06bbfed2c216b049209)

* **Intent not detected by external engine** — Platform NLU acts as fallback. NLP analysis shows results from all three Platform engines plus ranking and resolver. See [Ranking and Resolver](https://koreai.mintlify.site/ai-for-service/automation/natural-language/training/ranking-and-resolver).

  ![Intent not detected by external engine](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img7.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=e82f4681c976e6e3d650b408200de9c0)

* **Intent detected but not mappable** — Platform NLU acts as fallback. NLP analysis displays a message with the API response containing detected intents and parameters.

  ![Intent detected but can't be mapped](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img8.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=4268175d06dbcd069cf06f3a0c568ad3)

***

## Batch Testing

Test results (TP, FP, TN, FN) are based on the combined outcome of External NLU and Platform NLU:

| Result | Condition |
| - | - |
| TP | Expected intent detected by either engine |
| FP | Wrong intent identified by the net result |
| TN | No intent detected by any engine (none expected) |
| FN | No intent expected, but some intent was detected |

> [!NOTE]
>
> External NLU scores aren't included in comparisons — there is no common scoring baseline across engines.

In the **Matched Intent Score** column of the downloaded CSV, intents detected by External NLU appear as `ExtNLU` (no score) instead of ML, FM, or KG scores.

![ExtNLU Matched intent score](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img9.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=1772447338dc9a5b2bc35c4ad8e200da)

If External NLU returns multiple intents, thresholds are evaluated for all of them before concluding the test result.

See [Batch Testing](https://koreai.mintlify.site/ai-for-service/automation/testing/regression-testing/batch-testing) for more details.

***

## Health and Monitoring

Go to **Test Cases > Detailed Analysis** to see intents and entities identified by External NLU (displayed without scores). The Traits engine operates independently of external NLU.

> [!NOTE]
>
> When external NLU is enabled, some Health and Monitoring recommendations may not apply — recommendations are based on training data in the Platform, not the external engine.

![Intents and Entities identified by External NLU](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img10.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=ebc74f63ac16cf1259e66cd4bb2b6d86)

See [Health and Monitoring](https://koreai.mintlify.site/ai-for-service/automation/testing/regression-testing/health-and-monitoring/virtual-assistants-health-and-monitoring) for more details.

***

## NLP Insights

NLP Insights captures intent identified and not-identified utterances with their NLP analysis. Failed External NLU API call details appear in the debug logs of NLP Insights.

![Failed External NLU API calls](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img11.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=3f8c20ee70e6e484524019e1e827177e)

See [NLP Insights](https://koreai.mintlify.site/ai-for-service/analytics/automation/nlp-insights) for more details.

***

## Conversation Behavior

| Behavior | Details |
| - | - |
| Intent triggering | When an intent is detected by the external engine, the corresponding Kore.ai task is triggered based on name mapping (case-insensitive). |
| Detection quality | Depends on training and capabilities of the external engine. |
| Fallback | If external NLU fails to detect an entity, Platform NLP engine is used as fallback. |
| Entity ordering | Define entity nodes in the same sequence on both the platform and the external engine. |
| Interruption handling | Only one behavior is supported: **Switch to a new task without notification and discard the current task**. See [Interruption Management Settings](https://koreai.mintlify.site/ai-for-service/automation/intelligence/conversation-management.md#manage-interruptions). |
| API failure | If External NLU API returns an error or is unreachable, a fallback intent activates with the response: **Error in continuing the conversation due to incorrect bot definition**. See [Standard Responses](https://koreai.mintlify.site/ai-for-service/automation/intelligence/conversation-management.md#standard-responses). |

The platform handles all other conversation behaviors, including:

* Re-prompts, error prompts, message responses, widgets
* Channel support and channel-specific customizations
* Authorization for service calls, alerts, small talk
* Language detection, sentiment analysis, traits identification
* Sub-intent and follow-up intent scanning decisions
* Interruption handling, entity/intent priority settings
* PII masking/redaction
* Dialog task node execution, context object construction
* Response messages, fulfillment, and logical flows

> [!NOTE]
>
> Response messages and fulfillment data from the external engine are ignored.

> [!NOTE]
>
> Intent and entity mapping uses case-insensitive name comparison between the two platforms.

***

## Follow-up and Sub-Intent Identification

* When all required parameters are available in context, follow-up intent scope activates on External NLU. Once active, utterances are sent to External NLU for intent identification.
* When sub-intent scope is active on the Platform, utterances are sent to External NLU for intent detection along with the parent intent context.


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