Organizations: Zhejiang Lab, Hangzhou, China · School of Computer Science and Software Engineering, Harbin Institute of Technology, China · School of Mechanical Engineering, Shanghai Jiao Tong University, China
Flagship large language models (LLMs) offer rich general knowledge and strong reasoning capabilities, but their high inference cost and latency limit their use for large-scale data labeling. We study zero-shot text classification with semantically meaningful labels and task descriptions, without task-specific labeled examples or classifier feedback. We propose SLKR (Semantic Label Knowledge Retrieval), a label-centric retrieval-augmented generation framework that separates offline knowledge construction from lightweight online inference. Offline, a flagship LLM independently generates label definitions, retrieval keywords, and boundary rules for potentially confusable label pairs, forming a reusable label-knowledge store. Because this construction operates over the label space rather than the input corpus, its one-time flagship cost can be amortized across large-scale inference. Online, hybrid semantic and lexical retrieval first identifies the top-K candidate labels and then selects up to M input-relevant boundary rules connecting candidate-label pairs. A lightweight LLM performs the final classification in a single call using the retrieved definitions and rules. Across three public benchmarks and a real-world multilingual book-classification dataset, SLKR achieves the best results on all four datasets with Qwen3.5-4B and on three of four with Ministral-3-3B, while using compact input contexts and no task-specific labeled examples. Boundary ablations further show that retrieving a small set of input-relevant rules preserves performance close to using all boundaries with substantially less context, supporting efficient reuse of flagship-generated label knowledge for lightweight classification.
Figures & tables
Figure 1: SLKR overview. Three independent flagship augmentations receive the same original label inventory and task scope, producing definitions ( D ), keywords ( W ), and boundary rules ( B ). Online, hybrid Top- K label retrieval is followed by candidate-pair filtering, deduplication, and hybrid Top- M rule retrieval. One lightweight LLM reads the input, candidate definitions/scope, and selected rules.
Family
Design
No External Data
Label Knowledge
Boundary Aware
Provided / Retrieved Content
Prompting
Zero-shot
✓
✗
✗
Label names and task description
Few-shot
✗
✗
✗
Text–label demonstrations
Retrieval- based
Retrieved ICL
✗
✗
✗
Retrieved text–label demonstrations
Document RAG
✗
✗
✗
Retrieved document passages
SLKR (ours)
✓
✓
✓
Label knowledge and boundary rules
Table 1: Comparison of prompting and retrieval-based paradigms for LLM classification. “No External Data” denotes no reliance on labeled examples or an external corpus.
Figure 2: Candidate-conditioned boundary retrieval ( K=5 , M=3 ). Fourteen eligible copies yield seven unique rules after deduplication. The table shows illustrative semantic similarities and first-occurrence positions; selection combines semantic and lexical ranks using RRF. The graphs retain all five candidate labels while selecting three rules for shared reader context. Scores and candidate order are schematic, not measured results.
Table 2: Datasets, label counts, evaluation splits, and roles.
Dataset
R@3
R@5
R@10
R@15
BANKING77
74.74
83.51
94.29
97.18
CLINC150
86.24
92.38
96.47
97.47
WOS-143
79.49
87.81
94.45
95.90
Book-38
73.74
81.38
97.39
98.32
Table 3: First-stage label retrieval recall (%).
Model
Method
WOS-143
BANKING77
CLINC150
Book-38
Avg. Input Tokens
Qwen3.5-4B
Label only – ZS
57.10 / 56.54
68.77 / 66.99
80.36 / 78.94
64.25 / 57.04
0.9k
Gen-Z (Label + definition)
57.37 / 57.06
72.95 / 71.58
85.64 / 84.66
61.45 / 60.81
2.7k
1-shot / label
58.67 / 57.88
74.84 / 73.86
89.07 / 88.66
68.16 / 65.57
4.7k
Retrieved ICL
59.67 / 57.92
75.29 / 74.40
89.24 / 88.92
67.60 / 68.08
1.2k
SLKR-Desc ( M=0 )
59.92 / 57.67
77.05 / 75.99
89.13 / 88.57
66.85 / 66.24
1.0k
SLKR ( M=5 )
60.17 / 58.20
77.45 / 76.63
89.81 / 89.33
70.58 / 70.25
1.4k
Table 4: Classification accuracy / macro-F1 (%). Bold marks the best results within each model. Input tokens are averaged across the three public datasets.
Boundary policy
WOS-143
BANKING77
CLINC150
Book-38
Boundary tokens
No boundary ( M=0 )
59.92±0.0757.67±0.07
77.05±0.0075.99±0.01
89.13±0.0388.57±0.03
66.85±0.3266.24±1.62
0
All boundaries
60.36±0.0858.34±0.04
77.47±0.1776.82±0.20
89.95±0.2589.44±0.25
67.04±0.0064.71±0.18
2.51k
Random M=5
58.72±0.3556.92±0.31
76.69±0.0675.78±0.09
89.41±0.1888.88±0.17
66.48±0.5662.55±2.04
0.36k
Hybrid Top- M=5
60.17±0.0558.20±0.04
77.45±0.0276.63±0.02
89.81±0.0389.33±0.03
70.58±0.3270.25±0.17
0.35k
Table 5: Boundary retrieval ablation at K=15 . Each cell reports accuracy (top) and macro-F1 (bottom), in %. Boundary tokens denote the average per-input boundary context.
Method
Builder
Reader
Accuracy / F1
Build Cost
Online Cost / 1k
Amortized Cost / 1k
Direct Flagship
None
GPT-5.6-sol
86.01 / 85.30
0
4.111
4.111
SLKR
GPT-5.6-sol
Qwen-3.5-4B
77.45 / 76.63
3.4
0.0596
0.4276
Table 6: Flagship–lightweight cost comparison on BANKING77. Amortized cost is computed over three complete BANKING77 test-set runs (9240 classifications in total). Costs are reported in USD.
Zero-shot text classification assigns texts to categories without task-specific labeled training data, using language models, embeddings, or label descriptions.
Large language models (LLMs) struggle to classify text into taxonomies with many semantically similar labels, as the distinctions are domain-specific and not captured by pre-training. To handle large label spaces, a common approach retrieves top-K candidate labels by embedding similarity and prompt the LLM to choose among them. However, top-K retrieval reduces the number of candidates but does not help the model tell similar ones apart. When two similar labels both appear as candidates, the model lacks the signal to choose correctly between them. We propose a framework that (1) identifies which label pairs the model struggles to distinguish, (2) expands the candidate set to include confusable labels, and (3) generates targeted rules to differentiate between similar candidates. The framework requires no fine-tuning, and the generated rules transfer to smaller, cheaper models. On three benchmarks (WOS, Flipkart, LEDGAR), our approach improves Macro F1 by up to 10.0pp over retrieval baselines, with smaller models (2B--20B) gaining up to 11.5pp via cross-model transfer.
Multi-label topic classification without labeled training data is a challenging task, specially when documents contain complex relational information. We present a zero-shot multi-label topic classification framework and systematically investigate how per-article knowledge graph augmentation affects its performance. The base framework classifies topics in documents without labeled training data and has four variants: article-only classification, keyword-enhanced classification, and self-consistency decoding variants of both. Then, we augment each base variant with per article knowledge graph. This graph is extracted from the input document through a pipeline similar to KGGen based on subject-predicate-object triples. We test all eight methods, four base and four graph augmented on fifteen LLMs and eight multi-label datasets across different domains. For the base framework, keyword-enhanced classification (AK) is the best performing method, and six out of fifteen LLMs surpass the sentence-encoder baseline. Graph augmentation has positive and negative impacts on small and large models, respectively. This shows that larger models already contain enough relational information from pretraining. Furthermore, the self-consistency decoding variant does not show performance improvements in any experiment while increasing computation costs about fivefold.
Shahana Akter, Yatharth Vohra, Ankita Shukla +1
A2I Lab, School of Computing, Wichita State University · EIS Lab, College of Engineering, University of Nevada, Reno
Zero-shot text classification (ZSC) offers the promise of eliminating costly task-specific annotation by matching texts directly to human-readable label descriptions. While early approaches have predominantly relied on cross-encoder models fine-tuned for natural language inference (NLI), recent advances in text-embedding models, rerankers, and instruction-tuned large language models (LLMs) have challenged the dominance of NLI-based architectures. Yet, systematically comparing these diverse approaches remains difficult. Existing evaluations, such as MTEB, often incorporate labeled examples through supervised probes or fine-tuning, leaving genuine zero-shot capabilities underexplored. To address this, we introduce BTZSC, a comprehensive benchmark of 22 public datasets spanning sentiment, topic, intent, and emotion classification, capturing diverse domains, class cardinalities, and document lengths. Leveraging BTZSC, we conduct a systematic comparison across four major model families, NLI cross-encoders, embedding models, rerankers and instruction-tuned LLMs, encompassing 38 public and custom checkpoints. Our results show that: (i) modern rerankers, exemplified by Qwen3-Reranker-8B, set a new state-of-the-art with macro F1 = 0.72; (ii) strong embedding models such as GTE-large-en-v1.5 substantially close the accuracy gap while offering the best trade-off between accuracy and latency; (iii) instruction-tuned LLMs at 4--12B parameters achieve competitive performance (macro F1 up to 0.67), excelling particularly on topic classification but trailing specialized rerankers; (iv) NLI cross-encoders plateau even as backbone size increases; and (v) scaling primarily benefits rerankers and LLMs over embedding models. BTZSC and accompanying evaluation code are publicly released to support fair and reproducible progress in zero-shot text understanding.