Address completeness

Check whether a delivery address has what a driver needs, or is missing a unit, ambiguous or outside the service area.

F@f

Problem

Address validation services confirm that a street exists, but not that a driver can find the right door. Missing flat numbers and vague rural directions cause repeat failed attempts.

Goal

Catch addresses that will fail before dispatch or a re-attempt, and ask the customer one specific question.

Input / state

The address as entered, any delivery notes, and facts your address service already returned.

address
The address lines as the customer entered them.
address_service
Facts from your address lookup, such as "multi-unit building" or "outside service area".
delivery_notes
Any directions the customer added.

Decision question

ChoiceQuestion key address_status

Does this address give a driver what they need to deliver to the right door?

Options

  • deliverableComplete and specific enough for a driver to find the door.
  • missing_unitA multi-unit building with no flat, suite or unit number.
  • ambiguous_locationThe location can't be pinned down, for example vague rural directions or conflicting details.
  • not_serviceableYour address facts say the carrier cannot deliver here, for example outside the service area.

Allowed outcomes

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

  • DeliverableChoice is deliverable and confidence meets your threshold.
  • Ask for unit numberChoice is missing_unit and confidence meets your threshold.
  • Ask for directionsChoice is ambiguous_location and confidence meets your threshold.
  • Not serviceableChoice is not_serviceable and confidence meets your threshold.
  • Needs a personConfidence is below your threshold: probability is spread across options.

Example scenarios

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

Example state

{
  "address": "27 Mill Lane, Hebden Bridge, HX7 8AB",
  "delivery_notes": "",
  "address_service": "single dwelling, in service area"
}

Outcome

Illustrative
Deliverable

Choice is deliverable and confidence meets your threshold.

Why

A single dwelling with a full address.

Using it well

  • Postcode and street validation belong to an address service. Pass its results in; this question covers what the service can't judge.
  • Ask the customer for exactly the missing detail. A generic "please check your address" is often ignored.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "address": "<address>",
    "address_service": "<address_service>",
    "delivery_notes": "<delivery_notes>"
  },
  "questions": {
    "address_status": {
      "type": "choice",
      "instructions": "Does this address give a driver what they need to deliver to the right door?",
      "criteria": {
        "deliverable": "Complete and specific enough for a driver to find the door.",
        "missing_unit": "A multi-unit building with no flat, suite or unit number.",
        "ambiguous_location": "The location can't be pinned down, for example vague rural directions or conflicting details.",
        "not_serviceable": "Your address facts say the carrier cannot deliver here, for example outside the service area."
      }
    }
  }
}

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)