mlsanityData to 14 Oct 2026

Hierarchical Text Classification Using Black Box Large Language Models

arXiv 2508.04219 ↗First posted 6 Aug 2025cs.CL cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Hierarchical Text Classification (HTC) aims to assign texts to structured label hierarchies; however, it faces challenges due to data scarcity and model complexity. This study explores the feasibility of using black box Large Language Models (LLMs) accessed via APIs for HTC, as an alternative to traditional machine learning methods that require extensive labeled data and computational resources. We evaluate three prompting strategies -- Direct Leaf Label Prediction (DL), Direct Hierarchical Label Prediction (DH), and Top-down Multi-step Hierarchical Label Prediction (TMH) -- in both zero-shot and few-shot settings, comparing the accuracy and cost-effectiveness of these strategies. Experiments on two datasets show that a few-shot setting consistently improves classification accuracy compared to a zero-shot setting. While a traditional machine learning model achieves high accuracy on a dataset with a shallow hierarchy, LLMs, especially DH strategy, tend to outperform the machine learning model on a dataset with a deeper hierarchy. API costs increase significantly due to the higher input tokens required for deeper label hierarchies on DH strategy. These results emphasize the trade-off between accuracy improvement and the computational cost of prompt strategy. These findings highlight the potential of black box LLMs for HTC while underscoring the need to carefully select a prompt strategy to balance performance and cost.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 12 of its 19 references that are in the map. First posted on arXiv 6 Aug 2025.

Builds on

12 of 19 references.

References · 12

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2023A Survey on Evaluation of Large Language Modelscited by 1,242
  4. 2022TabLLM: Few-shot Classification of Tabular Data with Large Language Modelscited by 277
  5. 2023Time Travel in LLMs: Tracing Data Contamination in Large Language Modelscited by 177
  6. 2017HDLTex: Hierarchical Deep Learning for Text Classificationcited by 106
  7. 2023Large Language Models Are Zero-Shot Text Classifierscited by 35
  8. 2022HPT: Hierarchy-aware Prompt Tuning for Hierarchical Text Classificationcited by 31
  9. 2024TELEClass: Taxonomy Enrichment and LLM-Enhanced Hierarchical Text Classification with Minimal Supervisioncited by 25
  10. 2024Retrieval-style In-Context Learning for Few-shot Hierarchical Text Classificationcited by 16
  11. 2023Hierarchical Verbalizer for Few-Shot Hierarchical Text Classificationcited by 11
  12. 2023A Simple and Effective Framework for Strict Zero-Shot Hierarchical Classificationcited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.