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.
Supported LLM providers
You can choose from the following large language model (LLM) providers:
- AzureOpenAI
- OpenAI
- Mistral
- Mesolitica – MaLLaM - This LLM provider is available in DRUID 9.1 and higher.
DRUID-dedicated LLM resources
- Druid Becus 3.0 / 1.0 (Proprietary LLM)
- Azure OpenAI - gpt-4o-mini
- Mistral
- Google Vertex AI
If you want to use DRUID-dedicated LLM resources, contact your sales representative to activate them for your tenant.
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:
- Navigate to NLU > Configurations > Intents tab.
- Click on Thresholds and parameters.
- Add the NLU.NER.Classification.ModelType parameter and set it to LLM.
- 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.
- Select the Client Type.
- For custom endpoints, enter the URL of the generative API.
- Provide the secret key generated in your generative account.
- Specify the generative model name.
- If you selected Google as Client Type, enter the Location of the location for a Vertex AI and your Google Project Id.
- For both prompts, click the Set default button. The default DRUID prompts will be automatically filled in.
- Click Save at the bottom of the page to apply the NLU configuration.
Click the link that appears in the message below the NLP parameters. The NLU Intents Classification with LLM expands.
Once configured, the model uses the two prompts to classify user intents automatically.