Not logged in.

Contribution Details

Type Master's Thesis
Scope Discipline-based scholarship
Title CodexBot; A conversational agent suggesting code examples
Organization Unit
Authors
  • Seungwoo Han
Supervisors
  • Harald Gall
  • Pasquale Salza
Language
  • English
Institution University of Zurich
Faculty Faculty of Business, Economics and Informatics
Date 2021
Abstract Text Finding the right code example fast and easy can help developers to have better performance. However, the current way of searching code examples such as web search has several drawbacks. First, the massive amount of information about the source code on the web requires a considerable amount of time to preprocess them to use. Furthermore, the repeated search activity will hinder their performance since it breaks the flow of work. In order to resolve these downsides, this master thesis proposes a chatbot, a conversational agent, for searching the right code example. By using a chatbot, rather than searching via the web, developers can have several advantages. First of all, they can directly check the relevant code example without any accessory information. This will help them to stay focused on their work. Second, it removes the time required to preprocess the information when they use the web search. Lastly, the communication component of the chatbot can guide developers to make a good query in a step-by-step manner, since it is not easy to make a good query in one attempt. Thus, they can have a more relevant code example in the end. Implementation of our chatbot is based on three major components: Elasticsearch, FastAPI, and DialogFlow. Elasticsearch is a very powerful search engine; FastAPI is a modern way of creating API in Python; DialogFlow is a tool for creating chatbot frames, pre-trained by Google, with very easy integration with other popular chat applications. Even though it is a preliminary result, the performance of our chatbot is promising in retrieving correct search output in a single-round conversation. In order to evaluate this, we create mock queries from the docstring in our dataset. The result shows that over 60% search accuracy for the tf-idf based mock queries and over 30% search accuracy for the mock queries created from the randomly selected words. Last but not least, we also propose the possible experiment design to test our chatbot in how well it can guide the developers to end up finding the right code example in the multiple-round conversations.
PDF File Download
Export BibTeX