Giter Site home page Giter Site logo

taiwan-bot's People

Contributors

erickhun avatar geekyme avatar jonathanbgn avatar matrinox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

taiwan-bot's Issues

Log questions , answers, and similarity score

We should be able to see (logs?) what questions people asks to the bot , also the answers given and the score (similarity) associated to it.

Just a log file or even writing it in the spreadsheet would be good, so we could adjust the dataset

Reload data from spreadsheet when it changes

The problem is that now we need to redeploy the bot to repull data from the spreadsheet.

Some ideas:

  • reload the data at every request, but this could be heavy for embedding all data at each time?
  • reload every X minutes
  • any other idea?

A Smart Taiwan Law Bot?

One of the interesting idea is to try our AI model on Taiwan official regulation . It will be the same as Talk to Book from Google. Since @jonathanbgn implemented the same model as the Talk to Book, it is probably possible to have the same results?

An other tricky part is that we might not want the "normal" bot just quoting the law . Maybe this can be a separate bot called "Talk To Taiwan Law"?

It will also be a good PR stunt for us if it ends up to be accurate enough

Screen Recording 2020-09-26 at 11 19 AM

@fifieldt mentioned those links to get some law texts in english :

https://law.moj.gov.tw/Eng/LawClass/LawAll.aspx?PCode=D0080132
https://law.moj.gov.tw/ENG/LawClass/LawAll.aspx?PCode=A0030295
https://law.moj.gov.tw/ENG/LawClass/LawAll.aspx?PCode=D0080204
https://law.moj.gov.tw/ENG/LawClass/LawAll.aspx?PCode=G0340150

Fix context when responding to slack channel

Screenshot 2020-10-29 at 5 12 43 PM

Case:
User A ask a question about gold card -> Bot respond with context in gold card
User B ask a question not about gold card -> Bot still respond with context in gold card

Expected:
User B should get message with context in General instead.

Bot crashes if you spam it too many times

I tested this by spamming taiwan a lot of times; it responded 17 times before it encountered a bug Unsure if this is crashes if one person spams it too much or if it hits a certain threshold of requests from all sources. Here's "proof":

Screen Shot 2020-11-05 at 12 03 28 AM

Screen Shot 2020-11-05 at 12 03 37 AM

Scrape LINE

We know that the LINE group is spammed with questions already answered within the group. So we could scrape the LINE group for valuable questions (and answers). This improves the bot for questions commonly asked in that LINE group; we could then add the bot the the LINE group (or direct others to that bot).

We can start by exporting the chat log (from someone's account who's used it the longest without LINE deleting previous chats) and scraping that. Then we can consider API integration in the future.

Other channels we can consider for scraping:

  1. The Gold Card FB group
  2. Other expat FB groups
  3. Slack channels

Can't test locally for slack / channel specific code

For example, when developing something for slack (replying to thread), i can't use the local emulator.

Today, I literally test in production by going to the server to check out my branch code and reload. ๐Ÿ˜ข

Manage multiple questions from a single line in Google Spreadsheet

We have too many copy/paste of the same answer in the Google Spreadsheet. It starts becoming hard to maintain, and keep all answer updated. It will make it easier for us to add many variations of a question

The parser should be able to take multiple variations of the same question, from a single line. We can strip it with a new line like :

Image 2020-11-03 at 11 03 55 AM

Chatbot Recommendation

Hello everyone, @erickhun told me about the FAQ bot project which I found quite interesting.

I've been building many side-projects using NLP these past years and I think the easiest solution would be using sentence embeddings to find the most relevant answer to the user's question. Google recently released a light-weight, easy to implement model that you can use directly in Google Sheets to map questions to the best answers.

Here is an overview of how that works:

Screen Shot 2020-09-17 at 4 58 34 PM

You can experiment yourself by going to the shared spreadsheet (you'll need to install Semantic Reactor first).

To implement that into a website we could run the model directly in Javascript on the client side using TensorFlow.js (no server needed), or build a small backend to be able to interact with it through Line for example. I could help with that part if needed!

Buttons to get better response

So if anytime our bot gives a bad answer to a user (we know with the score), we can leave 2 buttons for user to click:

  • Send me the answer once you have it
  • Let me give you the answer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.