API search involves finding components in an API that are relevant to a programming task. For example, a programmer may need a function in a C library that opens a new network connection, then another function that sends data across that connection. Unfortunately, programmers often have trouble finding the API components that they need. A strong scientific consensus is emerging towards developing interactive tool support that responds to conversational feedback, emulating the experience of asking a fellow human programmer for help. A major barrier to creating these interactive tools is implementing dialogue management for API search. Dialogue management involves determining how a system should respond to user input, such as whether to ask a clarification question or to display potential results. In this paper, we present a dialogue manager for interactive API search that considers search results and dialogue history to select efficient actions. We implement two dialogue policies: a hand-crafted policy and a policy optimized via reinforcement learning. We perform a synthetics evaluation and a human evaluation comparing the policies to a generic single-turn, top-N policy used by source code search engines.
翻译:API 搜索涉及寻找与编程任务相关的 API 的 API 组件。 例如, 程序员可能需要在 C 库中设置一个功能, 开启新的网络连接, 然后是另一个功能, 在整个连接中发送数据 。 不幸的是, 程序员往往难以找到他们需要的 API 组件 。 正在形成一个强大的科学共识, 以开发互动工具支持, 响应对话反馈, 模拟请求人类程序员帮助的经验 。 创建这些交互式工具的一个主要障碍是为 API 搜索实施对话管理 。 对话管理包括确定一个系统如何响应用户输入, 如询问澄清问题还是显示潜在结果 。 在本文中, 我们提出一个对话管理器, 用于交互式 API 搜索, 考虑搜索结果和对话历史来选择有效的行动 。 我们实施两种对话政策: 手动政策和通过强化学习优化的政策 。 我们进行合成评价和人类评价, 将政策与源码搜索引擎使用的通用单向一端政策进行比较 。