zen-mode / Whatsapp-Zen-Mode

MIT License
7 stars 8 forks source link

Initial Design/spec/research of NVCBot (Notify me when I'm Triggered) #59

Open ripper234 opened 3 years ago

ripper234 commented 3 years ago

As a user, I would like to be notified when I am triggered in a conversation.

When I am angry, unaware, not in control, and I write texts - I often says things that I might regret later, things that hurt other people and/or me, things that I'm not really connected to. So, I would like Zen Mode to detect this and let me know, in real time (or as close to realtime as possible): "Take a moment to breath - you might be triggered". It can let me know in various ways, the easiest if just showing this in a very clear, emphasized way, on the conversation itself. We'll discuss later how and when to show this.

(The exact wording of the message will probably change).


feature flag

This feature will probably be 'experimental' for some time, before reaching GA (production release). So, the entire feature including both opt-in switches will only be seen if the user have run a special javascript bookmarklet that turns it on. We will need two bookmarklet, one to turn all experimental features on, and another to turn all of them off.

When the feature is off it is completely invisible and turned off, doesn't appear in any menu.

opt-in feature switch

This feature is not for everyone. Some people might not like this, for any number of reasons.

  1. It requires sending your conversation/s fulltext to ourservers, thus hurting your privacy.
  2. Some people don't want to know when they're triggerred.
  3. Our algo will not be 100% correct. It can be annoying for the bot to tell you "I think you're triggered", when you're actually not.
  4. ...

For these reasons, the feature will be opt-in, off by default.

As a user, I can enable this feature in the Zen Mode menu ("ZM-->Let me know when I'm Triggered"). This opens up a confirmation dialog for a concise informed consent. The dialog will display some info/text to the user explaining the essence of the feature, privacy considerations, and asking the user to let us know how the feature works so we can improve it.

The exact text will be determined later by our lawyer. For now use the text "Watch out. This is an experimental feature, which involves sending the full text of some or all your conversations to our servers for analysis. Use this only if you know what you're doing."

opt-in at the conversation level

After the feature is enabled, a new command is added to the Conversation Menu. "Let me know when I'm Triggered". After clicking this, the entire historic full text of this conversation is uploaded to our servers for analysis. Only conversations that the user opted in to analyze are uploaded to our server.

From this moment on, every new message in this conversation is uploaded as well.

When the server recognizes a new message (only new, not historic messages) that has an angry sentiment, it notifies the client, which then pops a "Hmm, maybe you're triggered? Do you want to take a moment?" notification inline in the conversation, with some icon (warning sign? "!"). The user can click one of two buttons "Maybe I am" or "No thanks". The information which button the user clicked if any is recorded on our servers, as well as the message it relates to, timestamps, and other metadata. This info will be used later on to learn and improve the feature.

There needs to be a clear indication of the "are you triggered" message both on the message that triggered it, and at the bottom of the chat (when you scroll all the way down). The user should not miss the fact that he has written potentially triggered messages (even if the analysis took a few minutes, and 50 messages were exchanged between the parties in this time).

The "are you triggered" message appears only in relation to the messages the user himself wrote, not messages that the other parties in the conversation wrote.

Testing historic messages

For testing purposes, the system admins&testers would like to view what the bot thought about the sentiment of all historic conversations in a specific chat (as opposed to the user, which only needs to know/be warned about the sentiment of new messages). Some mechanisms to enable this should be developed. Exact specification TBD. (e.g. a javascript snippet/bookmarklet that enables 'developer mode')


Backend/algo

The real meat of this feature is the backend/algo. How to detect that the user is triggered, in realtime.

What I have in mind, is to research and integrate some existing package for sentiment analysis, deliver it in a test version, and then we can run some alpha tests on our conversations and see whether the algorithm is good enough / useful to us. After a sufficient testing period we can learn enough and either:

  1. Release the feature if it's adding value
  2. Go back to the drawing board
  3. Or scrap the feature if it's not useful

Please consult with us when evaluating different backend / sentiment analysis systems. We would like to review this selection early on in the process, before you write any code.

Statistics / Reports

We prefer false negatives in the feature, rather than false positives. False positives will annoy the user and they will turn the feature off, so we should have "very lower" false positives ratio. I'd rather not set specific numeric goals right now, we'll see this in the future.

The admins (we) should receive reports that include aggregated data

The reports can be initially delivered by an admin endpoint to the backend. A URL we can open whenever we want, that shows aggregated statistics & metadata. The report should be protected/secured in some way (e.g. a custom code "zenmode.com/report?c=123jkdAZzaf"). In later versions, we might want the report delivered to us every day/week via email.

Langagues

It's critical that Hebrew language is supported, as our initial userbase primarily speaks and writes Hebrew.

If you have to choose between Hebrew & English support, start with Hebrew. Of course, if we can get Hebrew & English for the same cost, let's do that.

Privacy of user data

Conversation/user data is highly sensitive. We need a design for how to keep it safe. Some encryption system should be provided, and this needs to be reviewed by us before developing.

The design goal should be to minimize the access that any human has to this data, and ideally only allow the minimum required machine processes to access this data.

liatzionimorad commented 3 years ago

ACK. Asked for a joint review