Recipes
Ready-made questions for chat, comments, email, calendars and team chat, straight from the library.
Recipes are plain question objects exported as recipes. Each asks one narrow judgment and spells out its outcomes, following TypeSafe's guidance. Use them as they are, or copy one and change the wording.
import { monitor, recipes } from "jev-events";
import { twitch } from "@jev-events/twitch";
const chat = monitor({
source: twitch.chat(),
questions: { kind: recipes.chat.kind, hateful: recipes.chat.hateful },
});The question id is yours to choose. { hate: recipes.chat.hateful } fires "hate" instead of "hateful".
Thresholds are yours too. The chat recipes kind, hateful, question, streamIssue and spam are scored on the benchmarks page, which shows precision and recall at each threshold. The others haven't been benchmarked yet, so measure them on your own data before acting on them automatically.
This page is rendered from the library's source, so it always matches the version on the site.
Chat
For live chat, such as Twitch's.
recipes.chat.kindOne label, each its own event
What is this live chat message mainly doing?
- "kind:question"
- Asks the streamer or chat a genuine question
- "kind:hype"
- Cheers, celebrates or reacts with excitement
- "kind:joke"
- A joke, meme, emote spam or friendly banter
- "kind:backseat"
- Tells the streamer how to play or what to do, without being asked
- "kind:spam"
- Advertising, self-promotion, scams, suspicious links or repeated junk
- "kind:other"
- Anything else
recipes.chat.hatefulYes or no
Does this message attack, insult or demean a person or group?
- yes
- Harassment, slurs, threats or dehumanizing language aimed at someone
- no
- No attack on anyone; swearing, banter and criticism of gameplay are fine
recipes.chat.questionYes or no
Is this message a genuine question directed at the streamer?
recipes.chat.streamIssueYes or no
Is this message reporting a technical problem with the stream itself, such as no sound, lag, buffering, a black screen or audio out of sync?
recipes.chat.spamYes or no
Is this message spam: advertising, self-promotion, a scam or a suspicious link?
recipes.chat.spoiler("Elden Ring")Yes or no
Does this message reveal story, ending or boss details about Elden Ring that a first-time player would not want to know?
recipes.chat.toxicityA score on its scale
How toxic is this message toward other people?
- 0
- Friendly or neutral
- 1
- Rude or dismissive, but not aimed at hurting anyone
- 2
- Insulting or mean toward someone
- 3
- Harassment, slurs or threats
Comments
For comments under videos and posts.
recipes.comments.needsReplyYes or no
Would a reply from the creator be valuable to this commenter?
recipes.email.needsReplyYes or no
Does this email need a personal reply from the recipient?
- yes
- A real person asks the recipient something or expects a response
- no
- Newsletters, notifications, receipts, marketing or messages sent just for information
recipes.email.kindOne label, each its own event
What kind of email is this?
- "kind:personal"
- Written by someone to the recipient personally
- "kind:work"
- About the recipient's job, projects or colleagues
- "kind:receipt"
- Receipts, invoices, orders and shipping updates
- "kind:newsletter"
- Newsletters and marketing
- "kind:notification"
- Automated notifications and alerts
- "kind:other"
- Anything else
recipes.email.urgentYes or no
Does the sender say this is urgent or time-sensitive?
recipes.email.phishingYes or no
Does this email try to get the recipient to share credentials, pay money or open a link under false pretenses?
Calendar
Compute times in code and pass them as facts. Jev judges meaning; date math belongs in your code.
recipes.calendar.importantYes or no
Is this event important to the attendee?
- yes
- Missing it would have real consequences: a decision, deadline, interview, client, doctor or someone relying on them
- no
- Routine, optional or large broadcast events, and events they could skip or catch up on later
recipes.calendar.needsPrepYes or no
Would the attendee need to prepare before this event, for example by reading material, building slides or making a decision?
recipes.calendar.likelySalesYes or no
Is this invitation most likely a sales or vendor pitch?
recipes.calendar.kindOne label, each its own event
What kind of event is this?
- "kind:meeting"
- A work meeting with other people
- "kind:interview"
- A job interview
- "kind:social"
- A social or personal event with other people
- "kind:focus"
- Time blocked for focused work
- "kind:personal"
- An appointment or reminder for the owner only
- "kind:other"
- Anything else
Team chat
For Slack channels and direct messages.
recipes.team.needsAnswerYes or no
Is someone waiting for an answer to this message?
- yes
- It asks a question, asks for a decision or asks someone to do something
- no
- Updates, chatter, thanks and messages that are just for information
recipes.team.urgentYes or no
Is this message about something urgent, such as an outage, a blocker or a deadline today?
recipes.team.kindOne label, each its own event
What is this message mainly doing?
- "kind:question"
- Asks a question
- "kind:request"
- Asks someone to do something
- "kind:incident"
- Reports an outage, a bug or something broken
- "kind:update"
- Shares news, progress or information
- "kind:social"
- Chat, thanks, jokes or greetings
- "kind:other"
- Anything else
recipes.comments.kindOne label, each its own eventWhat is this comment mainly doing?