Skip to main content
QUICK REVIEW

[论文解读] Tabular Embedding Model (TEM): Finetuning Embedding Models For Tabular RAG Applications

Sujit Khanna, Shishir Subedi|arXiv (Cornell University)|Apr 28, 2024
Modular Robots and Swarm IntelligenceEngineering被引用 3
一句话总结

本文提出了表格嵌入模型(TEM),一种针对金融领域表格检索增强生成(RAG)任务微调的轻量化BGE-large-en嵌入模型。通过在特定领域的金融表格查询数据集上进行微调,TEM在参数量更小、上下文窗口更窄的情况下,性能仍优于当前最优(SOTA)嵌入模型——在精度@10(0.2160)、召回率@10(0.7989)和命中率@10(0.4420)方面均优于text-embedding-3-large和SFR-Embedding-Mistral等模型。

ABSTRACT

In recent times Large Language Models have exhibited tremendous capabilities, especially in the areas of mathematics, code generation and general-purpose reasoning. However for specialized domains especially in applications that require parsing and analyzing large chunks of numeric or tabular data even state-of-the-art (SOTA) models struggle. In this paper, we introduce a new approach to solving domain-specific tabular data analysis tasks by presenting a unique RAG workflow that mitigates the scalability issues of existing tabular LLM solutions. Specifically, we present Tabular Embedding Model (TEM), a novel approach to fine-tune embedding models for tabular Retrieval-Augmentation Generation (RAG) applications. Embedding models form a crucial component in the RAG workflow and even current SOTA embedding models struggle as they are predominantly trained on textual datasets and thus underperform in scenarios involving complex tabular data. The evaluation results showcase that our approach not only outperforms current SOTA embedding models in this domain but also does so with a notably smaller and more efficient model structure.

研究动机与目标

  • 为解决通用嵌入模型在特定领域表格RAG应用中表现不佳的问题,特别是在高维金融数据中的表现。
  • 开发一种可扩展、高效的RAG流水线,通过微调嵌入模型仅检索相关文件,避免对全量数据集进行嵌入。
  • 证明在特定领域表格数据上微调轻量化开源嵌入模型,可超越更大规模的通用SOTA模型。
  • 减少幻觉现象,并提升在需要跨多个表格或CSV文件进行分析的复杂金融查询中的检索准确性。
  • 验证使用GPT-4实现半自动角色扮演框架生成高质量训练与评估数据的有效性。

提出的方法

  • 在通过半自动GPT-4角色扮演框架生成的定制金融表格查询数据集上,对BGE-large-en-v1.5嵌入模型进行微调。
  • 采用一种独特的RAG工作流:由数据分析代理根据查询嵌入仅检索相关CSV文件或数据库表,避免对全量数据集进行索引。
  • 在微调前进行新的词嵌入初始化,以提升模型在表格数据模式上的收敛速度与性能。
  • 采用聚焦于命中率@10、精度@10和召回率@10的检索评估指标,k=10,用于评估在不同相关文件数量(n)下的检索有效性。
  • 在多个n值(1至6)下评估性能,以分析模型在不同检索复杂度下的鲁棒性。
  • 选择512个token的上下文窗口和1024维的嵌入维度,以在模型效率与复杂金融查询的性能之间取得平衡。
Figure 1: Generic indexing approach vs Tabular Embedding Approach
Figure 1: Generic indexing approach vs Tabular Embedding Approach

实验结果

研究问题

  • RQ1在特定领域表格数据上微调轻量化开源嵌入模型,是否能显著提升金融RAG应用中的检索性能?
  • RQ2定制化微调方法是否在表格RAG任务中优于通用SOTA嵌入模型(如text-embedding-3-large和SFR-Embedding-Mistral)?
  • RQ3该微调模型的性能如何随回答查询所需的相关文件数量(n)而变化?
  • RQ4与标准微调相比,新的词嵌入初始化在表格数据上的性能提升程度有多大?
  • RQ5更小、高效微调的模型是否能在结构化数据检索准确率上超越更大的专有模型(如OpenAI的text-embedding-3-large)?

主要发现

  • 微调后的TEM模型在命中率@10上达到0.4420,显著优于次优模型(text-embedding-3-large的0.3984)。
  • TEM在精度@10上达到0.2160,超过text-embedding-3-large(0.2041)和SFR-Embedding-Mistral(0.2025)。
  • TEM的召回率@10达到0.7989,超过所有基线模型,包括text-embedding-3-large的0.7578。
  • 当n=1时,TEM的命中率达0.7955,优于所有基线模型,包括SFR-Embedding-Mistral的0.7784。
  • 在n=2至n=4范围内,模型保持强劲性能,命中率分别为0.8482(n=2)和0.3871(n=3),显著优于其他模型。
  • 尽管上下文窗口(512)和模型规模更小,TEM在所有关键检索指标上仍优于更大的模型,如SFR-Embedding-Mistral和OpenAI的text-embedding-3-large。
Figure 2: Proposed Tabular RAG Workflow
Figure 2: Proposed Tabular RAG Workflow

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。