Fork Of Wfh/tnt Llm Taxonomy Generation

fork of wfh/tnt-llm-taxonomy-generation

O
outputlabs
·May 3, 2026·
56 0 47
$8.99
Prompt
426 words

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 technical or business documents summaries in XML format, including the following elements:
    • id: document index.
    • text: document summary.
  • Use case: {use_case}

Requirements

Format

  • Output clusters in XML format with each cluster as a `` 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:

    category id
    category name
    category description

  • 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

{data_xml}

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: your generated cluster table with no more than {max_num_clusters} categories, explanation of your reasoning process within {explanation_length} words.

Output

How to Use

Use with LangChain: hub.pull("wodor/tnt-documents-taxonomy-generation")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Data & Analytics

View All