We were interested in our messaging data from Facebook and we were curious as to what we could do with it.

What it does

Our project takes messaging data between you and any individual in the form of a json file you can download directly from Facebook and uses it to mimic a chat interaction between you and a simulated version of the individual.

How we built it

We iteratively added features to our model for calculating the best response given a certain input phrase or word. It works by finding a best match to the given phrase to something you've said before in one of your messages, and then it finds the next message block sent by the other person within a certain timeframe. If there are multiple best matches, it uses sentiment analysis (from Google Cloud Natural Language API) to calculate the sentiment for each response phrase (i.e negative/positive) and picks the response that best matches the sentiment of the input phrase.

Challenges we ran into

This was our first time using Google Cloud API and we ran into some challenges with setting it up on the server. We also did not have much experience with statistical inference/machine learning so there was a steep learning curve at first. However, we all agree that we learned a lot from this experience, gaining knowledge about using existing powerful APIs in our projects and got valuable exposure to natural language processing and machine learning methods.

Accomplishments that we're proud of

We were able to get a working prototype running despite all of the challenges we faced. We are very proud of what we have accomplished; even though it's pretty basic and the bot's responses don't always make sense, we are extremely happy with what we have.

What we learned

We've learned how to collaborate efficiently as a group and have gained lots of valuable experience working with technologies we're not familiar with (especially without the hand-holding like in many of the computer science courses we've taken).

What's next for fb-chatbot

We have the bare bones of a working prototype so the next steps would be to make the user experience more pleasurable and to iterate upon the machine learning aspect of choosing responses so that the bot produces more accurate and realistic responses.

Share this project: