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

# Test and Debug External NLU

<Badge icon="arrow-left" color="gray">[Back to External NLU Integrations](/ai-for-service/integrations/overview#external-nlu)</Badge>

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](external-nlu-adapters.md#adapter-configuration) and [enabling the Dialogflow API](dialogflow-engine.md#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**.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img1.png" alt="Debug Log - intent identified using External NLU is initiated" />

***

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

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img2.png" alt="Intent detected by the External NLU engine" />

* If intent is not 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.

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/ktrace.png" alt="K-Traceid and X-Traceid" />

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

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img3.png" alt="Session Context & Variables" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img4.png" alt="Custom Variables" />

***

## Utterance Testing

[Utterance Testing](../../../automation/testing/testing-your-bot-with-nlp.md) provides NLP Analysis for individual utterances. When intent is detected by an external engine, the utterance is not sent to the Kore.ai NLP engine, and the **Matched Intents** and **Fields/Entities** tables are not shown.

* **Intent detected by external engine:**

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img5.png" alt="Intent detected by external engine" />

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

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img6.png" alt="View the API response in JSON format" />

* **Intent not detected by external engine** — Kore.ai NLU acts as fallback. NLP analysis shows results from all three Kore.ai engines plus ranking and resolver. See [Ranking and Resolver](../../../automation/natural-language/training/ranking-and-resolver.md).

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img7.png" alt="Intent not detected by external engine" />

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

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img8.png" alt="Intent detected but cannot be mapped" />

***

## Batch Testing

Test results (TP, FP, TN, FN) are based on the combined outcome of External NLU and Kore.ai 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 are not included in comparisons — there is no common scoring baseline across engines.</Note>

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.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img9.png" alt="ExtNLU Matched intent score" />

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

See [Batch Testing](../../../automation/testing/regression-testing/batch-testing.md) 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 Kore.ai platform, not the external engine.
</Note>

<img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img10.png" alt="Intents and Entities identified by External NLU" />

See [Health and Monitoring](../../../automation/testing/regression-testing/health-and-monitoring/virtual-assistants-health-and-monitoring.md) 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.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/images/external-nlu-test-and-debug-img11.png" alt="Failed External NLU API calls" />

See [NLP Insights](../../../analytics/automation/nlp-insights.md) 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, Kore.ai 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](../../../automation/intelligence/conversation-management/manage-interruptions.md).                                                                          |
| 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](../../../automation/intelligence/conversation-management/default-conversations.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>

<Note>Intent and entity mapping uses case-insensitive name comparison between the two platforms.</Note>

***

## 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 Kore.ai platform, utterances are sent to External NLU for intent detection along with the parent intent context.


Built with [Mintlify](https://mintlify.com).