arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2212.03459cs.SEcs.IR
收藏

你不知道的搜索:通过自动评估替代搜索来帮助用户查找代码

You Don't Know Search: Helping Users Find Code by Automatically Evaluating Alternative Queries

Rijnard van Tonder

摘要:

成千上万的工程师每天使用Sourcegraph搜索代码,并依靠它来完成软件开发任务。我们面临着一个关键的挑战,在设计一个查询语言,以适应广泛的用户的需求。我们的经验表明,用户表达不同的,往往是相互矛盾的偏好查询应该如何解释。这些偏好源于具有不同使用环境、技术经验和使用先前工具的隐含期望的用户。与此同时,设计代码搜索查询语言带来了独特的挑战,因为它与传统搜索引擎和成熟的程序设计语言交叉。例如,代码搜索查询为了简单和简洁而采用某些语法约定,但总是冒着编码隐含语义的风险,这些语义在表面上是模糊的(查询中的单个空格可能意味着三个或更多语义上不同的东西,这取决于周围的术语)。用户通常需要使用额外的语法来消除意图的歧义,以便查询表达他们实际想要搜索的内容。这种消除歧义的需求是我们在过去三年中看到的用户在编写搜索查询时遇到的主要挫折之一。我们分享了我们的观察结果,这些观察结果使我们从一个新的角度看待代码搜索行为可能跨越看似模糊的查询。我们开发了自动查询评估(AQE),一种新的技术,自动生成和自适应运行替代查询解释容易受挫的条件。我们在我们公开的代码搜索实例上对超过10,000个独立用户进行A/B测试来评估AQE。我们的主要结果显示,相对于对照组,当AQE活跃时,用户在任何一天点击搜索结果的可能性平均高出22%。

英文摘要:

Tens of thousands of engineers use Sourcegraph day-to-day to search for code and rely on it to make progress on software development tasks. We face a key challenge in designing a query language that accommodates the needs of a broad spectrum of users. Our experience shows that users express different and often contradictory preferences for how queries should be interpreted. These preferences stem from users with differing usage contexts, technical experience, and implicit expectations from using prior tools. At the same time, designing a code search query language poses unique challenges because it intersects traditional search engines and full-fledged programming languages. For example, code search queries adopt certain syntactic conventions in the interest of simplicity and terseness but invariably risk encoding implicit semantics that are ambiguous at face-value (a single space in a query could mean three or more semantically different things depending on surrounding terms). Users often need to disambiguate intent with additional syntax so that a query expresses what they actually want to search. This need to disambiguate is one of the primary frustrations we've seen users experience with writing search queries in the last three years. We share our observations that lead us to a fresh perspective where code search behavior can straddle seemingly ambiguous queries. We develop Automated Query Evaluation (AQE), a new technique that automatically generates and adaptively runs alternative query interpretations in frustration-prone conditions. We evaluate AQE with an A/B test across more than 10,000 unique users on our publicly-available code search instance. Our main result shows that relative to the control group, users are on average 22% more likely to click on a search result at all on any given day when AQE is active.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑