Skip to main content
QUICK REVIEW

[Paper Review] Comparative Study of Domain Driven Terms Extraction Using Large Language Models

Sandeep Chataut, Tuyen Do|arXiv (Cornell University)|Apr 2, 2024
Advanced Text Analysis TechniquesComputer Science5 citations
TL;DR

The paper compares GPT-3.5, Llama-2-7B, and Falcon-7B for keyword/term extraction using prompts, evaluated on Inspec and PubMed with Jaccard similarity, and discusses prompt engineering, hallucination, and an accompanying Python package.

ABSTRACT

Keywords play a crucial role in bridging the gap between human understanding and machine processing of textual data. They are essential to data enrichment because they form the basis for detailed annotations that provide a more insightful and in-depth view of the underlying data. Keyword/domain driven term extraction is a pivotal task in natural language processing, facilitating information retrieval, document summarization, and content categorization. This review focuses on keyword extraction methods, emphasizing the use of three major Large Language Models(LLMs): Llama2-7B, GPT-3.5, and Falcon-7B. We employed a custom Python package to interface with these LLMs, simplifying keyword extraction. Our study, utilizing the Inspec and PubMed datasets, evaluates the performance of these models. The Jaccard similarity index was used for assessment, yielding scores of 0.64 (Inspec) and 0.21 (PubMed) for GPT-3.5, 0.40 and 0.17 for Llama2-7B, and 0.23 and 0.12 for Falcon-7B. This paper underlines the role of prompt engineering in LLMs for better keyword extraction and discusses the impact of hallucination in LLMs on result evaluation. It also sheds light on the challenges in using LLMs for keyword extraction, including model complexity, resource demands, and optimization techniques.

Motivation & Objective

  • Assess the effectiveness of three large language models (GPT-3.5, Llama-2-7B, Falcon-7B) for domain-driven keyword extraction.
  • Evaluate model outputs against Inspec and PubMed reference keywords using a unified metric.
  • Demonstrate a Python package (LangChain-integrated) enabling LLM-based keyword extraction.
  • Examine the role of prompt engineering and the impact of hallucinations on evaluation.
  • Provide practical insights into model performance, requirements, and limitations for keyword extraction.

Proposed method

  • Interface three LLMs (Llama-2-7B, GPT-3.5, Falcon-7B) through a custom Python package built with LangChain.
  • Evaluate keyword extraction using a ground-truth plus union of Inspec and PubMed keywords as reference.
  • Use Jaccard similarity to measure overlap between model output and reference keyword sets.
  • Explore prompt engineering techniques including zero-shot prompting and a formal f_KewwordExtraction(P,L) prompt construction with a [MASK] placeholder.
  • Report inference times and discuss model-specific behaviors (hallucinations, extra terms, definitions) and their impact on precision.

Experimental results

Research questions

  • RQ1How do GPT-3.5, Llama-2-7B, and Falcon-7B perform in domain-driven keyword extraction when evaluated against Inspec and PubMed references?
  • RQ2What is the impact of prompt design and temperature on keyword extraction quality?
  • RQ3How do hallucinations and domain-specific terms affect evaluation metrics like Jaccard similarity?
  • RQ4What are the practical trade-offs (accuracy, speed, resource use) among the three models for keyword extraction tasks?

Key findings

  • GPT-3.5 achieves the highest average Jaccard scores on Inspec (0.64) and PubMed (0.21).
  • Llama-2-7B attains 0.40 (Inspec) and 0.17 (PubMed).
  • Falcon-7B attains 0.23 (Inspec) and 0.12 (PubMed).
  • Lowering the temperature to 0.2 increases determinism and impacts keyword variety and potential hallucinations.
  • Llama-2-7B can generate additional keywords or definitions not present in references, reducing Jaccard similarity for PubMed.
  • GPT-3.5 produces concise, well-aligned keywords with minimal unnecessary terms, though some new terms may appear due to hallucination.
  • Inferred runtimes: Falcon-7B 7–12s, Llama-2-7B 4–8s, GPT-3.5 3–5s (CPU).
  • A specialized Python package integrated with LangChain enables multi-LLM keyword extraction via a standardized prompt framework.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.