NLU Intents Classification with LLM

NLU intents classification with LLM enables intent classification using a large language model (LLM). This model automatically learns from flow intents and training phrases, reducing the need for manual classification. It is built into the Flow Predict Engine, enhancing accuracy and adaptability in intent recognition.

Note:  This feature is available as technology preview in DRUID 8.10 and higher. NLU intents classification with LLM currently does not support Named Entity Recognition (NER).

How It Works

When NLU intents classification with LLM is configured, the system leverages a LLM for intent classification using two key prompts:

  • System prompt: Instructs the LLM to classify a user query by scoring provided intents based on relevance, adhering to strict JSON formatting and predefined scoring rules while considering both user-supplied and system intents.
  • User prompt: Provides the intent list and user query, ensuring the model has the necessary context for classification.

Configure NLU Intents Classification with LLM

To configure NLU intents classification with LLM, follow these steps:

  1. Navigate to NLU > Configurations > Intents tab.
  2. Click on Thresholds and parameters.
  3. Add the NLU.NER.Classification.ModelType parameter and set it to LLM.
  4. Click the link that appears in the message below the NLP parameters. The NLU Intents Classification with LLM expands.

  5. From the Endpoint Type field, select Druid if you have a LLM subscription with DRUID or Custom if you're using your own generative endpoint.
  6. Select the Client Type.
  7. For custom endpoints, enter the URL of the generative API.
  8. Provide the secret key generated in your generative account.
  9. Specify the generative model name.
  10. If you selected Client Type is Google, enter the Location of the location for a Vertex AI and your Google Project Id.
  11. Note:  Google Vertex AI is available in DRUID 8.13 and higher.
  12. For both prompts, click the Set default button. The default DRUID prompts will be automatically filled in.
  13. Hint:  Since this feature is in technology preview, you can experiment with the prompts, provided their JSON structure remains unchanged. In an upcoming release, the prompts will become non-editable.
  14. Click Save at the bottom of the page to apply the NLU configuration.

Once configured, the model uses the two prompts to classify user intents automatically.

Important!  When using NLU intents classification with LLM, it’s important to separate natural language training phrases from technical commands. To avoid introducing noise into intent detection, move any technical training phrases—such as exact keywords, system triggers, or command-like inputs — into the Commands section of the respective flow. These phrases will then be matched exactly, without affecting the NLP model's understanding of user intent. Commands are available in DRUID 8.14 and higher.