Delivery instruction feasibility

Check whether a customer's delivery instruction can be followed under the carrier's service rules.

F@f

Problem

Customers add instructions like "leave it on the porch" to parcels that need a signature, or name places drivers can't reach. The driver finds out at the door.

Goal

Pass feasible instructions to the driver, and reply before the next attempt when an instruction can't be followed.

Input / state

The customer's instruction, the parcel's service level, and your carrier's rules.

instruction
What the customer asked the driver to do.
service
Parcel service level, for example "standard" or "signature required".
service_rules
Short summary of what drivers are allowed to do.

Decision question

NoulQuestion key instruction_feasible

Can a driver follow this instruction for this parcel under the service rules?

What counts as yes and no

  • trueThe instruction is allowed for this parcel and specific enough to follow.
  • falseThe service rules don't allow it for this parcel, or it asks for something drivers cannot do.

Allowed outcomes

Decided in your code from the answer and its confidence. Thresholds are yours to set and test.

  • Pass to driverProbability of yes is above your upper threshold.
  • UnclearProbability falls between your two thresholds.
  • Offer an alternativeProbability of yes is below your lower threshold.

Example scenarios

Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.

Example state

{
  "service": "standard",
  "instruction": "Leave with Mrs Patel at number 14.",
  "service_rules": "Drivers may leave parcels with a named neighbour or in a safe place out of sight from the street. Signature-required parcels must be handed to the recipient or collected from a pickup point. Drivers cannot enter gated areas without a code."
}

Outcome

Illustrative
Pass to driver

Probability of yes is above your upper threshold.

Why

A named neighbour is allowed for a standard parcel.

Using it well

  • Keep the rules short and concrete. Long terms of carriage make the question harder to answer consistently.
  • When an instruction can't be followed, offer the alternatives your rules do allow, such as a pickup point.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "instruction": "<instruction>",
    "service": "<service>",
    "service_rules": "<service_rules>"
  },
  "questions": {
    "instruction_feasible": {
      "type": "noul",
      "instructions": "Can a driver follow this instruction for this parcel under the service rules?",
      "criteria": {
        "true": "The instruction is allowed for this parcel and specific enough to follow.",
        "false": "The service rules don't allow it for this parcel, or it asks for something drivers cannot do."
      }
    }
  }
}

Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.

Version History

v1Current Versionabout 8 hours ago@f

Initial version

Comments (0)