Large Language Models (LLMs) can generate SQL queries from natural language questions but struggle with database-specific schemas and tacit domain knowledge. We introduce a framework for continual learning from human feedback in text-to-SQL, where a learning agent receives natural language feedback to refine queries and distills the revealed knowledge for reuse on future tasks. This distilled knowledge is stored in a structured memory, enabling the agent to improve execution accuracy over time. We design and evaluate multiple variations of a learning agent architecture that vary in how they capture and retrieve past experiences. Experiments on the BIRD benchmark Dev set show that memory-augmented agents, particularly the Procedural Agent, achieve significant accuracy gains and error reduction by leveraging human-in-the-loop feedback. Our results highlight the importance of transforming tacit human expertise into reusable knowledge, paving the way for more adaptive, domain-aware text-to-SQL systems that continually learn from a human-in-the-loop.
翻译:大型语言模型(LLMs)能够根据自然语言问题生成SQL查询,但在处理数据库特定模式和隐性领域知识方面仍面临挑战。本文提出了一种在文本到SQL任务中基于人类反馈进行持续学习的框架,其中学习智能体接收自然语言反馈以优化查询,并将揭示的知识提炼以供未来任务复用。这些提炼的知识以结构化记忆形式存储,使智能体能够随时间提升执行准确率。我们设计并评估了多种学习智能体架构变体,这些变体在捕获和检索历史经验的方式上各不相同。在BIRD基准开发集上的实验表明,记忆增强型智能体(尤其是过程型智能体)通过利用人在回路的反馈,实现了显著的准确率提升和错误率降低。研究结果凸显了将隐性人类专业知识转化为可复用知识的重要性,为构建更具适应性、领域感知且能持续从人在回路中学习的文本到SQL系统奠定了基础。