TL;DR
Large Language Models (LLMs) show promise in e-commerce, but their factuality is a major concern. This paper introduces ECKGBench, a novel benchmark that uses a knowledge graph to rigorously evaluate LLM factuality in e-commerce, addressing limitations of existing methods like unreliability and high cost.
What Problem Does This Paper Address?
LLMs are increasingly being used in e-commerce for tasks like search, recommendations, and customer service. However, a critical issue is their tendency to "hallucinate" or generate factually incorrect information. This is particularly problematic in e-commerce, where inaccurate information can directly impact user experience, trust, and revenue. While existing methods exist to evaluate LLM factuality, they often suffer from:
- Lack of Reliability: Inconsistent question generation and answer evaluation can lead to fluctuating assessments.
- High Consumption: Many methods require LLM-as-judge or human-as-judge, making them expensive and slow to scale.
- Lack of Domain Expertise: Existing benchmarks are often general-purpose and don't specifically address the nuances of e-commerce knowledge.
This paper aims to bridge this gap by creating a specialized, reliable, and efficient benchmark for e-commerce LLM factuality.
Methods
The ECKGBench benchmark is built upon a multi-stage process:
- E-commerce Knowledge Graph (ECKG): A large-scale knowledge graph is constructed from Taobao data, containing entities (e.g., item category, style, color) and their relationships. This forms the factual basis for the benchmark.
- Relation Templating: To convert KG triples into natural language questions, relation templates are automatically generated using LLMs (like GPT-4) and then manually refined.
- Automated Question Generation: The core of ECKGBench involves generating questions from KG triples. This is achieved through a combination of:
- Prompt Designing: A multi-choice question format is adopted to provide a more nuanced evaluation than simple true/false questions and to avoid unconstrained generation. Instructions are crafted to guide LLMs.
- Negative Sampling: A three-stage process ensures high-quality negative (incorrect) answer choices:
- Sample Pool Generating: True KG triples are used to recall related entities from other false KG triples to form an initial pool of potential negative answers.
- Coarse-grained Filtering: Semantic similarity between the ground truth and negative samples is used to filter out extremely easy or hard choices.
- Fine-grained Filtering: LLMs are employed to select the most confusing yet inappropriate negative candidates, ensuring diversity and domain relevance.
- Verification: A dual-layer approach using two LLMs and human experts is used to flag and filter out inconsistent or low-quality questions.
- Knowledge Boundary Exploration: The paper also proposes a method to explore the "knowledge boundary" of LLMs by categorizing knowledge into "well-known," "somewhat known," and "unknown" based on model performance at different temperatures. Metrics like Strict Correct (SC), Precision, and Recall are introduced for this analysis.
Datasets
- ECKGBench: This is the newly introduced benchmark dataset. It is automatically generated from a large-scale e-commerce knowledge graph (ECKG) derived from Taobao data. The dataset consists of multi-choice questions designed to evaluate LLM factuality in e-commerce.
- ECKG: The underlying e-commerce knowledge graph used to generate ECKGBench.
Key Insights and Ideas
- Knowledge Graph as a Foundation: Using a structured knowledge graph is crucial for generating reliable and factually grounded questions, overcoming the subjectivity of human annotation or retrieval-based methods.
- Multi-choice for Nuance: Shifting from binary (true/false) to multi-choice questions provides a richer signal for evaluating LLM capabilities, allowing for finer distinctions.
- Automated Negative Sampling is Key: The proposed three-stage negative sampling workflow is critical for creating challenging and informative distractors, significantly improving question quality and evaluation reliability.
- Domain-Specific Evaluation Matters: LLMs perform significantly better on "common" e-commerce knowledge than "abstract" knowledge, highlighting the need for specialized benchmarks like ECKGBench.
- LLM Scaling Law Holds: Larger LLMs generally perform better, even in specialized domains, suggesting that their broad pre-training can still capture rare e-commerce concepts.
Key Results
- Overall LLM Performance: Advanced LLMs generally show low absolute accuracy scores (below 60%) on ECKGBench, indicating that their e-commerce factuality is still unsatisfactory. Qwen2-max and GPT-4 performed best among the evaluated models.
- Common vs. Abstract Knowledge: LLMs consistently perform better on common e-commerce knowledge (e.g., product functions) than on abstract knowledge (e.g., color similarity).
- Component Contribution: The paper's ablation study shows that prompt designing contributes the most to question quality, followed by negative sampling and relation templating.
- Efficiency: ECKGBench offers efficient evaluation, with average response times under 3 seconds for many models, making it practical for large-scale benchmarking.
- Inconsistency Control: The proposed sampling workflow significantly reduces LLM answer inconsistency compared to random sampling.
- Knowledge Boundary: For Qwen-7B, the SC metric (essential knowledge boundary) was 35.02, while Recall (potential knowledge boundary) was 58.28, suggesting that post-training methods could help bridge this gap.
Limitations and Future Work
- Limitations:
- The paper acknowledges that some e-commerce concepts might be rare in general pre-training corpora, leading to lower LLM performance.
- While the benchmark is automated, human verification is still part of the process to ensure quality.
- Future Work:
- The authors plan to release the ECKGBench dataset to facilitate further research.
- The proposed framework for exploring LLM knowledge boundaries can be extended to other domains.
- Further research into post-training methods (fine-tuning, RLHF) is suggested to improve LLMs' performance on less familiar e-commerce knowledge.
Summary updated