GSoC Project: cobot enhancement - porting cobot and adding new features

21 views
Skip to first unread message

Meet Mangukiya

unread,
May 7, 2017, 7:35:19 AM5/7/17
to coala-newcomers
We all know about our lovely bot cobot(@coala-bot). The current cobot is written in coffeescript, which would make you think why coffeescript while coala is a python community, right? So I'll be porting cobot from coffeescript to python bot framework this summer while adding new fucntionalities as well.

The goals of my project are:
1. Port existing cobot functionalities:
We as a community are already using cobot a lot, ranging from inviting newcomers to the organization, assigning to issues, to marking Pull Requests as "WIP" or "Pending Review". So, it becomes essential to port the existing functionality if we are moving to a new framework to do the same and better job in python.

Why are we porting cobot?
1. First of all, as I mentioned earlier since coala is python community, it doesn't make too much sense to have the bot written in coffescript. Rewriting cobot in python will ensure that the project is maintained and receives good contribution as well.
2. There are problems with the hubot gitter adapter which is leading to problems like, not working on the very first message, not working for some users(at all.), etc.
3. One of the other main reasons is that we can do pretty amazing things if the plugins are written in python, we can use any python package in the script. 
4. Better testing: testing is one of the things that cobot has been lacking since the start, which has led to merging of scripts that didn't work and required fixing. Tests would've never led something like that to be merged in the repo. I have to create a better testing chain, and likely a test helper for plugin writers to be easily able to write tests for their scripts.
5. Easy deployment.

2. New Functionality:
1. Search API docs
2. Search User docs
3. List all the bears(and ideally ability to filter the output as well)
4. stats(no. of bears, no. of languages supported, etc.)
5. Show contribution stats(issues opened, number of commits, PRs reviewed, etc.)
6. Run bears on a piece of code, from chat and yield the results and diffs
7. Auto-Reply on a question, if answer is found. (See topic modelling section for this.)

3. Auto-responder
We want to add a feature to cobot that can answer user questions. It'll be triggered if a sentence ends with a question mark or has a question mark somewhere in the sentence(can be changed.) 
We want to use topic-modelling for this purpose. The idea is to use the documentation, separate in chunks, and feed it as training data, and then use these trained model to find answers for the given question.

How is this different from new functionalities 1 and 2?
In new functionalities 1 and 2, a user issues a command with the exact search string that will be used for searching the docs. 

What are the benefits of this?
cobot will be auto-responding to the questions whose answer it already knows (data is being fed beforehand). - Questions don’t have to be exactly same. cobot will be doing NLP and hence still return an answer for a differently put question. Which will really help the maintainers and even developers to get quicker answers. 

What are the downsides?
Since NLP is involved and also since there will be programming terms in the sentences as well, there will be false positives. 

Why should we use this then?
Sure, there will be false positives. But there will be times when the answer suggested by cobot will actually be correct. If this feature was not there, then the user anyway had to wait for an answer and if the answer is incorrect then someone will probably point it out as well. So it is anyway a benefit.
Reply all
Reply to author
Forward
0 new messages