K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

StocksTalk: A Voice-Enabled Conversational Agent for Structured Query Generation over Web Data

arXiv:2608.181052026-08-20

对着话筒说选股条件, AI就能生成经过校验的SQL查询语句

StocksTalk是一个对话式系统, 能把用户口头说出的选股条件, 比如市盈率低于25的大盘IT股, 转换成可以在真实金融数据上执行的SQL查询。系统把流式语音识别、检索增强的条件提取、基于表结构的大模型SQL生成、规则校验和人工确认环节整合进一个交互仪表盘。在150条语音提示的测试中, 完整流程在逻辑一致性和多轮对话稳定性上明显优于直接使用GPT-4o的基线方案。

METAL MEDIA 解读图

对着话筒说选股条件, AI就能生成经过校验的SQL查询语句

  1. 01构建了一套流程, 把用户口头说出的投资筛选条件, 例如市盈率、股息率、资产负债率等, 转换成针对Screener.in实时行情数据执行的SQL查询
  2. 02系统分四个阶段: 流式语音转文字(ElevenLabs)、检索增强的条件提取、基于表结构提示的GPT-4o生成SQL、规则校验, 最后由人工确认, 每一步的中间结果都会显示在仪表盘上供用户核对或修改
  3. 03整理并计划公开发布FinScreenBench基准数据集, 包含150条语音选股提示(共300段录音), 覆盖成长型、分红型、价值型三类投资策略, 以及安静和嘈杂两种录音环境
  4. 04在条件提取准确率、SQL可执行性、逻辑一致性、查询编辑距离、多轮对话稳定性等指标上, 加入人工验证的完整系统比不带检索增强和校验的普通GPT-4o基线, 逻辑一致性高27.8个百分点, 多轮对话稳定性高37.4个百分点
  5. 05消融实验显示各模块分工不同: 检索增强主要提升条件提取准确率, 约束式生成主要提升SQL可执行性, 规则校验主要提升逻辑一致性; 若去掉人工验证环节, 34%的多轮对话中错误会持续到第三轮, 加入验证后这一比例降到9%
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 构建了一套流程, 把用户口头说出的投资筛选条件, 例如市盈率、股息率、资产负债率等, 转换成针对Screener.in实时行情数据执行的SQL查询
  2. 系统分四个阶段: 流式语音转文字(ElevenLabs)、检索增强的条件提取、基于表结构提示的GPT-4o生成SQL、规则校验, 最后由人工确认, 每一步的中间结果都会显示在仪表盘上供用户核对或修改
  3. 整理并计划公开发布FinScreenBench基准数据集, 包含150条语音选股提示(共300段录音), 覆盖成长型、分红型、价值型三类投资策略, 以及安静和嘈杂两种录音环境
  4. 在条件提取准确率、SQL可执行性、逻辑一致性、查询编辑距离、多轮对话稳定性等指标上, 加入人工验证的完整系统比不带检索增强和校验的普通GPT-4o基线, 逻辑一致性高27.8个百分点, 多轮对话稳定性高37.4个百分点
  5. 消融实验显示各模块分工不同: 检索增强主要提升条件提取准确率, 约束式生成主要提升SQL可执行性, 规则校验主要提升逻辑一致性; 若去掉人工验证环节, 34%的多轮对话中错误会持续到第三轮, 加入验证后这一比例降到9%
Figure 1: Overview of the StocksTalk architecture. The system transforms spoken financial queries into validated SQL queries, retrieves real-time market data, and enables human-in-the-loop verification through an interactive dashboard.
Figure 1: Overview of the StocksTalk architecture. The system transforms spoken financial queries into validated SQL queries, retrieves real-time market data, and enables human-in-the-loop verification through an interactive dashboard.
Table 1: Comparison of StocksTalk against baselines on 150 clean-input prompts. CEA = Constraint Extraction Accuracy; EX = SQL Executability; LCR = Logical Consistency Rate; QED = Query Edit Distance (lower is better); MTS = Multi-turn Stability.
SystemCEA (%)EX (%)LCR (%)QEDMTS (%)LAT (s)
GPT-4o (plain)63.481.254.78.351.21.5±0.1
GPT-4o + RAG79.888.667.35.168.42.1±0.2
GPT-4o + RAG + Validation88.396.991.22.882.72.3±0.2
StocksTalk (full)91.297.593.82.188.63.1±0.4
Table 2: StocksTalk performance on 150 prompts under clean and noisy ASR conditions.
MetricClean InputNoisy Input
Constraint Extraction Acc. (%)91.278.4
SQL Executability (%)97.589.3
Logical Consistency Rate (%)93.882.1
Query Edit Distance (tokens)2.15.7
Multi-turn Stability (%)88.674.3
Avg. End-to-End Latency (s)3.1±0.43.6±0.7
Table 3: Ablation study on 150 clean-input prompts. Δ denotes absolute drop from the full system.
ConfigurationCEA (%)EX (%)LCR (%)
Full system91.297.593.8
w/o RAG retrieval74.3 (−16.9)95.1 (−2.4)87.2 (−6.6)
w/o validation layer90.8 (−0.4)96.9 (−0.6)71.4 (−22.4)
w/o constrained decoding88.5 (−2.7)79.2 (−18.3)84.3 (−9.5)
w/o human-in-the-loop89.1 (−2.1)94.3 (−3.2)80.6 (−13.2)
Table 4: Effect of HITL verification on SQL executability (%) by prompt category, clean input.
Prompt Typew/o HITLw/ HITLGain
Growth-focused94.298.6+4.4
Dividend-oriented91.797.3+5.6
Value-based88.396.8+8.5
Overall91.497.5+6.1

为什么重要

把复杂的口头查询条件直接转化为可执行的数据库查询, 对银行、券商等需要构建自然语言检索界面的机构有直接的参考价值。系统把中间推理步骤全部展示给用户以供修正的设计思路, 也为其他AI系统在何处引入人工审核提供了一个具体范例。

本文术语

  • 检索增强生成(RAG) · 让AI在回答前先检索相关资料作为参考的技术
  • SQL · 用于在数据库中查询和筛选数据的查询语言
  • 人工在环验证(human-in-the-loop) · 在AI生成的结果被执行前, 由人来检查或修改的流程
  • 语音识别(ASR) · 将人说的语音转换成文字的技术
  • 基于表结构的提示 · 把数据库表的结构信息告诉AI, 让它只生成符合该结构的查询语句

论文原文摘要(英文)

StocksTalk is a voice-enabled conversational system for transforming spoken financial screening requests into executable and validated structured queries over real-world market data. The system combines streaming speech recognition, retrieval-augmented constraint extraction, schema-grounded LLM-based SQL generation, rule-based validation, and human-in-the-loop verification within an interactive dashboard. Unlike traditional template-driven financial assistants, StocksTalk exposes intermediate reasoning artifacts, including extracted constraints, normalized financial metrics, operator grounding, and generated queries, allowing users to inspect and refine each stage before execution. To evaluate the system, we curate a benchmark of 150 spoken financial prompts spanning multiple investment strategies and input noise conditions. Experimental results show that retrieval grounding, constrained query generation, and interactive verification substantially improve constraint extraction accuracy, SQL executability, logical consistency, and multi-turn stability compared to baseline LLM-based approaches. StocksTalk demonstrates how transparent, voice-driven interfaces can bridge natural language interaction and structured financial analysis, providing an effective framework for conversational stock screening and decision support.

作者 · Akshat Parmar, Vikranth Udandarao, Abhay Shakya, Tanmay Hire, Avinash Anand, Rajiv Ratn Shah, Daniel Wang Zhengkui

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Akshat Parmar et al., arXiv:2608.18105, CC BY 4.0