Question Classifier
Last updated
Last updated
Uses defined classification descriptions to allow the LLM to categorise user input.
Common use cases include customer service conversation intent classification, product review classification, and bulk email classification.
The workflow example below is designed to automate customer support for smart devices. This system efficiently manages user queries by logically connecting nodes that classify, process, and respond to issues.
In this scenario, we set up three classification labels/descriptions:
CLASS 1: Questions related to hardware
CLASS 2: Questions related to software
CLASS 3: Other questions
When users input different questions, a model like GPT-4 can analyze the customer's query and classify whether the issue is related to software or hardware.
Query: "My smart camera's lens is blurry, how can I fix it?" —> "Questions related to hardware"
Query: "How do I reinstall the app for my smart light system?" —> "Questions related to software"
Query: "What payment methods do you accept?" —> Other questions
Configuration Steps:
Input Variables: This refers to the content that needs to be classified. Since this Customer Service is a type of Chatflow, the input variable will be sys.query
, which represents the user's input or query within the context of a conversational application.
Choose Inference Model: The issue classifier uses large language models to classify and infer meaning. Choosing the right model can improve how well it works.
Write Classification Labels: You can manually add multiple classifications by writing keywords or descriptive statements for each category, helping the large language model better understand the classification criteria.
Instructions: In Advanced Settings - Instructions, you can add supplementary instructions, such as more detailed classification criteria, to enhance the classifier's capabilities.
Memory: When enabled, each input to the issue classifier will include chat history from the conversation to help the LLM understand the context and improve question comprehension in interactive dialogues.
Memory Window: When the memory window is closed, the system dynamically filters the amount of chat history passed based on the model's context window; when open, users can precisely control the amount of chat history passed (in terms of numbers).
Output Variable:
class_name
This is the classification name output after classification. You can use the classification result variable in downstream nodes as needed.
Query: "How do I reinstall the app for my smart light system?"
Classification Result: The issue classifier processes this input and determines that it is a "Software Issue." The class_name
variable would then hold the value "Software Issue."
For example: