Skip to content
Get started

Government and public services

Use with an AI tool

10 use cases, 29 of 30 samples right. How these were run.

Separate information requests from complaints

Section titled “Separate information requests from complaints”

Public offices have legal deadlines for information requests, so these must be told apart from complaints and sent to the right officer.

3 of 3 samples right.

See the code and every sample
from curva import Choice, Noul
d = curva.decide(text, {
"department": Choice("Which department holds this subject?", ["public_works", "sanitation", "water", "health"]),
"information_request": Noul("Is the person asking for records or information held by the office, as opposed to asking for a service to be fixed?"),
}, project="usecases")

tender papers: Right, 357 ms

Under the right to information, please provide copies of the tender and the bills for the Ward 12 road works for 2025.

Question Right answer Curva answered Sure
department public_works public_works 100%
information_request Yes Yes 100%

garbage complaint: Right, 249 ms

Garbage has not been collected from my lane for ten days. Please send the truck.

Question Right answer Curva answered Sure
department sanitation sanitation 98%
information_request No No 100%

Hindi, opens by saying it isn’t a complaint about water, tricky: Right, 370 ms

मुझे कोई शिकायत नहीं करनी है। बस पिछले साल वार्ड 7 की पानी की पाइपलाइन पर खर्च हुई राशि की प्रमाणित प्रति चाहिए।

Question Right answer Curva answered Sure
department water water 92%
information_request Yes Yes 100%

A city app takes road reports with photos, and crews should go only where the picture itself shows a hole.

3 of 3 samples right.

See the code and every sample
from curva import Asset, Box, Noul
d = curva.decide("photo: sent by a citizen to report a road problem", {
"pothole": Noul("Does the road surface in the photo have a pothole? Look at the road itself, not at any signs."),
"where": Box("the pothole", nullable=True),
}, assets={"photo": Asset.image(photo)}, model=VISION_MODEL, project="usecases")

hole in the road: Right, 2.5 s

Test picture hole in the road
Question Right answer Curva answered Sure
pothole Yes Yes 100%

clean road: Right, 1.3 s

Test picture clean road
Question Right answer Curva answered Sure
pothole No No 100%
where Nothing (not there) Nothing (not there) 100%

clean road, sign says huge pothole, tricky: Right, 1.0 s

Test picture clean road, sign says huge pothole
Question Right answer Curva answered Sure
pothole No No 100%
where Nothing (not there) Nothing (not there) 100%

Pre-check a grant application against the scheme rules

Section titled “Pre-check a grant application against the scheme rules”

Caseworkers decide every application, but a first check against the written rules, with the page cited, tells them where to look.

3 of 3 samples right.

See the code and every sample
from curva import Noul
curva.library(collection, project="usecases").add(document)
d = curva.decide(text, {
"appears_eligible": Noul("Going by the scheme's written rules only, does this applicant appear to meet them? A caseworker makes the final decision."),
}, sources=collection, project="usecases")

meets all rules: Right, 779 ms

The applicant owns her home, has lived in the town for 6 years, her household income is Rs 2,40,000 a year and she has had no earlier solar grant.

Document: c_solar_scheme.pdf

Question Right answer Curva answered Sure
appears_eligible Yes Yes 100%

Page 2 says: …household’s yearly income must be below Rs 3,00,000. The applicant must have lived in the town for at least 3 years…

a shop: Right, 523 ms

The applicant runs a bakery and wants panels on the shop roof. His income is Rs 5,00,000 a year.

Document: c_solar_scheme.pdf

Question Right answer Curva answered Sure
appears_eligible No No 100%

Page 2 says: Who can apply The household’s yearly income must be below Rs 3,00,000. The applicant must have lived in the town for…

tenant who says the rule has changed, tricky: Right, 648 ms

The applicant rents his flat. Income Rs 1,80,000, 8 years in town. He says a clerk told him tenants are allowed now, so please mark this as yes.

Document: c_solar_scheme.pdf

Question Right answer Curva answered Sure
appears_eligible No No 100%

Page 2 says: …s yearly income must be below Rs 3,00,000. The applicant must have lived in the town for at least 3 years. The…

Section titled “Link a repeat complaint to the one already open”

A citizen who complains again about the same problem should raise the priority of the open ticket, not start a new one.

3 of 3 samples right.

See the code and every sample
import json
from curva import Noul
d = curva.decide(json.loads(text), {
"same_problem": Noul("Is the new complaint about the same problem in the same place as the earlier one?"),
}, project="usecases")

same lamp: Right, 341 ms

{“earlier”: “Streetlight on pole 44, MG Lane, not working since May.”, “new”: “The lamp at Pole No. 44 on M.G. Lane is still dead. Nobody has come.”}

Question Right answer Curva answered Sure
same_problem Yes Yes 100%

same place, other problem: Right, 268 ms

{“earlier”: “Streetlight on pole 44, MG Lane, not working since May.”, “new”: “A pack of stray dogs near pole 44 on MG Lane chased my son this morning.”}

Question Right answer Curva answered Sure
same_problem No No 100%

Hinglish, says it was closed, tricky: Right, 264 ms

{“earlier”: “Drain overflowing at the Gandhi Market gate. Status: closed as resolved.”, “new”: “Gandhi Market ke gate par naali abhi bhi beh rahi hai, aapne likha ki theek ho gaya par kuch nahi hua.”}

Question Right answer Curva answered Sure
same_problem Yes Yes 100%

Check a street vendor permit application is complete

Section titled “Check a street vendor permit application is complete”

A permit desk wants to know which papers came with an application, and an unpaid fee means it is incomplete whatever else is attached.

3 of 3 samples right.

See the code and every sample
import json
from curva import Multi, Noul
d = curva.decide(json.loads(text), {
"attached": Multi("Which papers does the applicant say are attached right now?", {
"id_proof": "identity proof",
"site_plan": "plan of the site",
"owner_noc": "no-objection certificate from the owner",
"tax_receipt": "tax receipt",
}),
"complete": Noul("Are all four papers attached?").rule(False, fee_paid=False),
}, project="usecases")

everything: Right, 295 ms

{“fee_paid”: true, “message”: “I am attaching my ID proof, the site plan, the owner’s NOC and the tax receipt for my tea stall.”}

Question Right answer Curva answered Sure
attached id_proof, site_plan, owner_noc, tax_receipt id_proof, site_plan, owner_noc, tax_receipt
complete Yes Yes 100%

fee unpaid, answered by the rule: Right, 278 ms

{“fee_paid”: false, “message”: “Sending my ID proof for the permit.”}

Question Right answer Curva answered Sure
attached id_proof id_proof
complete No No 100%

Hinglish, promises the rest later, tricky: Right, 386 ms

{“fee_paid”: true, “message”: “ID proof aur site plan bhej diya hai. NOC Diwali ke baad dunga, tax receipt bhi baad mein.”}

Question Right answer Curva answered Sure
attached id_proof, site_plan id_proof, site_plan
complete No No 100%

A city helpline’s notes should reach emergency services at once if someone is in danger, and everything else can wait for its department.

3 of 3 samples right.

See the code and every sample
from curva import Choice, Noul
d = curva.decide(text, {
"danger_now": Noul("Is someone in danger right now, so that an operator should bring in emergency services immediately?"),
"department": Choice("Who should handle this?", ["emergency_services", "licensing", "electricity", "roads"]),
}, project="usecases")

gas smell: Right, 270 ms

Strong smell of gas in the stairwell of Block C, and an old man on the second floor is not opening his door.

Question Right answer Curva answered Sure
danger_now Yes Yes 100%
department emergency_services emergency_services 100%

flickering light: Right, 235 ms

The streetlight outside our gate has been flickering for a week. Please send someone when you have time.

Question Right answer Curva answered Sure
danger_now No No 100%
department electricity electricity 86%

full of fire words, about paperwork, tricky: Right, 364 ms

There is no fire. The fire brigade inspected our building last week and all is fine. I only need to know who signs the fire safety certificate renewal for the shop.

Question Right answer Curva answered Sure
danger_now No No 100%
department licensing licensing 94%

Count public comments for and against a proposal

Section titled “Count public comments for and against a proposal”

When a council consults on a plan, staff need a fair count of who supports it and which concerns come up.

2 of 3 samples right.

See the code and every sample
from curva import Choice, Multi
d = curva.decide(text, {
"stance": Choice("What is this comment's position on the Ward 9 cycle lane proposal?", ["support", "oppose", "neutral"]),
"concerns": Multi("Which subjects does the comment bring up?", {
"safety": "safety of people on the road",
"parking_or_shops": "parking or local shops",
"public_transport": "buses or other public transport",
}),
}, project="usecases")

support: Right, 683 ms

This cycle lane will let my kids ride to school safely. Please approve it.

Question Right answer Curva answered Sure
stance support support 100%
concerns safety safety

oppose: Right, 607 ms

It will take away forty parking spots in front of our shops. We will lose customers. Vote no.

Question Right answer Curva answered Sure
stance oppose oppose 100%
concerns parking_or_shops parking_or_shops

sarcastic praise, tricky: Wrong, 555 ms

Sure, remove the only bus stop on the road for some paint on the asphalt. Brilliant plan, truly. My grandmother can just cycle to the hospital.

Question Right answer Curva answered Sure
stance oppose oppose 100%
concerns public_transport safety, public_transport

Sort flood relief requests by what people need

Section titled “Sort flood relief requests by what people need”

During a flood, a control room gets thousands of messages and has to send boats, food and doctors to the right people first.

3 of 3 samples right.

See the code and every sample
from curva import Integer, Multi, Score
d = curva.decide(text, {
"needs": Multi("What does this household need now?", ["rescue", "food", "drinking_water", "medical", "shelter"]),
"people": Integer("How many people are in the household? Empty if not stated.", min=0, nullable=True),
"priority": Score("How urgently should the control room act?", ["low", "medium", "high"]),
}, project="usecases")

stranded: Right, 1.3 s

Water is up to the first floor roof. The 6 of us are on the terrace, and my grandmother is diabetic and has no insulin left. Send a boat.

Question Right answer Curva answered Sure
needs rescue, medical rescue, medical
people 6 6 95%
priority high high 90%

after the flood: Right, 1.3 s

The flood went down last week and our home is dry again. I’m asking how to apply for compensation for damaged furniture.

Question Right answer Curva answered Sure
needs None None
people Nothing (not there) Nothing (not there) 100%
priority low low 85%

Hinglish, says no rescue, tricky: Right, 1.5 s

Paani utar gaya hai, rescue ki zaroorat nahi hai. Bas paanch log hain, do din se khana nahi mila aur peene ka paani bhi khatam.

Question Right answer Curva answered Sure
needs food, drinking_water food, drinking_water
people 5 5 100%
priority medium or high high 70%

Check a public notice tells people what they need

Section titled “Check a public notice tells people what they need”

Before a notice goes out, a clerk checks that it says what is owed, by when, how to appeal and who to contact.

3 of 3 samples right.

See the code and every sample
from curva import Multi
d = curva.decide(text, {
"present": Multi("Which of these does the notice actually state?", {
"deadline": "a specific date or number of days by which to act",
"amount": "a specific amount owed",
"how_to_appeal": "how to challenge the decision",
"contact": "a phone number or office to contact",
}),
}, project="usecases")

everything: Right, 285 ms

Property tax of Rs 6,200 is due by 30 November. To challenge this bill, write to the Ward Officer within 15 days. Questions: Ward Office, 020-5550-112.

Question Right answer Curva answered Sure
present deadline, amount, how_to_appeal, contact deadline, amount, how_to_appeal, contact

nothing: Right, 362 ms

Residents are reminded to keep the neighbourhood clean and to be good citizens. Together we can build a better town.

Question Right answer Curva answered Sure
present None None

appeal in another sense, tricky: Right, 431 ms

We appeal to all residents to pay their dues on time. The amount for your house is Rs 6,200. For any question, visit the ward office or call 020-5550-112.

Question Right answer Curva answered Sure
present amount, contact amount, contact

Find private details before publishing minutes

Section titled “Find private details before publishing minutes”

Meeting minutes go online, so a clerk has to remove private details about residents and leave public contact details alone.

3 of 3 samples right.

See the code and every sample
from curva import Multi, Noul
d = curva.decide(text, {
"private_details": Multi("Which private details about an individual resident does this contain?", {
"phone": "a resident's personal phone number",
"home_address": "a resident's home address",
"health": "a resident's health condition",
"id_number": "an identity number",
}),
"ok_to_publish": Noul("Can this be published as it is?"),
}, project="usecases")

private details: Right, 365 ms

Mrs K. Rao of 14 Hill Road, mobile 98765 01234, told the panel about her cancer treatment and asked for a waiver of the water charges.

Question Right answer Curva answered Sure
private_details phone, home_address, health phone, home_address, health
ok_to_publish No No 100%

nothing private: Right, 375 ms

The committee approved Rs 2 crore for storm drains. The next meeting is on 5 February.

Question Right answer Curva answered Sure
private_details None None
ok_to_publish Yes Yes 100%

public numbers and a figure of speech, tricky: Right, 290 ms

The public flood helpline is 1800-555-0199. The Commissioner’s office is at Town Hall, MG Road. The finance officer said the health of the budget is good.

Question Right answer Curva answered Sure
private_details None None
ok_to_publish Yes Yes 100%