LLM-TAKE: Theme Aware Keyword Extraction Using Large Language Models

Reza Yousefi Maragheh, Chenhao Fang, Charan Chand Irugu, Parth Parikh, Jason Cho, Jianpeng Xu, Saranyan Sukumar, Malay Patel, Evren Korpeoglu, Sushant Kumar, Kannan AchanarXiv 2023

TL;DR

LLM-TAKE is a multi-stage framework designed to extract "theme-aware" keywords from E-commerce product metadata by leveraging the reasoning capabilities of Large Language Models (LLMs). By combining sophisticated prompting with a robust hallucination-reduction pipeline—including cross-referencing against a massive "cheap" LLM-generated dataset—the authors achieve significant improvements in keyword relevance and business metrics compared to traditional extraction methods.

What Problem Does This Paper Address?

Keyword extraction is a foundational NLP task, but traditional models often suffer from a "short attention span." Statistical and graph-based approaches (like TextRank or YAKE) typically focus on local word frequencies or co-occurrences. This makes it difficult for them to capture the global "theme" of a document or infer abstractive keywords—terms that describe the product's essence but don't explicitly appear in the text (e.g., labeling a board game as "nostalgic").

In E-commerce, keywords serve as "highlights" that help customers make quick decisions. If these keywords are too generic (e.g., "Great Product") or factually incorrect (hallucinations), they degrade the user experience. The authors aim to bridge this gap by using LLMs to understand the broader context of product metadata while implementing guardrails to ensure the output is informative, safe, and grounded.

Methods

The LLM-TAKE (Theme-Aware Keyword Extraction) framework consists of several distinct stages to refine the raw output of an LLM:

  1. Theme Recall Set Generation: Using GPT-3.5, the system generates two sets of candidates: extractive (words present in the text) and abstractive (inferred themes). The authors use specific instruction templates to guide this process. Prompts for abstractive and extractive methods
  2. Hallucination Reduction via Reference Sets: To combat LLM "imagination," the authors first run a computationally cheaper LLM (LLM2) over a massive dataset of 10 million items to create a reference dictionary of item-theme pairs. If a keyword generated by the main LLM for a specific item is extremely rare in this reference set, it is flagged as a potential hallucination and removed.
  3. Filtering & Quality Control: The system applies block-lists to remove non-informative adjectives (e.g., "Perfect") and sensitive or profane terms.
  4. Theme Importance Extraction: The LLM is prompted a second time to provide a confidence score (0 to 1) for each candidate keyword, acting as a self-critic to validate relevancy. Prompt for theme importance extraction
  5. Ranking & Diversification: Keywords are ranked by confidence scores. To ensure variety, a synonymity filter using SpaCy embeddings removes semantically redundant terms (e.g., keeping "fun" but dropping "funny").
Fig. 1. Prompts for abstractive method and extractive method.
Fig. 2. Prompt for theme importance extraction.
Fig. 5. An overview of LLM-TAKE Framework

Datasets

The authors evaluated their framework on three datasets:

  • P-Electronics: A proprietary dataset of 94 high-traffic electronics items from an E-commerce platform, manually annotated by experts.
  • P-Toys: A proprietary dataset of 94 high-traffic toys and games, also expert-annotated.
  • DUC2001: A standard public benchmark consisting of 308 news articles, primarily used to test the model's performance on longer, non-E-commerce text.

Key Insights and Ideas

  • The Generality vs. Uniqueness Trade-off: By counting theme frequencies within product sub-categories, the framework can distinguish between "generic" themes (e.g., "collaborative" for board games) and "unique" ones (e.g., "nostalgic"). This allows for strategic keyword selection depending on whether the goal is to categorize or differentiate a product.
  • Abstractive Power: The abstractive version of LLM-TAKE significantly outperformed all benchmarks on E-commerce data. This suggests that for product descriptions, the ability to infer a theme is more valuable than simply extracting existing words.
  • LLMs as Self-Critics: Using the LLM to generate a confidence score for its own previously generated keywords proved highly effective, dropping about 10% of low-quality item-theme pairs in proprietary tests.

Key Results

LLM-TAKE demonstrated a clear lead over traditional models like YAKE, KeyBERT, and SIFRank:

  • Accuracy: On the P-Electronics dataset, LLM-TAKE (Abstractive) achieved a Precision of 0.504 and F1 of 0.241, more than doubling the performance of the best traditional benchmark (YAKE at 0.142 Precision).
  • Public Benchmarks: On the DUC2001 news dataset, the extractive version of LLM-TAKE performed best, likely because the ground-truth labels for that dataset were originally created using extractive methods.
  • Online Impact: In real-world A/B testing on an E-commerce platform, the framework produced a "Percentage Lift" in three key business metrics, ranging from 5.17% to 9.76%, all with statistical significance ($p < 0.05$).
Example of generated keywords in a production UI

Limitations and Future Work

The authors acknowledge that while their multi-stage pipeline significantly reduces hallucinations, the risk is never zero. The model's performance can still be challenged by "noisy" input metadata, where limited contextual information might lead the LLM to draw incorrect conclusions. Future work may involve further refining the contextual understanding to handle noisier, real-world product descriptions more gracefully.

Summary updated

BibTeX
@misc{maragheh2023llm,
  author = {Reza Yousefi Maragheh and Chenhao Fang and Charan Chand Irugu and Parth Parikh and Jason Cho and Jianpeng Xu and Saranyan Sukumar and Malay Patel and Evren Korpeoglu and Sushant Kumar and Kannan Achan},
  title = {{LLM-TAKE: Theme Aware Keyword Extraction Using Large Language Models}},
  year = {2023},
  eprint = {2312.00909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.00909},
}
Figure