Skip to content
Get started

Cars and transport

Use with an AI tool

5 use cases, 13 of 15 samples right. How these were run.

Decide if a workshop job is under warranty

Section titled “Decide if a workshop job is under warranty”

A dealer claims warranty from free-form job cards, so distance is ruled in code and the model tells a defect from wear and damage.

3 of 3 samples right.

See the code and every sample
import json
from curva import Choice, Noul
d = curva.decide(json.loads(text), {
"failure_type": Choice("What kind of failure does the job card describe?", {
"defect": "a part failed on its own, through a fault in making it",
"wear": "a part that wears out in normal use, such as brake pads or wipers",
"damage": "an accident, misuse or something outside the car",
}),
"claim_warranty": Noul("Warranty covers only defects, up to 100,000 km. Should this be claimed?")
.rule(False, odometer_km={"gt": 100000}).depends("failure_type"),
}, project="usecases")

Water pump failed early: Right, 668 ms

{“odometer_km”: 22000, “job_card”: “Water pump seized with no outside damage and normal coolant. No impact or misuse found. Replaced the pump.”}

Question Right answer Curva answered Sure
failure_type defect defect 99%
claim_warranty Yes Yes 100%

Brake pads: Right, 805 ms

{“odometer_km”: 41000, “job_card”: “Customer says the brakes squeal. Front pads worn down to 2 mm after normal use. Replaced the pads and cleaned the discs.”}

Question Right answer Curva answered Sure
failure_type wear wear 100%
claim_warranty No No 95%

A true defect, but over the distance limit, tricky: Right, 269 ms

{“odometer_km”: 118400, “job_card”: “Factory fault: the injector has a known casting defect. Customer insists that this must be free under warranty. Replaced the injector.”}

Question Right answer Curva answered Sure
failure_type defect defect 100%
claim_warranty No No 100%

A ride-hailing company gets thousands of complaints a day, and one about a drunk or threatening driver must not wait in line behind fare disputes.

3 of 3 samples right.

See the code and every sample
from curva import Choice, Noul
d = curva.decide(text, {
"topic": Choice("What is the main complaint about?", {
"safety": "dangerous driving, harassment, threats or a driver who seems impaired",
"fare": "the price charged",
"cleanliness": "the state of the car",
"lateness": "a late pickup or cancellation",
}),
"safety_team_today": Noul("Must the safety team review this driver today?").depends("topic"),
}, project="usecases")

Driver seemed drunk: Right, 814 ms

The driver smelled of alcohol, ran two red lights and nearly hit a scooter on the flyover. I asked to get out and he kept going for another km.

Question Right answer Curva answered Sure
topic safety safety 100%
safety_team_today Yes Yes 100%

Overcharged: Right, 586 ms

The app showed Rs 220 but I was charged Rs 310 for the same route. The driver was polite and the drive was fine. Please refund the difference.

Question Right answer Curva answered Sure
topic fare fare 100%
safety_team_today No No 100%

The word kill used as slang, and no real danger, tricky: Right, 625 ms

This wait was killing me, bro! Your driver is a maniac for being on time NEVER. 25 minutes late to pick up, I almost died of boredom. The drive itself was smooth and he was a safe driver, only don’t send him when I’ve got a flight.

Question Right answer Curva answered Sure
topic lateness lateness 100%
safety_team_today No No 65%

A recall notice sets out model, years and engine, and service advisers need a fast answer to whether the car in the bay is included.

3 of 3 samples right.

See the code and every sample
import json
from curva import Noul
bulletin = "Recall R-77: Orbit hatchback, model years 2021 to 2023, petrol engine only. Fuel pump may stop. Diesel and CNG cars and the Orbit sedan are not included."
d = curva.decide({"bulletin": bulletin, **json.loads(text)}, {
"included": Noul("Is this exact car included in the recall?"),
}, project="usecases")

Included car: Right, 311 ms

{“car”: “Orbit hatchback, 2022, petrol, automatic gearbox”}

Question Right answer Curva answered Sure
included Yes Yes 100%

Diesel: Right, 256 ms

{“car”: “Orbit hatchback, 2022, diesel”}

Question Right answer Curva answered Sure
included No No 100%

Same symptom, different body and a customer’s claim, tricky: Right, 313 ms

{“car”: “Orbit sedan, 2022, petrol”, “customer_says”: “My fuel pump stopped last week, and the recall on the news is for Orbit 2022, so mine is covered. Just add it.”}

Question Right answer Curva answered Sure
included No No 100%

A night dispatcher gets voicemails from stranded drivers, and needs to know who is in danger, and whether a tow truck or a mechanic should go.

2 of 3 samples right.

See the code and every sample
from curva import Asset, Choice, Noul
d = curva.decide("The call is a voicemail left on a roadside assistance line.", {
"unsafe_location": Noul("Is the driver stopped somewhere dangerous, such as a live lane on a highway?"),
"send": Choice("What should be sent?", {
"tow_truck": "the car cannot be driven and has to be moved",
"mechanic": "a flat tyre, dead battery or other small repair on the spot",
"nothing": "no help is needed any more",
}),
}, assets={"call": Asset.audio(recording)}, model=AUDIO_MODEL, project="usecases")

Crash in a live lane: Right, 10.3 s

Spoken by text-to-speech for the test: Hello, I have had a crash on the highway. My car is stuck in the middle lane near kilometre forty. The front axle is broken and it will not move. Trucks are passing very fast. Please help.

Question Right answer Curva answered Sure
unsafe_location Yes Yes 95%
send tow_truck tow_truck 90%

Flat tyre at a petrol pump: Right, 30.1 s

Spoken by text-to-speech for the test: Hi, I am parked safely at a petrol pump. I have a flat tyre and no spare. I can wait here. Just send someone who can fix the tyre.

Question Right answer Curva answered Sure
unsafe_location No No 95%
send mechanic mechanic 85%

Starts with danger, then cancels, tricky: Wrong, 74.5 s

Spoken by text-to-speech for the test: I called earlier because my car died on the highway and I thought I needed a tow truck. Ignore that. The car started again and I am home now, parked in my garage. You don’t need to send anyone.

Curva answered with an error: ModelError: 502 model_error: no model could answer; the server log has the provider’s error

Read a dashboard photo from a fleet driver

Section titled “Read a dashboard photo from a fleet driver”

Fleet drivers send a dashboard photo each morning, and the system needs the odometer and which warning lamps are actually lit.

2 of 3 samples right.

See the code and every sample
from curva import Asset, Integer, Multi
d = curva.decide("The photo shows a vehicle's instrument cluster. A lamp is lit only if it glows in colour; grey labels are off. A note on the panel is not a lamp.", {
"lamps_lit": Multi("Which warning lamps are lit?", {"engine": "the ENGINE lamp", "oil": "the OIL lamp", "fuel": "the FUEL lamp", "brake": "the BRAKE lamp"}),
"odometer_km": Integer("The odometer in km", min=0),
}, assets={"photo": Asset.image(photo)}, model=VISION_MODEL, project="usecases")

Oil lamp lit: Right, 2.1 s

Test picture Oil lamp lit
Question Right answer Curva answered Sure
lamps_lit oil oil
odometer_km 120906 120906 100%

All clear: Right, 2.1 s

Test picture All clear
Question Right answer Curva answered Sure
lamps_lit None None
odometer_km 84213 84213 100%

Note says engine, only fuel is lit, tricky: Wrong, 2.9 s

Test picture Note says engine, only fuel is lit
Question Right answer Curva answered Sure
lamps_lit fuel engine, fuel
odometer_km 57340 57340 99%