超越BeautifulSoup:为日常用户评估基于LLM的网络爬虫基准测试
Beyond BeautifulSoup: Benchmarking LLM-Powered Web Scraping for Everyday Users
AI总结:
本文评估了基于LLM的网络爬虫在日常用户中的应用,展示了端到端LLM代理如何使复杂爬虫变得简单,同时比较了LLM辅助脚本和端到端代理在不同场景下的效果。
摘要:
网络爬虫历史上需要在HTML解析、会话管理和身份验证绕过方面具备技术专长,这限制了大规模数据提取仅限于有技能的开发人员。我们认为大型语言模型(LLMs)已经使网络爬虫民主化,使低技能用户能够通过简单的自然语言提示执行复杂的操作。尽管广泛的基准测试在最佳专家条件下评估这些工具,我们显示在不进行大量手动努力的情况下,当前基于LLM的工作流允许初学者用户爬取复杂网站,这些网站原本是无法访问的。我们系统地评估了日常用户在35个网站上使用现成的LLM工具进行爬虫的能力,这些网站涵盖五个安全等级,包括身份验证、反机器人和验证码控制。我们设计并评估了两种不同的工作流:(a)LLM辅助脚本,其中用户提示LLM生成传统爬虫代码但保持手动执行控制;(b)端到端LLM代理,这些代理通过整合工具使用自动导航和提取数据。我们的结果表明,端到端代理使复杂的爬虫变得可行 - 只需一个提示和最小的调整(少于5次更改)即可完成工作流。我们还强调在静态网站上LLM辅助脚本可能更简单和更快的场景。鉴于这些发现,我们为初学者提供简单的流程来使用这些工作流,并评估对手可能使用这些工作流能实现什么。
英文摘要:
Web scraping has historically required technical expertise in HTML parsing, session management, and authentication circumvention, which limited large-scale data extraction to skilled developers. We argue that large language models (LLMs) have democratized web scraping, enabling low-skill users to execute sophisticated operations through simple natural language prompts. While extensive benchmarks evaluate these tools under optimal expert conditions, we show that without extensive manual effort, current LLM-based workflows allow novice users to scrape complex websites that would otherwise be inaccessible. We systematically benchmark what everyday users can do with off-the-shelf LLM tools across 35 sites spanning five security tiers, including authentication, anti-bot, and CAPTCHA controls. We devise and evaluate two distinct workflows: (a) LLM-assisted scripting, where users prompt LLMs to generate traditional scraping code but maintain manual execution control, and (b) end-to-end LLM agents, which autonomously navigate and extract data through integrated tool use. Our results demonstrate that end-to-end agents have made complex scraping accessible - requiring as little as a single prompt with minimal refinement (less than 5 changes) to complete workflows. We also highlight scenarios where LLM-assisted scripting may be simpler and faster for static sites. In light of these findings, we provide simple procedures for novices to use these workflows and gauge what adversaries could achieve using these.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。