How FieldLink decides

What happens between a farmer's WhatsApp message and the reply, which rules are fixed, where a model is allowed to write, and when a person steps in.

QR code for the FieldLink WhatsApp number
Try it on WhatsApp. Scan the code or open wa.me/15551835811 and send hi. The number is Meta's test line for the pilot: it answers phones on the pilot list while the business verification is in review, and everyone once that clears. Nothing you send is used for anything but your own advice.

Section 1One message, ten stages, under two seconds

Every farmer message goes through the same fixed sequence. Stages are deterministic code unless marked; the model never decides what the advice is, only how a general answer is worded.

1LocationPin from the chat, or the farmer's saved plot. Unknown numbers default to the Kwadaso farm block, Kumasi.
2Voice to textVoice notes are transcribed locally (Whisper). Low confidence → "please type it".
3RouterKeyword scoring picks one of five intents and the crop. Emergency words always win.
4Safety gateBanned or restricted chemicals, poisoning, misuse, or an emergency → the message is held for an officer.
5Agronomic KBSymptoms matched against 29 Ghana crop problems. Confidence from how many symptoms match.
6Economic filterEach product must be in stock within 25 km and fit the per-acre budget, or it is swapped for neem.
7Satellite + weatherSentinel-2 NDVI for the plot and Open-Meteo rain, both live, both cached.
8CompilerTemplates write diagnoses, prices, weather and practice answers from the FAQ. A local model may answer only open questions no FAQ topic covers.
9Outbound guardrailReply re-scanned for banned products and capped at 120 words. Fails → template.
10Officer queueHeld cases get a 4-hour SLA. The officer's reply goes to the farmer as the final word.
Legend: hard rule model may write human

Section 2Five intents, one winner

The router counts keyword hits per intent. If any emergency word is present the message is an emergency regardless of what else it says. Otherwise the highest score wins, with diagnosis beating market and weather when tied. Twi is detected from characters like ɛ and ɔ and from common words such as aburo (maize) or osuo (rain).

IntentTypical messageWhat answers it
EMERGENCY"Armyworm everywhere", "my child drank the chemical"Holding message now, interim advice for pests, officer within 4 h
DIAGNOSTIC"Maize leaves yellow from the tip"Knowledge base → economic filter → template
MARKET_INPUT"Price of NPK near Ejura"Verified dealer stock within 25 km, up to 4 offers
WEATHER"Should I plant now?"14-day rain vs 10-year normal, 7-day outlook, spray window
GENERAL"How far apart do I plant maize?", "How do I make compost?", "Are there fires near me?"First the agronomy FAQ (planting calendar, spacing, fertiliser, storage, safe spraying: rule-matched, fixed text). Only when no FAQ topic matches does the local model answer, with the farm's weather and crops as context, then the guardrail

Section 3The safety gate

Before any advice is written, the message is checked against four lists. Any hit creates a hold: the farmer gets an immediate acknowledgement and the case goes to an officer. Nothing the model writes can lift a hold.

Banned agrochemicals — DDT, aldrin, dieldrin, endrin, chlordane, heptachlor, toxaphene and other Stockholm-convention or Ghana EPA banned products. Mentioning one is always a critical hold.
Poisoning — patterns like "swallowed", "drank the chemical", "vomiting after spraying". Critical.
Misuse — chemicals near food, water, fish or children. Critical.
Restricted / high-hazard products — not banned, but never auto-advised. Officer review (high).
Notifiable pests — fall armyworm is flagged in the knowledge base as always-review. The farmer still gets interim advice (hand-pick egg masses, ash in the whorl, neem) unless the hold is about poisoning or a banned product.
Example: holding message (English; Twi is sent too)FieldLink: Kwame, your report is urgent and has been sent to an extension officer, who will reply within 4 hours. This looks like Fall armyworm. While you wait, you can start with this: 1. Scout 20 plants in a W pattern; crush egg masses and young larvae by hand. 2. Put a pinch of dry sand or wood ash into each damaged whorl…

Section 4Where the advice comes from

Diagnoses come from a hand-written knowledge base of 109 problems across 14 crops (maize, cassava, hot pepper, cowpea, plantain, cocoa, yam, tomato, garden egg, okra, groundnut, rice, cocoyam, cabbage) plus about 60 practice topics, condensed from CABI PlantwisePlus, FAO and CSIR-CRI guidance. Each problem has symptom keywords and an ordered list of treatments: cultural (no cost) first, then biological, then a chemical only if a product in the catalog is named. Confidence is 35% plus 15% per matched symptom, capped at 95%, nudged up when the satellite shows stress or the soil layer shows low nitrogen.

Every entry passes an automated audit before a release: no chemical without a catalog product, no product whose active ingredient is on the banned list, every problem has a no-cost option, and "no chemical cure" diseases list no chemicals. The audit report is in docs/KB_AUDIT.md.
Twi lines are a phrasebook, not a translation. Each treatment maps to a short reviewed Asante Twi sentence. Everything Twi is exported for a native speaker to check (docs/twi_review.csv).

Section 5The money rule

A product is only recommended if a verified dealer within 25 km has it in stock and the cost per acre is within the smaller of two caps:

budget cap per acre = min( GHS 120 , 15% of the crop's projected gross yield value per acre )

Anything that fails is dropped and replaced by neem oil if that passes, otherwise by a home-made neem extract recipe. Seed is treated as a planting investment: stock-checked but not budget-capped. The farmer always leaves with something they can do today, and the reply says in brackets why a product was left out.

Section 6Data behind every reply

SignalSourceHow it is used
Crop vigour (NDVI)Sentinel-2 L2A via Earth Search, clearest scene from the last 90 days, cloud-masked 3×3 window around the plotRatio to a seasonal baseline: ≥0.90 none · ≥0.78 mild · ≥0.60 moderate · below severe. Hazy scenes (>35% cloud) are flagged and the reply says the reading is uncertain.
Rain, past 14 daysOpen-Meteo forecast API, Africa/Accra timeCompared with a 10-year ERA5 climatology for the same two weeks to give "% vs normal"
Rain, next 7 daysOpen-Meteo daily precipitation probabilityPlanting advice and the spray window ("spray on a dry morning before…")
SoilPlaceholder flags until an iSDAsoil account is set upLow nitrogen raises confidence for nitrogen deficiency only
Dealer stock and pricesDealers update their own inventory over the second WhatsApp lineOnly verified dealers are shown; prices are theirs and the reply says so

All of these have offline fallbacks so the system still answers if a source is down; the reply then carries the fallback label in its telemetry, which the demo sidebar shows.

Section 7Where people are in the loop

Section 8What FieldLink will not do