Witmint Academy
Back to the hub

AI news explained | 11 November 2026

How to test AI decisions with a fixed set of choices

Turn Google's Gemini Decisions API announcement into a five-ticket routing test.

On 11 November 2026, Google introduced the Gemini Decisions API. It scores choices you define for inputs such as text, images, and PDFs.

Think of a help desk deciding where to send a ticket. Your app can use those scores to route clear requests and hold uncertain ones for review. This exercise tests that rule with five fictional tickets.

Compare the two approaches

Ticket routing options
QuestionFree-text classificationScoring fixed choices
What comes back?A generated reply such as "Send this to accounts."A choice and scores for the defined options.
What must the app handle?Parse wording or validate a structured answer.Check the winning score and apply a review rule.
Where can it fail?Phrasing changes or a new category appears.A confident wrong answer passes an untested threshold.

Naive output

The app searches for "Billing" in a free-text reply. It misses "send to accounts."

Verified output

The app receives scores for the agreed labels. It applies a separate rule before routing.

Why it failed. The parser relied on exact wording the model was free to change.

See how scores become routes

The model scores the choices. The application decides whether a person should review the ticket. Read the support ticket Score the three choices Apply the routing rule Send to a team or review
The model scores the choices. The application decides whether a person should review the ticket.
0.910.91
0.060.06
0.030.03
Example scores for the duplicate charge. Billing wins at 0.91 and clears the example threshold of 0.75.

A threshold is the minimum score the app accepts for automatic routing. The numbers here are mock scores for practice.

1. Define the choices

  • Billing. Use for charges, invoices, and payment problems.
  • Technical. Use for errors, bugs, and features that fail.
  • Needs review. Use for vague, mixed, or unrelated requests.

Pass these descriptions to the evaluator. In this exercise, the app routes each ticket to one destination.

2. Stress-test five tickets

Mock scores and expected routes
CaseTicket textB / T / RNaive routeChecked route
BillingI was charged twice for order W-104.0.91 / 0.06 / 0.03BillingBilling
TechnicalThe dashboard freezes when I export a CSV.0.04 / 0.93 / 0.03TechnicalTechnical
VaguePlease fix this.0.45 / 0.40 / 0.15BillingNeeds review
MixedI was billed twice and the dashboard freezes on export.0.47 / 0.49 / 0.04TechnicalNeeds review
Out of scopeWhere can I apply for a job at your company?0.05 / 0.04 / 0.91BillingNeeds review

B means Billing, T means Technical, and R means Needs review. For the naive routes, imagine the app has only two choices and always picks one.

Naive output

Please fix this. Routes to Billing, with no evidence for that team.

Verified output

Please fix this. Routes to Needs review. The top score is 0.45.

Why it failed. Forced routing treats ambiguity as a valid team assignment.

3. Run the routing rule

Save this as routing_check.py and run python routing_check.py. It uses the mock scores above, so you can test the app rule without a key.

routing_check.py
def route(scores, threshold=0.75):
    winner = max(scores, key=scores.get)
    if winner == "Needs review" or scores[winner] < threshold:
        return "Needs review"
    return winner

labels = ("Billing", "Technical", "Needs review")
cases = [
    ((0.91, 0.06, 0.03), "Billing"),
    ((0.04, 0.93, 0.03), "Technical"),
    ((0.45, 0.40, 0.15), "Needs review"),
    ((0.47, 0.49, 0.04), "Needs review"),
    ((0.05, 0.04, 0.91), "Needs review"),
]
for values, expected in cases:
    decision = route(dict(zip(labels, values)))
    print(decision)
    assert decision == expected, (values, decision, expected)

Try lowering the threshold to 0.40. The vague ticket now goes to Billing and the assertion fails. Pick a real threshold using reviewed tickets. Then test it on a separate set the app has never seen.

Read Google's announcement

Google introduced Gemini Decisions API on . See the original announcement and API example.