> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.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](/ai-for-service/integrations/external-nlu/external-nlu-adapters#adapter-configuration) and [enabling the Dialogflow API](/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**.

<img src="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" alt="Debug Log - intent identified using External NLU is initiated" width="1906" height="731" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img1.png" />

***

## 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://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" alt="Intent detected by the External NLU engine" width="993" height="482" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img2.png" />

* 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://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/ktrace.png?fit=max&auto=format&n=aWGmDC4TMVyNnT1F&q=85&s=c84c5386afbc5269491f2975560ee74c" alt="K-Traceid and X-Traceid" width="1920" height="827" data-path="ai-for-service/integrations/external-nlu/images/ktrace.png" />

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

  <img src="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" alt="Session Context & Variables" width="1068" height="512" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img3.png" />

  <img src="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" alt="Custom Variables" width="1097" height="820" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img4.png" />

***

## Utterance Testing

[Utterance Testing](/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 is not sent to the Platform NLP engine, and the **Matched Intents** and **Fields/Entities** tables are not shown.

* **Intent detected by external engine:**

  <img src="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" alt="Intent detected by external engine" width="1589" height="589" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img5.png" />

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

  <img src="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" alt="View the API response in JSON format" width="1554" height="709" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img6.png" />

* **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](/ai-for-service/automation/natural-language/training/ranking-and-resolver).

  <img src="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" alt="Intent not detected by external engine" width="1565" height="787" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img7.png" />

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

  <img src="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" alt="Intent detected but cannot be mapped" width="1565" height="725" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img8.png" />

***

## 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 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://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" alt="ExtNLU Matched intent score" width="1858" height="155" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img9.png" />

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

See [Batch Testing](/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.
</Note>

<img src="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" alt="Intents and Entities identified by External NLU" width="1075" height="596" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img10.png" />

See [Health and Monitoring](/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.

<img src="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" alt="Failed External NLU API calls" width="1659" height="796" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-test-and-debug-img11.png" />

See [NLP Insights](/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](/ai-for-service/automation/intelligence/conversation-management/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](/ai-for-service/automation/intelligence/conversation-management/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 Platform, utterances are sent to External NLU for intent detection along with the parent intent context.
