Back to prompts

tnt-llm-taxonomy-generation

classification0 savesSource

Adapted from: https://arxiv.org/abs/2403.12173

Prompt Text

# Instruction
## Context
- **Goal**: Your goal is to cluster the input data into meaningful categories for the given use case.
- **Data**: The input data will be a list of human-AI conversation summaries in XML format, including the following elements:
  - **id**: conversation index.
  - **text**: conversation summary.
- **Use case**: {use_case}
## Requirements
### Format
- Output clusters in **XML format** with each cluster as a `<cluster>` element, containing the following sub-elements:
  - **id**: category number starting from 1 in an incremental manner.
  - **name**: category name should be **within {cluster_name_length} words**. It can be either verb phrase or noun phrase, whichever is more appropriate.
  - **description**: category description should be **within {cluster_description_length} words**.
Here is an example of your output:
```xml
<clusters>
  <cluster>
    <id>category id</id>
    <name>category name</name>
    <description>category description</description>
  </cluster>
</clusters>
```
- Total number of categories should be **no more than {max_num_clusters}**.
- Output should be in **English** only.
### Quality
- **No overlap or contradiction** among the categories.
- **Name** is a concise and clear label for the category. Use only phrases that are specific to each category and avoid those that are common to all categories.
- **Description** differentiates one category from another.
- **Name** and **description** can **accurately** and **consistently** classify new data points **without ambiguity**.
- **Name** and **description** are *consistent with each other*.
 Output clusters match the data as closely as possible, without missing important categories or adding unnecessary ones.
- Output clusters should strive to be orthogonal, providing solid coverage of the target domain.
- Output clusters serve the given use case well.
- Output clusters should be specific and meaningful. - - Do not invent categories that are not in the data.


# Data
<conversations>
{data_xml}
</conversations>

# Questions
## Q1. Please generate a cluster table from the input data that meets the requirements.
Tips
- The cluster table should be a **flat list** of **mutually exclusive** categories. Sort them based on their semantic relatedness.
- Though you should aim for {max_num_clusters} categories, you can have *fewer than {max_num_clusters} categories* in the cluster table;  but **do not exceed the limit.** 
- Be **specific** about each category. **Do not include vague categories** such as "Other", "General", "Unclear", "Miscellaneous" or "Undefined" in the cluster table.
- You can ignore low quality or ambiguous data points.
## Q2. Why did you cluster the data the way you did? Explain your reasoning **within {explanation_length} words**.
## Provide your answers between the tags: <cluster_table>your generated cluster table with no more than {max_num_clusters} categories</cluster_table>, <explanation>explanation of your reasoning process within {explanation_length} words</explanation>.
# Output

Evaluation Results

1/28/2026
Overall Score
2.81/5

Average across all 3 models

Best Performing Model
Low Confidence
anthropic:claude-3-5-haiku
3.03/5
anthropic:claude-3-5-haiku
#1 Ranked
3.03
/5.00
adh
2.3
cla
4.8
com
2.0
In
4,458
Out
1,266
Cost
$0.0086
openai:gpt-5-mini
#2 Ranked
2.95
/5.00
adh
2.5
cla
4.0
com
2.3
In
4,122
Out
4,092
Cost
$0.0092
google:gemini-2.5-flash-lite
#3 Ranked
2.45
/5.00
adh
1.5
cla
4.4
com
1.4
In
4,290
Out
2,386
Cost
$0.0014
Test Case:

Tags