arXiv:2510.14162cs.IRcs.AI2025-10中稿 · CIKM 2025 FinAI Wo…被引 2

用大模型+函数调用实现金融数据库自然语言查询,更准更快更省。

FinAI Data Assistant: LLM-based Financial Database Query Processing with the OpenAI Function Calling API

  • 不生成SQL,直接调用预设查询函数,提升可靠性。
  • 股票价格预测有延迟偏差,但股票代码映射准确率超99%。
  • 适合需要稳定、低成本金融数据查询的分析师和开发者。

我们提出FinAI Data Assistant,一种基于大语言模型(LLM)与OpenAI函数调用API的金融数据库自然语言查询方案。系统不通过文本转SQL生成完整查询,而是将用户请求路由至一个经过验证的参数化查询库,以牺牲生成灵活性换取更高的可靠性、低延迟和低成本。我们在股价和基本面数据上进行了三项实证研究:(RQ1)LLM能否在无外部检索情况下可靠回忆或推断时间依赖性金融数据;(RQ2)LLM将公司名称映射为股票代码的准确性;(RQ3)函数调用是否优于文本转SQL完成端到端查询。实验结果表明,纯LLM预测存在显著误差,且对股价存在前瞻偏差(主要源于模型知识截止时间)。对于纳斯达克-100成分股,代码映射准确率接近完美;标普500企业也保持较高准确率。最终,与文本转SQL基线相比,FinAI Data Assistant在查询延迟、成本和可靠性方面均表现更优。论文讨论了设计权衡、局限性及部署前景。

原文摘要 · Abstract (English)

We present FinAI Data Assistant, a practical approach for natural-language querying over financial databases that combines large language models (LLMs) with the OpenAI Function Calling API. Rather than synthesizing complete SQL via text-to-SQL, our system routes user requests to a small library of vetted, parameterized queries, trading generative flexibility for reliability, low latency, and cost efficiency. We empirically study three questions: (RQ1) whether LLMs alone can reliably recall or extrapolate time-dependent financial data without external retrieval; (RQ2) how well LLMs map company names to stock ticker symbols; and (RQ3) whether function calling outperforms text-to-SQL for end-to-end database query processing. Across controlled experiments on prices and fundamentals, LLM-only predictions exhibit non-negligible error and show look-ahead bias primarily for stock prices relative to model knowledge cutoffs. Ticker-mapping accuracy is near-perfect for NASDAQ-100 constituents and high for S\&P~500 firms. Finally, FinAI Data Assistant achieves lower latency and cost and higher reliability than a text-to-SQL baseline on our task suite. We discuss design trade-offs, limitations, and avenues for deployment.

金融AI大模型函数调用数据查询

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。