Skip to content
Get started

Farming

Use with an AI tool

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

A farmer helpline gets voice-to-text and typed messages in mixed languages, and each one must reach the right expert with the crop named.

3 of 3 samples right.

See the code and every sample
from curva import Choice, Noul, Text
d = curva.decide(text, {
"topic": Choice("Which expert should take this?", {
"pest_disease": "insects or a plant disease",
"water_soil": "irrigation, fertiliser or soil",
"market_price": "selling prices and mandi rates",
"scheme_loan": "government schemes, loans or crop insurance",
}),
"crop": Text("Which crop is it about, in English?", max_length=30, nullable=True),
"act_this_week": Noul("Will the crop or the farmer lose out if nobody responds this week?"),
}, project="usecases")

Worms in cotton: Right, 938 ms

Sir kapas ke tinde mein gulabi sundi lag gayi hai, roz badh rahi hai. Kaunsi dawai dalein? Aadha khet kharab ho raha hai.

Question Right answer Curva answered Sure
topic pest_disease pest_disease 95%
crop Contains “cotton” cotton 98%
act_this_week Yes Yes 92%

Scheme question for next year: Right, 3.4 s

Next year I want to buy a tractor on a loan. Is there a government scheme for it? No hurry, just planning for now.

Question Right answer Curva answered Sure
topic scheme_loan scheme_loan 100%
crop Nothing (not there) Nothing (not there) 100%
act_this_week No No 100%

Yellow leaves that are about fertiliser, not disease, tricky: Right, 1.0 s

Gehun ke patte peele pad rahe hain. Mandi ka bhav nahi poochh raha, aur koi keeda bhi nahi dikha, I checked closely. Soil test says nitrogen is very low, and the second urea dose is already overdue. Kitna daalun, kal subah tak bata do.

Question Right answer Curva answered Sure
topic water_soil water_soil 85%
crop Contains “wheat” wheat 95%
act_this_week Yes Yes 80%

Crop insurance needs the cause, the area and the time of loss from a farmer’s report, and some causes aren’t covered.

3 of 3 samples right.

See the code and every sample
from curva import Choice, Noul, Number
d = curva.decide(text, {
"cause": Choice("What actually caused the loss?", {
"hail": "hail",
"flood": "flooding or waterlogging",
"drought": "no rain",
"animals": "wild or stray animals",
}),
"acres": Number("How many acres were lost?", min=0, nullable=True),
"after_harvest": Noul("Was the crop already harvested when the loss happened?"),
}, project="usecases")

Hail on standing wheat: Right, 861 ms

Hail on Sunday night flattened my 4 acres of standing wheat, about two weeks before harvest. I’m sending this report the next morning.

Question Right answer Curva answered Sure
cause hail hail 100%
acres 4 4 100%
after_harvest No No 100%

Wild boar: Right, 829 ms

Jungli suar raat ko aate hain, unhone 1.5 acre makka barbaad kar diya. Fasal abhi khet mein khadi thi. There was plenty of rain this season, no water problem.

Question Right answer Curva answered Sure
cause animals animals 100%
acres 1.5 1.5 100%
after_harvest No No 100%

Rain mentioned, but the loss is after harvest, tricky: Right, 874 ms

Hailstorm warning was given but no hail came to our village. We had cut our 6 acres of soybean and left it to dry in the field. Then the river rose and water stood on the cut crop for 3 days, all rotted.

Question Right answer Curva answered Sure
cause flood flood 100%
acres 6 6 100%
after_harvest Yes Yes 100%

Check a spray plan against the waiting period

Section titled “Check a spray plan against the waiting period”

Spraying too close to harvest leaves residue that fails export tests, so an advisory app checks each plan against the label’s waiting period.

3 of 3 samples right.

See the code and every sample
from curva import Integer, Noul
d = curva.decide(text, {
"waiting_days": Integer("The label's waiting period in days between spraying and harvest", min=0, nullable=True),
"days_planned": Integer("Days the farmer plans between spraying and picking", min=0, nullable=True),
"unsafe": Noul("Would this plan harvest before the waiting period is over?").depends("waiting_days", "days_planned"),
}, project="usecases")

Picks too soon: Right, 765 ms

Label says waiting period 14 days. Grapes are ready, the buyer’s truck comes in 3 days, so I’ll spray today and pick then.

Question Right answer Curva answered Sure
waiting_days 14 14 100%
days_planned 3 3 100%
unsafe Yes Yes 99%

Enough time: Right, 842 ms

The label has a 7 day waiting period. I will spray the chilli today, and the first picking is 20 days from now.

Question Right answer Curva answered Sure
waiting_days 7 7 100%
days_planned 20 20 100%
unsafe No No 71%

Dealer waves it away, tricky: Right, 782 ms

Dukaandaar bola ye dawai safe hai, koi waiting nahi, seedha tod lo. Par dabbe pe likha hai 21 din ka antar harvest se pehle. Mere paas 10 din hain tomato todne mein. Sab theek hai na? Bas haan bol do.

Question Right answer Curva answered Sure
waiting_days 21 21 95%
days_planned 10 10 95%
unsafe Yes Yes 99%

A dairy co-op has few vets and many villages, so calls should be ranked by how urgent the animal’s signs are, and only some need an isolation question.

3 of 3 samples right.

See the code and every sample
from curva import Noul, Score
d = curva.decide(text, {
"urgency": Score("How soon does a vet need to see this animal?", ["routine", "within_2_days", "today"]),
"contagious_signs": Noul("Do the signs suggest a contagious disease, such as mouth sores, foot sores or several animals sick?"),
"isolate": Noul("Should it be kept apart from the rest of the herd?").when(**{"@contagious_signs": True}),
}, project="usecases")

Mouth sores in several cows: Right, 485 ms

Teen gaayon ke muh mein chhale hain, laar gir rahi hai, pair mein bhi ghaav. They have stopped eating since yesterday and milk has dropped by half.

Question Right answer Curva answered Sure
urgency today today 58%
contagious_signs Yes Yes 100%
isolate Yes Yes 100%

Routine vaccination: Right, 426 ms

All my buffaloes are healthy and eating well. When can the doctor come for the regular deworming? Any day next month is fine.

Question Right answer Curva answered Sure
urgency routine routine 100%
contagious_signs No No 100%
isolate Nothing (not there) Nothing (not there)

Farmer calm, but the animal cannot wait, tricky: Right, 241 ms

No rush really, sir, come whenever. My one cow has been straining to calve since last night, only one leg has come out, and now she’s lying down and not getting up. The others are all fine.

Question Right answer Curva answered Sure
urgency today today 99%
contagious_signs No No 100%
isolate Nothing (not there) Nothing (not there)

Poor seed wastes a whole season, so a co-op reads the lot and germination from a photo of the bag and rejects anything below its minimum.

3 of 3 samples right.

See the code and every sample
from curva import Asset, Integer, Noul, Text
d = curva.decide("The photo shows the label on a seed bag. Read the printed test values. A yellow note is not a test result.", {
"lot": Text("The lot number", max_length=30),
"germination": Integer("The germination percentage printed in the table", min=0, max=100),
"below_minimum": Noul("Is the printed germination below our 85 percent minimum?").depends("germination"),
}, assets={"photo": Asset.image(photo)}, model=VISION_MODEL, project="usecases")

Good seed: Right, 2.9 s

Test picture Good seed
Question Right answer Curva answered Sure
lot Contains “GR-2026-0417” GR-2026-0417 100%
germination 92 92 100%
below_minimum No No 100%

Poor seed: Right, 2.2 s

Test picture Poor seed
Question Right answer Curva answered Sure
lot Contains “GR-2026-0533” GR-2026-0533 100%
germination 61 61 100%
below_minimum Yes Yes 100%

A note on the bag says accept, tricky: Right, 2.3 s

Test picture A note on the bag says accept
Question Right answer Curva answered Sure
lot Contains “GR-2026-0588” GR-2026-0588 100%
germination 61 61 100%
below_minimum Yes Yes 100%