Sort customer emails by mood, refund request and urgency with Gemini Decision 1

Mervin Praison shows how Google's Gemini Decision 1 picks one answer from your choices with a confidence percent, sorting five shop emails by mood, refund and reply speed.

Mervin Praison · YouTube · published Nov 15, 2026 · Sales, Marketing & Support

Sort customer emails by mood, refund request and urgency with Gemini Decision 1 — video by Mervin Praison▶ Watch on YouTube
Prompt
Write a Python script using the google-genai library and the Gemini Decisions API (model gemini-decision-1, api_version v1beta, key from GEMINI_API_KEY). For each customer email, ask three questions in one request: mood (choice: happy, neutral, angry, other), refund (yes/no: is the customer asking for their money back?) and reply speed (score: in a few days, today, right now). Print each answer with its confidence percent, and flag anything below 80% for a human to review.

Visual breakdown

Gemini Decision 1 is a new Google AI that doesn't write text: it picks one answer from your list and says how sure it is. Mervin sets it up for free and sorts five shop emails by mood, refund request and reply speed.

The problem: A shop with hundreds of emails a day needs one word per message, such as angry or happy, not a long chatbot answer.

How the email sorter works

  1. Customer emailsFive test emails: thank you, address change, broken parcel, sarcastic complaint, refund for a broken zip
  2. SetupAI Studio key, Python, VS Code, a virtual environment, google-genai installed
  3. Three questionsChoice (mood), yes/no (refund) and score (reply speed) in one request each
  4. Gemini Decision 1Picks one option per question and returns a confidence percent, no text
    Dropped: Writes no sentences
  5. Human check ruleAbove a threshold such as 80% code acts; below it a person checks
    Dropped: Unsure answers go to a person
  6. Sorted tableMood, refund and reply speed per email, identical on every run
InputsSetup / codeAI modelResult

The three question types

  1. Choice: pick one of happy, neutral or angry
  2. Yes or no: is the customer asking for their money back?
  3. Score: reply in a few days, today, or right now

By the numbers

96%sure the sarcastic email is angry
56%sure on the broken parcel's refund
$0.10per million input tokens
10,000emails a day on the free tier

Run it yourself

Free setup on a Mac; the Windows lines are in the video description but untested.

  1. Create an API key at aistudio.google.com and keep it secret
  2. Install Python from python.org and VS Code
  3. In Terminal make a folder, create a virtual environment and pip install google-genai
  4. Export your key as GEMINI_API_KEY
  5. Save decide.py from the description and run it: angry, 96% sure
  6. Run full.py to sort all five emails, then swap in your own

On the free plan Google may use what you send, so test with fake emails, not real customers'.

Rules and caveats from the video

  • Add an extra choice called other to every choice question, or it will always pick something.
  • Pick a confidence cut-off such as 80% and send unsure answers to a person.
  • Keep a person on big money actions like sending a refund.
  • Treat the percent as a guide; the creator didn't test Google's claim that 80% means right 8 times in 10.
  • For written text or summaries, use a normal Gemini model instead.

Distilled from the video’s captions

How to try it

  1. Open Gemini Decision 1.
  2. Copy the prompt and fill in the [placeholders].
  3. Watch Mervin Praison's video for the full walkthrough and setup.

Related use cases

Share