MCP与RAG与NLWeb与HTML:不同网页代理接口的有效性和效率比较(技术报告)
MCP vs RAG vs NLWeb vs HTML: A Comparison of the Effectiveness and Efficiency of Different Agent Interfaces to the Web (Technical Report)
AI总结:
本文比较了四种网页代理接口的有效性和效率,发现RAG、MCP和NLWeb在效果和效率上均优于HTML。
摘要:
大型语言模型代理越来越多地用于自动化网页任务,如产品搜索、报价比较和结账。当前研究探索了这些代理与网站交互的不同接口,包括传统的HTML浏览、基于预爬取内容的检索增强生成(RAG)、通过Web API使用模型上下文协议(MCP)进行通信,以及通过NLWeb接口进行自然语言查询。然而,此前没有研究在单一受控环境中使用相同任务比较这四种架构。为解决这一差距,我们引入了一个由四个模拟电子商务网站组成的测试平台,每个网站通过HTML、MCP和NLWeb接口提供产品。对于每个接口(HTML、RAG、MCP和NLWeb),我们开发了专门的代理,执行相同的一组任务,从简单的产品搜索和价格比较到复杂的互补或替代产品查询和结账过程。我们使用GPT 4.1、GPT 5、GPT 5 mini和Claude Sonnet 4作为底层LLM进行评估。我们的评估显示,RAG、MCP和NLWeb代理在效果和效率上均优于HTML。平均来看,F1分数从HTML的0.67提升到其他代理的0.75至0.77之间。每项任务的标记使用量从HTML的约241k下降到47k至140k之间。每项任务的运行时间从291秒下降到50至62秒。最佳整体配置是使用GPT 5的RAG,其F1得分为0.87,完成率为0.79。此外,考虑成本因素,使用GPT 5 mini的RAG在API使用费用和性能之间提供了良好的平衡。我们的实验表明,交互接口的选择对LLM基于网页代理的效果和效率有显著影响。
英文摘要:
Large language model agents are increasingly used to automate web tasks such as product search, offer comparison, and checkout. Current research explores different interfaces through which these agents interact with websites, including traditional HTML browsing, retrieval-augmented generation (RAG) over pre-crawled content, communication via Web APIs using the Model Context Protocol (MCP), and natural-language querying through the NLWeb interface. However, no prior work has compared these four architectures within a single controlled environment using identical tasks. To address this gap, we introduce a testbed consisting of four simulated e-shops, each offering its products via HTML, MCP, and NLWeb interfaces. For each interface (HTML, RAG, MCP, and NLWeb) we develop specialized agents that perform the same sets of tasks, ranging from simple product searches and price comparisons to complex queries for complementary or substitute products and checkout processes. We evaluate the agents using GPT 4.1, GPT 5, GPT 5 mini, and Claude Sonnet 4 as underlying LLM. Our evaluation shows that the RAG, MCP and NLWeb agents outperform HTML on both effectiveness and efficiency. Averaged over all tasks, F1 rises from 0.67 for HTML to between 0.75 and 0.77 for the other agents. Token usage falls from about 241k for HTML to between 47k and 140k per task. The runtime per task drops from 291 seconds to between 50 and 62 seconds. The best overall configuration is RAG with GPT 5 achieving an F1 score of 0.87 and a completion rate of 0.79. Also taking cost into consideration, RAG with GPT 5 mini offers a good compromise between API usage fees and performance. Our experiments show the choice of the interaction interface has a substantial impact on both the effectiveness and efficiency of LLM-based web agents.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。