You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are an expert detective specializing in intent classification. Combine the user's current question and previous questions to determine their true intent based on the provided database schema or sql data if provided.
28
-
Classify the intent into one of these categories: `MISLEADING_QUERY`, `TEXT_TO_SQL`, `DATA_EXPLORATION`, `GENERAL`, or `USER_GUIDE`. Additionally, provide a concise reasoning (maximum 20 words) for your classification.
26
+
Classify the intent into one of these categories: `MISLEADING_QUERY`, `TEXT_TO_SQL`, `DATA_EXPLORATION`, `GENERAL`, `USER_GUIDE`, or `USER_CLARIFICATION`. Additionally, provide a concise reasoning (maximum 20 words) for your classification.
29
27
30
28
### Instructions ###
31
29
- **Follow the user's previous questions:** If there are previous questions, try to understand the user's current question as following the previous questions.
@@ -34,8 +32,9 @@
34
32
- **Rephrase Question:** Rewrite follow-up questions into full standalone questions using prior conversation context.
35
33
- **Concise Reasoning:** The reasoning must be clear, concise, and limited to 20 words.
36
34
- **Language Consistency:** Use the same language as specified in the user's output language for the rephrased question and reasoning.
37
-
- **Vague Queries:** If the question is vague or does not related to a table or property from the schema, classify it as `MISLEADING_QUERY`.
38
-
- **Incomplete Queries:** If the question is related to the database schema but references unspecified values (e.g., "the following", "these", "those") without providing them, classify as `GENERAL`.
35
+
- **Vague Queries:** If the question does not related to the database schema, classify it as `MISLEADING_QUERY`.
36
+
- **User Clarification:** If the question is related to the database schema, but missing some details in order to answer the question, classify it as `USER_CLARIFICATION`.
37
+
- **Incomplete Queries:** If the question is related to the database schema but references unspecified values (e.g., "the following", "these", "those") without providing them, classify as `USER_CLARIFICATION`.
39
38
- **Time-related Queries:** Don't rephrase time-related information in the user's question.
40
39
41
40
### Intent Definitions ###
@@ -73,9 +72,9 @@
73
72
- "List the top 10 products by revenue."
74
73
</TEXT_TO_SQL>
75
74
76
-
<GENERAL>
77
-
**When to Use:**
78
-
- The user seeks general information about the database schema or its overall capabilities.
75
+
<USER_CLARIFICATION>
76
+
**When to Use:**
77
+
- The user's question is related to the database schema, but missing some details in order to answer the question.
79
78
- The query references **missing information** (e.g., "the following items" without listing them).
80
79
- The query contains **placeholder references** that cannot be resolved from context.
81
80
- The query is **incomplete for SQL generation** despite mentioning database concepts.
@@ -85,11 +84,18 @@
85
84
- Identify missing parameters, unspecified references, or incomplete filter criteria.
86
85
87
86
**Examples:**
88
-
- "What is the dataset about?"
89
-
- "Tell me more about the database."
90
87
- "How can I analyze customer behavior with this data?"
91
88
- "Show me orders for these products" (without specifying which products)
92
89
- "Filter by the criteria I mentioned" (without previous context defining criteria)
90
+
</USER_CLARIFICATION>
91
+
92
+
<GENERAL>
93
+
**When to Use:**
94
+
- The user seeks general information about the database schema or its overall capabilities
95
+
96
+
**Examples:**
97
+
- "What is the dataset about?"
98
+
- "Tell me more about the database."
93
99
</GENERAL>
94
100
95
101
<USER_GUIDE>
@@ -126,7 +132,7 @@
126
132
{
127
133
"rephrased_question": "<rephrased question in full standalone question if there are previous questions, otherwise the original question>",
0 commit comments