面向流式文本到SQL的自精炼提示诱导
Self-Refining Prompt Induction for Streaming Text-to-SQL
AI总结:
本研究提出自精炼提示诱导(SRPI)方法,通过离线将生成失败转化为可复用方言指令,在Confluent Cloud Flink SQL上使7个生成器的平均评判者分数提升7.1-19.2个百分点。
摘要:
用于流式引擎的文本到SQL助手必须处理特定方言类型、窗口规则和时间语义,包括通用提示难以处理的结构。我们提出自精炼提示诱导(SRPI),这是一种离线方法,可在保持模型权重固定的情况下将生成失败转化为可复用的方言指令。精炼器利用来自三个LLM评判者的参考条件反馈来修订生成器的提示;采样回归守卫检查早期成功,独立的压缩器则缩短提示长度。推理使用冻结的提示,无需检索或查询修复。我们基于30个专家编写的示例生成受控合成工作负载,在Confluent Cloud Flink SQL上评估跨域和跨模型迁移,使用335个诱导示例和来自保留域的257个问题。相同的诱导提示使7个生成器的平均评判者分数提高了7.1至19.2个百分点,其中诱导模型的分数从85.3%提升至97.5%。单独的压缩研究将提示长度减少52.7%,分数仅下降0.19个百分点。使用该诱导提示的助手已进入早期访问阶段,初始用户反馈将用于后续精炼。
英文摘要:
Text-to-SQL assistants for streaming engines must handle dialect-specific types, windowing rules, and temporal semantics, including constructs poorly handled by generic prompts. We present Self-Refining Prompt Induction (SRPI), an offline method that converts generation failures into reusable dialect instructions while keeping model weights fixed. A Refiner revises the Generator's prompt using reference-conditioned feedback from three LLM judges; a sampled regression guard checks earlier successes, and a separate Compressor reduces prompt length. Inference uses the frozen prompt without retrieval or query repair. We evaluate cross-domain and cross-model transfer on Confluent Cloud Flink SQL using a controlled synthetic workload seeded by 30 expert-written examples, with 335 induction examples and 257 questions from held-out domains. The same induced prompt improves mean judge scores across seven Generators by 7.1-19.2 percentage points, including an increase from 85.3% to 97.5% for the induction model. A separate compression study reduces prompt length by 52.7% with a 0.19-percentage-point score decrease. An assistant using the induced prompt is in early access, with initial user feedback to inform subsequent refinement.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。