Dialogue and roadmap

Over a development team curry last Thursday (both of us!) we did a bit of planning towards the objective of having a polite.ai useable as an alpha by selected communities by the end of the year.

After early usability feedback, we’ve decided that a dialog based interface to report problematic interactions, and challenge dubious classifications is quite important at this stage.

Our early proof of concept embedded a link in each bot challenge which could be used to report inappropriate classifications and new issues. This works, but assumes the user is working on a platform where they have a browser and also takes them out of the chat context in order to report things through a traditional form based interface. In short, it was horrible and clunky.

If we are building a bot that can participate and understand language in a multi-party chat room then having it take the reports as inline dialogue is an important milestone before we release.

Dec Target

We are currently building dialogue support for room classification, reports and challenges into the personality server. Once complete this will allow basic interactions to be understood by both Matrix.org and Slack implementations.

To get a rapid prototype running, we are using Google’s Dialogflow API to do the NLP. We will however be implementing the state machine, context transitions and responses within our own code in the personality server, delegating just the entity and intent recognition to the Google API (it also has a nice line in smalltalk).  That way, we can experiment with other tools and APIs in the medium term. In particular, I’m quite interested in experimenting with an Open Source model like Raza for the production service.

The MVP should be complete during the first few months of 2018, at which point we will be ready to start testing with selected communities. If you are interested in being an early test community then please get in touch.

Father Ted is in the room

The last 24hrs have been fairly frantic, but we now have a polite-frted in the #test:matrix.org Matrix room for our TADHack pitch. Truth told, Joe did most of the work on this before he left last night and all we’ve managed to do is break things and then put them back together again since, but we’ve learnt loads in doing so.

REST API for classification done

First job of the day was hosting the API that I had developed last week up somewhere.

It now lives at http://api.polite.ai thanks to some free GCP developer programme credits from Google!

How to use the API

POST to http://api.polite.ai/api/1.0/classify:

{ 
    "text" : <String> // Message to be classified
}

Response

{ 
    "request" : { }, // your request verbatim 
    "results" : {
        "aggression" : bool, // text is aggressive
        "attack" :  bool, // text is a personal attack
        "toxicity": bool // text is toxic 
     }
}

Example

curl -i -H "Content-Type: application/json" -X POST -d '{"text":"You stink"}' http://api.polite.ai/api/1.0/classify

Produces

{"request": {"text": "You stink"}, "results": {"aggression": "1", "attack": "1", "toxicity": "1"}}