arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.08246cs.CLcs.AIcs.LG
收藏

利用大型语言模型进行网页抓取

Leveraging Large Language Models for Web Scraping

PerpetualBlock Technologies Pvt. Ltd(PerpetualBlock 技术私人有限公司);Innoplexus Consulting Services Pvt. Ltd.(Innoplexus 咨询服务私人有限公司)

Aman Ahluwalia, Suhrud Wani

AI总结:

本研究提出利用预训练大型语言模型结合RAG架构及分块、搜索和排序算法,构建通用精确的网页数据抓取方案,并通过HTML语义分类、文本分块和模型对比实验验证其从非结构化文本中提取复杂数据的有效性。

摘要:

大型语言模型(LLMs)在复现人类任务和提升生产力方面展现出卓越能力。然而,由于它们优先考虑流畅性而非事实准确性,并且操纵特定信息的能力受限,直接将其应用于数据提取存在局限性。因此,为了克服这些局限性,本研究利用预训练LLMs的知识表示能力以及RAG模型所实现的定向信息访问,研究了一种面向语言生成的RAG模型的通用精确数据抓取方案。为了以更模块化和可解释的方式捕获知识,我们使用带有潜在知识检索器的预训练语言模型,该模型能够从大型语料库中检索文档并对其进行关注。我们采用RAG模型架构,并在三项任务下对其能力进行了深入分析:(i)HTML元素的语义分类,(ii)对HTML文本进行分块以实现有效理解,以及(iii)比较不同LLMs和排序算法的结果。虽然先前的工作已经为HTML理解和提取开发了专用架构和训练流程,但我们表明,在标准自然语言上预训练的LLMs,加上有效的分块、搜索和排序算法,可以证明是高效的数据抓取工具,能够从非结构化文本中提取复杂数据。未来的研究方向包括在所提出的基于RAG的数据提取框架内解决来源追踪和动态知识更新的挑战。通过克服这些局限性,该方法有望彻底改变从海量文本信息库中进行数据提取的方式。

英文摘要:

Large Language Models (LLMs) demonstrate remarkable capabilities in replicating human tasks and boosting productivity. However, their direct application for data extraction presents limitations due to a prioritisation of fluency over factual accuracy and a restricted ability to manipulate specific information. Therefore to overcome these limitations, this research leverages the knowledge representation power of pre-trained LLMs and the targeted information access enabled by RAG models, this research investigates a general-purpose accurate data scraping recipe for RAG models designed for language generation. To capture knowledge in a more modular and interpretable way, we use pre trained language models with a latent knowledge retriever, which allows the model to retrieve and attend over documents from a large corpus. We utilised RAG model architecture and did an in-depth analysis of their capabilities under three tasks: (i) Semantic Classification of HTML elements, (ii) Chunking HTML text for effective understanding, and (iii) comparing results from different LLMs and ranking algorithms. While previous work has developed dedicated architectures and training procedures for HTML understanding and extraction, we show that LLMs pre-trained on standard natural language with an addition of effective chunking, searching and ranking algorithms, can prove to be efficient data scraping tool to extract complex data from unstructured text. Future research directions include addressing the challenges of provenance tracking and dynamic knowledge updates within the proposed RAG-based data extraction framework. By overcoming these limitations, this approach holds the potential to revolutionise data extraction from vast repositories of textual information.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑