madewithlaya

Catalog / Moderation & safety

0081GitHub

Before You Send: live tone, formality and fight-risk readings as you type

Paste a nervous message and watch tone (choice), formality 1–5 (score) and fight risk (noul) update as you type, 40–110 ms per call. Misses subtle passive-aggression.

Open source ↗ github.comcostfree, localtime40–110 ms / check
roisol144/before-you-sendREADME ↗
# Before You Send

**A message tone checker that runs while you type.** Paste or write a message you're nervous about (a text to an ex, an email to your boss, a Slack reply) and see how it will land, before you hit send.

You get three live readings and a language badge:

| Reading | What it shows | Comes from |
|---|---|---|
| **Tone** | friendly, neutral, passive-aggressive, angry or anxious, with a probability for each | Laya `choice` question |
| **Formality** | a 1 to 5 slider | Laya `score` question |
| **Fight risk** | a thermometer, plus a "Maybe sleep on it? 😬" banner above 60% | Laya `noul` question |

The "Copy & Send" button turns green when the risk is low.

The judging is done by [**Laya**](https://github.com/NandhaKishorM/laya), an open-source *decision model*. It is not a chat model: it never writes text, it picks from options you give it, in about 40 to 110 ms on a laptop. That speed is what makes checking on every pause in typing practical.

> **Status:** works end to end with real Laya. It is a prototype: it misses subtle passive-aggression and its formality slider barely moves (see [Findings](#findings-what-works-and-what-doesnt)).

---

## How it fits together



The browser waits 150 ms after you stop typing, then sends your text to `POST /analyze`. The FastAPI server passes it to Laya (the dashed area) and returns three typed answers, which the page turns into the pill, slider and thermometer. Everything outside the dashed box is plumbing.

---

## The classification layer: how Laya works

This is the part that makes the project different from "ask an LLM to classify it".

### It classifies. It doesn't write.



| | Regular LLM | Laya |
|---|---|---|
| How it answers | Writes tokens one by one, then you parse the text | Reads the input once and s

Also filed under Moderation & safety

  1. 0101

    Jev vs fine-tuned Laya: Banking77 goes from 51.3% to 79.4% with 1,001 examples

    Matched-budget fine-tunes on Banking77 and five more public workflows (prompt injection, SMS spam, emotion, request routing), plus two Aegis chat-moderation fine-tunes.

    Alexander-Ollman · Moderation & safety · free, local

  2. 0083

    Laya Warehouse Safety: a robot picks advance, shift or wait above a deterministic shield

    Replayable grid sim with moving workers and forklifts. Laya answers action, collision_risk, path_blocked and needs_operator in one call; collision prevention stays deterministic.

    Senthil Ravichandran · Moderation & safety · free, local

  3. 0082

    Slop Finder: a Chromium extension that flags AI-slop style on X, LinkedIn and Reddit

    Scores post style locally through a Laya-MLX helper as you scroll, using low-information and formulaic-rhetoric criteria and a conservative consensus score. Abstains when unsure.

    Wilson · Moderation & safety · free, local

  4. 0014

    laya-vision: typed decisions over images

    A vision variant of Laya on Hugging Face: the same choice/score/noul question shape, with an image as the state.

    thaitea · Moderation & safety