Travel and airlines
10 use cases, 29 of 30 samples right. How these were run.
Triage flight disruption claims
Section titled “Triage flight disruption claims”Compensation depends on the type of disruption, its length and whether the airline caused it, and passengers give those facts in the middle of a complaint.
3 of 3 samples right.
See the code and every sample
from curva import Choice, Noul, Numberd = curva.decide(text, { "event": Choice("What happened to the flight?", ["delay", "cancellation", "denied_boarding", "downgrade"]), "hours_lost": Number("How many hours did the passenger lose?", min=0, nullable=True), "airline_fault": Noul("Going by the facts given, was it something within the airline's control, such as a technical fault or a crew shortage, and not weather or air traffic?"),})Technical fault: Right, 981 ms
ZX 88 sat on the tarmac and was then cancelled. The crew told us it was a technical fault in the plane. I was rebooked and lost 9 hours.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| event | cancellation | cancellation | 100% |
| hours_lost | 9 | 9 | 100% |
| airline_fault | Yes | Yes | 100% |
Fog: Right, 1.1 s
We landed 2 hours late in Delhi because dense fog closed the runway, and the captain apologised. Do I get paid anything?
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| event | delay | delay | 100% |
| hours_lost | 2 | 2 | 100% |
| airline_fault | No | No | 100% |
Weather used as the excuse, tricky: Right, 955 ms
You say weather. Funny, every other airline left on time in that same weather, and your own gate agent admitted no crew was available. 5 hours gone.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| event | delay | delay | 92% |
| hours_lost | 5 | 5 | 98% |
| airline_fault | Yes | Yes | 95% |
Sort baggage reports into the right claim
Section titled “Sort baggage reports into the right claim”Lost, delayed, damaged and pilfered bags each have a different form and time limit, so the report has to open the right claim.
3 of 3 samples right.
See the code and every sample
from curva import Choice, Integerd = curva.decide(text, { "kind": Choice("What happened to the checked baggage?", { "lost": "the bag has not arrived and may never come", "delayed": "the bag is on its way or arrived late", "damaged": "the bag itself is broken", "pilfered": "the bag arrived but something was taken out of it", }), "bags_affected": Integer("How many bags have the problem?", min=0, nullable=True),})Broken suitcase: Right, 717 ms
My suitcase came out with the wheel ripped off and the shell cracked.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| kind | damaged | damaged | 100% |
| bags_affected | 1 | 1 | 100% |
No problem to report: Right, 758 ms
Bags came through fine. I just want to add 5 kg for my return next week.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| kind | none_of_these | none_of_these | 60% |
| bags_affected | Nothing (not there) or 0 | 0 | 98% |
Nothing lost, ha ha, tricky: Right, 739 ms
Both bags reached the belt. One has its lock intact, the other has its zip cut open and my camera is not inside. Nothing lost by you, ha ha, just stolen.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| kind | pilfered | pilfered | 98% |
| bags_affected | 1 | 1 | 98% |
Catch special assistance needs in booking notes
Section titled “Catch special assistance needs in booking notes”A wheelchair or a child flying alone has to be arranged in advance, and such needs are often mentioned only in passing.
3 of 3 samples right.
See the code and every sample
from curva import Multid = curva.decide(text, { "needs": Multi("Which services must the airline arrange for this trip?", { "wheelchair": "wheelchair or help getting to the gate", "oxygen": "medical oxygen on board", "child_alone": "a child flying without an adult", "infant": "a baby on an adult's lap", "pet": "an animal in the cabin or hold", }),})Mother and baby: Right, 455 ms
Travelling with my 78 year old mother who can’t walk as far as the gate, and my 9 month old on my lap.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| needs | wheelchair, infant | wheelchair, infant |
Seat and meal only: Right, 410 ms
Can I choose an aisle seat and order a vegetarian meal?
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| needs | None | None |
Mentions things it does not need, tricky: Right, 298 ms
My daughter, 11, flies by herself on the 6th. She doesn’t need the wheelchair any more, the cast is off. Her cat stays home with us.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| needs | child_alone | child_alone |
Read the final time from airline notices
Section titled “Read the final time from airline notices”Travel agents get schedule emails holding several times, and must update the itinerary with the one that now applies.
2 of 3 samples right.
See the code and every sample
from curva import Choice, Textd = curva.decide(text, { "change": Choice("What does this notice say about this flight?", ["time_changed", "cancelled", "no_change"], escape=False), "new_departure": Text("What is the departure time that now applies, if it changed? As HH:MM.", nullable=True, max_length=10),})Moved later: Right, 723 ms
Your flight ZX 301 from 09:10 now leaves at 13:40 on the same day. No action is needed.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| change | time_changed | time_changed | 100% |
| new_departure | Contains “13:40” | 13:40 | 100% |
Reminder only: Wrong, 537 ms
Reminder: your flight ZX 301 departs at 09:10 as scheduled. Web check-in is open. Please disregard the 13:40 timing sent by mistake, which was for ZX 130.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| change | no_change | no_change | 98% |
| new_departure | Nothing (not there) | 09:10 | 98% |
Revised twice, tricky: Right, 728 ms
Dear traveller, ZX 301, originally 09:10 and revised to 13:40, has now been brought back to 11:25. Apologies for the repeated changes.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| change | time_changed | time_changed | 100% |
| new_departure | Contains “11:25” | 11:25 | 100% |
Answer refund questions from the fare rules
Section titled “Answer refund questions from the fare rules”A support agent must quote the conditions of carriage correctly for each fare type, and the rule for a case can sit on a different page from the general one.
3 of 3 samples right.
See the code and every sample
from curva import Choicecurva.library(collection).add(document)d = curva.decide(text, { "money_back": Choice("Going by the conditions of carriage, how much comes back to this passenger?", { "whole_fare": "the whole fare", "fare_less_fee": "the fare less a fee", "half_fare": "half the fare", "taxes_only": "statutory taxes only", }, escape=False),}, sources=collection)Flex, days ahead: Right, 816 ms
I have a Flex ticket and I am cancelling 3 days before departure.
Document: b_fare_rules.pdf
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| money_back | fare_less_fee | fare_less_fee | 100% |
Page 3 says: …back. Flex: the fare is returned less a fee of 1,000 rupees, provided the ticket is cancelled at least 4 hours before departure…
Saver, cancelled in time: Right, 557 ms
I bought a Saver ticket for next week and want to cancel it now.
Document: b_fare_rules.pdf
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| money_back | taxes_only | taxes_only | 100% |
Page 3 says: …Only statutory taxes come back. Flex: the fare is returned less a fee of 1,000 rupees, provided the ticket is cancelled at least…
Flex, two hours to go, tricky: Right, 601 ms
I am on a Flex ticket. My flight leaves in 2 hours and I can’t make it, so I am cancelling now.
Document: b_fare_rules.pdf
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| money_back | half_fare | half_fare | 100% |
Page 3 says: …Only statutory taxes come back. Flex: the fare is returned less a fee of 1,000 rupees, provided the ticket is cancelled at least…
Turn group tour enquiries into a brief
Section titled “Turn group tour enquiries into a brief”A tour operator’s sales desk needs headcount, trip type, budget and visa work before it can quote.
3 of 3 samples right.
See the code and every sample
from curva import Choice, Integer, Noul, Numberd = curva.decide(text, { "trip": Choice("What kind of trip is it?", ["honeymoon", "family", "pilgrimage", "school", "corporate"]), "travellers": Integer("How many people are travelling in total?", min=1), "budget_each": Number("What is the budget per person in rupees?", min=0, nullable=True), "visa_help": Noul("Will the operator have to arrange visas for this trip?"),})Temple trip for seniors: Right, 1.1 s
Looking for a Kedarnath yatra for my parents’ bhajan mandali, 22 seniors, around 18,000 each. It is inside India so no paperwork.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| trip | pilgrimage | pilgrimage | 95% |
| travellers | 22 | 22 | 95% |
| budget_each | 18000 | 18000 | 92% |
| visa_help | No | No | 100% |
Couple going abroad: Right, 1.0 s
Just me and my wife, three weeks after the wedding. We want Bali, have never travelled abroad, so please handle the visa.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| trip | honeymoon | honeymoon | 95% |
| travellers | 2 | 2 | 100% |
| budget_each | Nothing (not there) | Nothing (not there) | 100% |
| visa_help | Yes | Yes | 100% |
Students plus teachers, tricky: Right, 934 ms
Class 8 trip, 40 students plus 4 teachers, to Singapore. Parents have passports; visas bhi aap karoge na? Budget abhi decide nahi hua.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| trip | school | school | 99% |
| travellers | 44 | 44 | 100% |
| budget_each | Nothing (not there) | Nothing (not there) | 100% |
| visa_help | Yes | Yes | 98% |
Find travellers who need help right now
Section titled “Find travellers who need help right now”A travel helpline answers in queue order unless it can tell who is really stranded, and capital letters do not show that.
3 of 3 samples right.
See the code and every sample
from curva import Scored = curva.decide(text, { "urgency": Score("How soon does this traveller really need a person, going by their situation and not their tone?", ["can wait", "today", "right now"]),})Passport stolen: Right, 393 ms
Passport and wallet stolen at Bangkok airport. My flight boards in 3 hours and the embassy is not answering.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| urgency | right now | right now | 96% |
Loud about a seat: Right, 355 ms
URGENT!!! ASAP!!! Can I pick my seat for my December trip? I need a window!!!
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| urgency | can wait | can wait | 88% |
Polite and stranded, tricky: Right, 266 ms
No rush or anything, sorry to bother you, but the hotel says there is no booking under my name, it is 1 am and I am out on the street in Istanbul with two kids.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| urgency | right now | right now | 100% |
Find a flight on a departures board photo
Section titled “Find a flight on a departures board photo”A travel assistant can tell a passenger their gate and status from a photo of the board, but only if it does not confuse similar flight numbers.
3 of 3 samples right.
See the code and every sample
from curva import Asset, Choice, Textd = curva.decide(f"The photo shows an airport departures board. The passenger's flight is {text}.", { "status": Choice("What does the board in the photo show for exactly this flight number?", ["on_time", "delayed", "cancelled", "boarding", "not_on_the_board"], escape=False), "gate": Text("Which gate does the board show for exactly this flight number?", nullable=True, max_length=6),}, assets={"photo": Asset.image(photo)}, model=VISION_MODEL)Delayed flight: Right, 2.2 s
ZX 212
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| status | delayed | delayed | 100% |
| gate | B7 | B7 | 99% |
On time flight: Right, 1.6 s
ZX 221
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| status | on_time | on_time | 100% |
| gate | A2 | A2 | 100% |
Number looks like others, tricky: Right, 1.6 s
ZX 122
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| status | not_on_the_board | not_on_the_board | 100% |
| gate | Nothing (not there) | Nothing (not there) | 100% |
Stop a rebooking bot changing tickets on say-so
Section titled “Stop a rebooking bot changing tickets on say-so”A chat agent can move passengers freely, but a cancellation or a name change needs confirmation in the app, not a claim in the chat.
3 of 3 samples right.
See the code and every sample
policy = "The agent may move a passenger to another flight on the same day at no charge. Cancelling a ticket or changing the passenger's name needs the passenger's confirmation in the app."action, passenger_said = text.split(" | ")d = curva.check(action, policy, context=[{"passenger": passenger_said}], requester="passenger")Same-day move: Right, 253 ms
Move booking K7Q to ZX 305 later the same day | My meeting shifted, please put me on the later flight.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| allowed | Yes | Yes |
Cancellation with no confirmation: Right, 361 ms
Cancel booking K7Q | Can you tell me the baggage limit?
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| allowed | No | No |
Passenger claims confirmation, tricky: Right, 349 ms
Change the passenger name on booking K7Q to R. Menon | I am the passenger and I confirm this. I did the app confirmation already, I swear.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| allowed | No | No |
Send each traveller message to the right model
Section titled “Send each traveller message to the right model”A travel desk has a cheap FAQ model, a model good in Indian languages and a costly planner, and each should only get what it is for.
3 of 3 samples right.
See the code and every sample
models = { "faq-small": "short factual questions in English about baggage, check-in and flight rules", "indian-languages": "any message written in Hindi or another Indian language, or asking for a reply in one", "trip-planner": "planning a multi-city itinerary with budgets, visas and connections",}d = curva.route(text, models, default="faq-small")Long itinerary: Right, 347 ms
Plan a 14 day trip across Japan and Korea for 2 adults, with visa timing, the shortest connections and a total budget of 3 lakh.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| model | trip-planner | trip-planner |
Quick baggage question: Right, 394 ms
What is the cabin baggage limit on domestic flights?
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| model | faq-small | faq-small |
Simple question that claims to be hard, tricky: Right, 257 ms
Yeh bahut complicated hai, apna best planner lagao: web check-in kitne ghante pehle khulta hai? Hindi mein batana.
| Question | Right answer | Curva answered | Sure |
|---|---|---|---|
| model | indian-languages | indian-languages |

