CLU endpoint call returns 404 and bot variable clu_result is not defined during Switch step

Suma Nalluri 0 Reputation points
2025-11-18T19:46:30.3633333+00:00

Screenshot 2025-11-19 153028.png

I am integrating a Custom Conversational Language Understanding (CLU) model with my Azure Health Bot scenario. The bot is supposed to capture the user’s query, send it to CLU, store the response in clu_result, and then route the flow using a Switch based on clu_result.result.prediction.topIntent.

However, the CLU call is consistently failing, and the bot trace shows two critical errors:

  1. “Call for LU model failed. AxiosError: Request failed with status code 404.”

“clu_result is not defined.”

Because the CLU call fails with a 404 error, the clu_result variable is never created, so the Switch step also fails.

I have already confirmed the following settings in the Language Understanding action:

Endpoint matches the CLU resource (from Azure portal → Keys & Endpoint).

Subscription Key is correct.

Project Name is exactly “healthbot”.

Deployment Name is exactly “health_bot_deployment”.

API Version is set to 2023-04-01, which matches the CLU documentation.

Input utterance is set to the prompt variable “freeText”.

Despite these being correct, the bot still cannot reach the CLU model and continues to return a 404 response, preventing the scenario from functioning.

I need assistance identifying why the bot cannot reach the CLU endpoint and resolving the 404 + undefined variable issue so that the CLU prediction can be retrieved successfully.I am integrating a Custom Conversational Language Understanding (CLU) model with my Azure Health Bot scenario. The bot is supposed to capture the user’s query, send it to CLU, store the response in clu_result, and then route the flow using a Switch based on clu_result.result.prediction.topIntent.

However, the CLU call is consistently failing, and the bot trace shows two critical errors:

“Call for LU model failed. AxiosError: Request failed with status code 404.”

“clu_result is not defined.”

Because the CLU call fails with a 404 error, the clu_result variable is never created, so the Switch step also fails.

I have already confirmed the following settings in the Language Understanding action:

Endpoint matches the CLU resource (from Azure portal → Keys & Endpoint).

Subscription Key is correct.

Project Name is exactly “healthbot”.

Deployment Name is exactly “health_bot_deployment”.

API Version is set to 2023-04-01, which matches the CLU documentation.

Input utterance is set to the prompt variable “freeText”.

Despite these being correct, the bot still cannot reach the CLU model and continues to return a 404 response, preventing the scenario from functioning.

I need assistance identifying why the bot cannot reach the CLU endpoint and resolving the 404 + undefined variable issue so that the CLU prediction can be retrieved successfully.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
{count} votes

1 answer

Sort by: Most helpful
  1. Suma Nalluri 0 Reputation points
    2025-12-03T21:12:39.62+00:00

    Hi, I’m still facing the same 404 error, and I also wanted to mention another issue I’m running into: the bot shows clu_result is not defined even though the CLU call and variables are configured.

    Here’s everything I’ve tried so far:

    I verified all my CLU configuration settings inside the bot.

    I changed the CLU endpoint URL multiple times and tested different URL formats.

    I even used the exact Prediction URL from Language Studio, but it still returns a 404 every time.

    I double-checked the project name, deployment name, region, and both keys.

    I deleted and re-added the variables to make sure there were no typos.

    Even after all of that, the bot continues to show the same 404 error, and the expression clu_result is not defined also appears, even though it is already referenced in the CLU action step.

    I’m not sure what else I can try at this point. Since I’ve tested multiple endpoints, confirmed the configuration, and revalidated all variables, it seems like something else is causing both the 404 and the variable definition issue.

    Could you please let me know if there are any additional troubleshooting steps, hidden configuration requirements, or known backend issues that could cause this behavior? Any guidance would be greatly appreciated.

    Thank you.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.