Skip to content
jeff.support.requires-actionv1.4.0

Team action and escalation check

Checks a message against a team's policy to determine whether action or escalation is required. Each decision is yes, no or unclear.

Open in playground

Example

Context

team
organisation: Westmoor Borough Council name: Highways team
policy
- The team handles potholes, damaged road signs, blocked drains on roads and broken street lights. - Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer. - Bin collections and parking fines belong to other teams.

Input

from: r.osei@mailbox.example to: highways@westmoor.example date: 2 November 2026 subject: Pothole on Mill Lane body: There's a deep pothole outside number 14 Mill Lane, right where cyclists come down the hill. Could someone take a look?

Answer (JSON)
value yes, confidence 0.991
Top options
  1. yes 0.991
  2. unclear 0.006
  3. no 0.003

Potholes are on the highways team's list, so the answer is yes.

Open in playground

import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_action", context={        "team": {            "organisation": "Westmoor Borough Council",            "name": "Highways team",        },        "policy": [            "The team handles potholes, damaged road signs, blocked drains on roads and broken street lights.",            "Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer.",            "Bin collections and parking fines belong to other teams.",        ],    })     decision = decide({        "from": "r.osei@mailbox.example",        "to": "highways@westmoor.example",        "date": "2 November 2026",        "subject": "Pothole on Mill Lane",        "body": "There's a deep pothole outside number 14 Mill Lane, right where cyclists come down the hill. Could someone take a look?",    })     print(decision.value, decision.confidence)

More examples

  • Thank-you note for a repaired roadanswer no · confidence 0.991

    Context

    team
    organisation: Westmoor Borough Council name: Highways team
    policy
    - The team handles potholes, damaged road signs, blocked drains on roads and broken street lights. - Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer. - Bin collections and parking fines belong to other teams.

    Input

    from: r.osei@mailbox.example to: highways@westmoor.example date: 4 November 2026 subject: Mill Lane body: Just wanted to say thanks for filling the pothole on Mill Lane so quickly. Much appreciated!

    Answer (JSON)
    value no, confidence 0.991
    Top options
    1. no 0.991
    2. unclear 0.007
    3. yes 0.003

    A resident only says thank you for a repair, so the team need not act and the answer is no.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_action", context={        "team": {            "organisation": "Westmoor Borough Council",            "name": "Highways team",        },        "policy": [            "The team handles potholes, damaged road signs, blocked drains on roads and broken street lights.",            "Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer.",            "Bin collections and parking fines belong to other teams.",        ],    })     decision = decide({        "from": "r.osei@mailbox.example",        "to": "highways@westmoor.example",        "date": "4 November 2026",        "subject": "Mill Lane",        "body": "Just wanted to say thanks for filling the pothole on Mill Lane so quickly. Much appreciated!",    })     print(decision.value, decision.confidence)
  • Missed bin collectionanswer no · confidence 0.995

    Context

    team
    organisation: Westmoor Borough Council name: Highways team
    policy
    - The team handles potholes, damaged road signs, blocked drains on roads and broken street lights. - Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer. - Bin collections and parking fines belong to other teams.

    Input

    from: j.pike@mailbox.example to: highways@westmoor.example date: 3 November 2026 subject: Bins not collected body: Our street's green bins were not emptied this morning, the second week running. Please send the lorry back.

    Answer (JSON)
    value no, confidence 0.995
    Top options
    1. no 0.995
    2. unclear 0.004
    3. yes 0

    Bin collections belong to another team under the policy, so the highways team need not act and the answer is no.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_action", context={        "team": {            "organisation": "Westmoor Borough Council",            "name": "Highways team",        },        "policy": [            "The team handles potholes, damaged road signs, blocked drains on roads and broken street lights.",            "Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer.",            "Bin collections and parking fines belong to other teams.",        ],    })     decision = decide({        "from": "j.pike@mailbox.example",        "to": "highways@westmoor.example",        "date": "3 November 2026",        "subject": "Bins not collected",        "body": "Our street's green bins were not emptied this morning, the second week running. Please send the lorry back.",    })     print(decision.value, decision.confidence)
  • Exposed cable by a schoolanswer yes · confidence 0.996

    Context

    team
    organisation: Westmoor Borough Council name: Highways team
    policy
    - The team handles potholes, damaged road signs, blocked drains on roads and broken street lights. - Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer. - Bin collections and parking fines belong to other teams.

    Input

    from: head@westmoorprimary.example to: highways@westmoor.example date: 3 November 2026 subject: Live cable on the pavement body: A street light outside our school gate has been knocked over and there are bare wires on the pavement. Children arrive in 30 minutes.

    Answer (JSON)
    value yes, confidence 0.996
    Top options
    1. yes 0.996
    2. no 0.002
    3. unclear 0.002

    Bare wires on a pavement by a school are an immediate danger, which the policy says to escalate, so the answer is yes.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_escalation", context={        "team": {            "organisation": "Westmoor Borough Council",            "name": "Highways team",        },        "policy": [            "The team handles potholes, damaged road signs, blocked drains on roads and broken street lights.",            "Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer.",            "Bin collections and parking fines belong to other teams.",        ],    })     decision = decide({        "from": "head@westmoorprimary.example",        "to": "highways@westmoor.example",        "date": "3 November 2026",        "subject": "Live cable on the pavement",        "body": "A street light outside our school gate has been knocked over and there are bare wires on the pavement. Children arrive in 30 minutes.",    })     print(decision.value, decision.confidence)
  • Faded road signanswer no · confidence 0.975

    Context

    team
    organisation: Westmoor Borough Council name: Highways team
    policy
    - The team handles potholes, damaged road signs, blocked drains on roads and broken street lights. - Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer. - Bin collections and parking fines belong to other teams.

    Input

    from: m.lowe@mailbox.example to: highways@westmoor.example date: 3 November 2026 subject: Sign on Station Road body: The 'No through road' sign at the top of Station Road has faded and is hard to read. Could it be replaced at some point?

    Answer (JSON)
    value no, confidence 0.975
    Top options
    1. no 0.975
    2. unclear 0.021
    3. yes 0.004

    A faded road sign is the team's work but no danger to people, so it needs no escalation and the answer is no.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_escalation", context={        "team": {            "organisation": "Westmoor Borough Council",            "name": "Highways team",        },        "policy": [            "The team handles potholes, damaged road signs, blocked drains on roads and broken street lights.",            "Any report of an immediate danger to people (for example an exposed cable or a collapsed road) must be escalated to the duty officer.",            "Bin collections and parking fines belong to other teams.",        ],    })     decision = decide({        "from": "m.lowe@mailbox.example",        "to": "highways@westmoor.example",        "date": "3 November 2026",        "subject": "Sign on Station Road",        "body": "The 'No through road' sign at the top of Station Road has faded and is hard to read. Could it be replaced at some point?",    })     print(decision.value, decision.confidence)

Use when

  • Your team receives many informational messages and has a policy defining which ones require action.

Avoid when

  • You need to choose between several teams; use Shared inbox triage.

Context and input

FieldKindDescription
message
inputThe message: an object with from, to, date, subject and body.
team
contextThe team: an object with the organisation and the team's name.
policy
contextThe team's policy: a list of sentences saying what the team handles and when a message must be escalated.

Functions

KeyInterfaceInstructionsLabels
requires_actionclassifyGiven the team's policy, does this message require action from the team? yes: the message asks the team, openly or by clear implication, to do something about a matter the policy gives to this team, or one of the policy's escalation rules applies to it (escalating is an action). no: the message only shares information and no escalation rule applies, or it concerns a matter the policy gives to another team, or the policy says the team does not act on it (for example below a stated amount). unclear: the answer depends on something the policy and the message do not settle, for example a matter the policy gives to no team, or an amount that a rule depends on but the message does not state. Judge what the message actually asks and the facts it gives, not its tone, its claims of urgency or other misleading cues.no, unclear, yes
requires_escalationclassifyGiven the team's policy, must this message be escalated? yes: one of the policy's escalation rules applies, for example the message raises a kind of matter that the policy says must always be escalated, or a request's amount is above the limit the policy sets. no: no escalation rule applies, for example an amount at or below the limit when the rule says 'above', or nothing of the kinds the rules list. unclear: whether a rule applies depends on something the message does not settle, for example the amount a rule depends on is not stated, or the message only hints vaguely at a matter that must be escalated. Judge the facts the message gives, not its tone, its claims of urgency or other misleading cues.no, unclear, yes

How it was measured

Test accuracy: the share of test rows whose top answer was right.

  • 98.2% on the in-house test (2,136 rows). in-house: same generator as the training data
  • 98.1% on a second in-house test of unseen cases (2,224 rows). in-house: same generator as the training data

When confident

From the calibration set: at or above the threshold confidence, how often the answer is right, and how often the adapter is that confident. Below it, escalate.

FunctionRight when confidentConfident onThresholdCalibration rows
requires_action98.3%100.0%0.501,087
requires_escalation99.1%100.0%0.491,087

Caveats

  • Training and test rows were kept only where a blind LLM check agreed with the label, so these scores are probably inflated.

Base: Jeff v1.4. Adapter trained: 25 October 2026.

Base

jeff-base v1.4

Call it

jeff.support.requires-action.requires_action, with placeholders for its input and context.

import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.support.requires-action.requires_action", context={        "team": "<team>",        "policy": "<policy>",    })     decision = decide("<message>")     print(decision.value, decision.confidence)

Download

Weights: mstrasser/jeff-adapter-requires-action (v1.4)

Licence: Apache-2.0