Skip to main content

Soil: The Recommendation Engine That Nobody Built

The science to double smallholder yields exists. The soil data covers all of Africa at 30-metre resolution — free. The delivery channels reach millions of farmers. What's missing is a specific integration layer between these pieces. But even when recommendations reach farmers, information alone doesn't change behaviour.

20 min read

Samwel Wanjala farms one acre in western Kenya. For years he bought expensive fertilizer and applied it liberally, watching his crops fail to thrive. He was, as One Acre Fund described it, "feeding soil that was chemically unable to digest the nutrients." Years of monocropping and DAP fertilizer had acidified his land past the point where added nutrients could be absorbed. More fertilizer made things worse.

Samwel isn't unusual. Fewer than 3% of Kenyan farmers have ever had their soil tested. The extension agent who might interpret results serves a thousand other farmers. In practice, most smallholders fertilize by habit, intuition, or whatever the agro-dealer has in stock.

This matters at civilisational scale. Africa's 33 million smallholder farms produce most of the continent's food. Yield gaps — the difference between what land produces and what it could produce with known techniques — run 50-80% across the continent. Closing even part of that gap is the difference between food security and dependence on imports.

The science to close these gaps already exists. It's been validated in field trials across thirteen countries. The soil data is mapped at 30-metre resolution for all of Africa — free and API-accessible. The delivery channels reach millions of farmers via USSD and SMS. The pieces are all there.

Nobody has assembled them. And there are specific, well-documented reasons why.

My lens: Software builder, systems generalist. I notice integration failures and missing middleware more than soil chemistry. The agronomic claims here are sourced from CGIAR, IFDC, and peer-reviewed field trials; the deployment hypotheses are hypotheses.


The Pieces That Exist

The picture is more complete than most people realise.

The soil data is essentially solved. iSDAsoil provides 30-metre resolution soil maps for all of Africa — 20+ properties including pH, organic carbon, nitrogen, phosphorus, potassium, texture, and micronutrients. Fully open (CC-BY 4.0), accessible via REST API, AWS, or Google Earth Engine. You can get a soil profile for any GPS coordinate on the continent in milliseconds.

SoilGrids 2.0 does the same thing globally at 250-metre resolution, built from 230,000 soil profiles. Weather data is equally mature: CHIRPS provides daily precipitation at 5.5km resolution going back to 1981.

The crop science is validated. OFRA (Optimizing Fertilizer Recommendations in Africa) ran field trials across thirteen sub-Saharan countries from 2013-2017, producing over 6,200 georeferenced crop-nutrient response functions — the mathematical relationships between fertilizer inputs and crop yields for specific crops in specific zones. AgWise, CGIAR's successor system, integrates soil data, weather, field trials, local market prices, and farmer budget constraints. In pilots in Ethiopia and Rwanda, it produced 60-69% yield gains. In Malawi, it reached 950,000 farmers.

The delivery channels reach millions. Safaricom's DigiFarm has 2.5 million registered farmers in Kenya, accessible via USSD. Apollo Agriculture serves 350,000+ in Kenya and Zambia through a network of 1,000+ agro-dealers. Esoko covers roughly a million farmers across 20 countries via SMS and voice in 12 languages.

Validated soil data. Validated crop science. Validated delivery infrastructure. Each piece works. The system doesn't.

The technology works. The system around it doesn't.

The Gap

No open-source system connects: an individual soil test result → crop selection → local fertilizer prices → weather forecast → actionable recommendation delivered via SMS or USSD.

Each piece exists in isolation. The soil data sits in APIs. The crop science sits in Excel spreadsheets and R scripts. The delivery platforms carry weather alerts and market prices, but not soil-specific fertilizer guidance.

AgWise is the closest thing to the target system, and it illustrates the gap precisely. It's free, open-source, modular, and genuinely powerful — it can express recommendations as "buy 2 bags of [specific brand] from [local supplier]." But its own documentation states: "The workflow and associated algorithms are currently actionable only by programmers and crop scientists."

What does "actionable only by programmers" actually mean? It means cloning GitHub repositories and executing R scripts in an IDE. It means spending days cleaning and standardising input data before the tool can even run. It means the output is a set of optimised parameters, not a prescription — you have to build your own delivery layer to make it intelligible to a farmer. There's no API key, no endpoint, no documentation site. You're forking a scientific workflow. And if your specific geography or crop lacks underlying response data, the framework can't generate a valid recommendation at all — it falls back to blanket advice that's no better than what the government already provides.

OFRA's tools tell a similar story, but older. 74 Fertilizer Optimization Tools covering 67 agro-ecological zones — but the "tool" is an Excel spreadsheet with macros and Solver. The crop-nutrient response functions are hard-coded into the spreadsheet. A developer wanting to integrate this into a modern app would need to reverse-engineer the Excel formulas and rewrite the linear optimisation logic in Python or JavaScript. There's no API. There's a "Paper FOT" — look-up tables for areas without computers.

This is the overhang in a specific, technical sense: validated components exist, assembly is newly cheap (APIs, modern frameworks, LLMs for language translation), and nobody has done the integration.

The demo below assembles those pieces. In demo mode it uses three pre-loaded soil profiles from locations in this article. If you want live data for any GPS coordinate in Africa, switch to "Live iSDA API" — you can register a free account at isda-africa.com in a couple of minutes.

Interactive Soil Lookup (proof-of-concept)

Click on the Africa map area, then run lookup. Demo mode uses the three narrative locations from this post. Live mode calls iSDA directly from your browser.

1.0567, 35.0011

Keyboard: use arrow keys to move the selected point by 0.5°. Click the map to pick directly.

Source: Demo profile

Fertility assessment

pH

low

5.2 Acidic. Phosphorus availability reduced. Liming recommended, especially for legumes and vegetables.

Organic Carbon

moderate

2.1 g/kgModerate organic matter. Adequate for many crops but improvement possible.

Total Nitrogen

moderate

1.8 g/kgAdequate nitrogen for moderate yields. Top-dressing may improve results.

Extractable Phosphorus

very-low

4.2 ppmSeverely phosphorus deficient. Strong yield response to P fertilizer expected. Apply DAP or TSP.

Extractable Potassium

moderate

0.35 cmol(+)/kgAdequate potassium for most crops.

Simplified recommendation (maize)

  • N: 60 kg/ha
  • P₂O₅: 40 kg/ha
  • K₂O: 20 kg/ha
  • Lime: Recommended
  • Severely P-deficient soil — prioritise phosphorus application
  • Acidic — apply agricultural lime (1-2 t/ha) to improve nutrient availability
  • ⚠️ EDUCATIONAL ONLY — not agronomic advice. Real recommendations require local calibration and field trials.
  • Based on simplified response functions for maize in East Africa.

Coordinates go in, soil data comes back, a fertilizer recommendation comes out. The integration gap is real, but it isn't hard to close.


Why Information Isn't Enough

Some programs did get recommendations to farmers. It didn't matter much.

India printed 227 million soil health cards. Each listed twelve soil parameters with crop-specific fertilizer recommendations. It was the largest soil testing program in history — over $200 million in public funding. Only 0.5% of farmers could understand the original cards. They used formal Hindi, measured in hectares instead of acres, listed chemical compounds that meant nothing to someone farming two acres of wheat. After redesign, comprehension rose to 33%. Of those who understood, only 48% followed the recommendations.

A quarter-billion cards. Billions of rupees. And the binding constraint was nothing anyone had engineered for.

SoilDoc in Tanzania provides the randomised controlled trial. Columbia University and UC Davis developed a portable soil testing kit and ran a proper RCT. The finding: recommendations plus subsidised inputs produced $16/acre additional profit. Recommendations alone — information without the means to act — produced no measurable behaviour change.

The technology worked. The science was right. The information reached the farmer. Nothing changed.


Trust

In Kenya's 2024 planting season, thousands of farmers bought bags of government-subsidised "fertilizer" that turned out to be diatomaceous earth — essentially sand — repackaged and distributed through official channels. Maize crops yellowed and stunted within weeks. Parliamentary inquiries followed.

Warning

The specific "80% of dealers in Masaka sub-region" statistic was sourced from AI research synthesis. While fake/adulterated inputs are widely documented in Uganda (New Vision, The Guardian, Nile Post), the exact 80% figure and attributed "Ministry of Agriculture market sweep" could not be independently verified to a specific primary source. Treat with caution.

In Uganda's Masaka sub-region, a Ministry of Agriculture market sweep found that roughly 80% of agro-chemical dealers were operating illegally or selling adulterated products. Dealers were repackaging expired chemicals in backstreet operations and selling them as legitimate inputs. For a farmer in Rakai district, this means that even saving money to buy fertilizer carries extreme risk. A fake bag doesn't just waste money — it wastes an entire season. Many farmers abandon fertilizer entirely, preferring low yields from unfertilised soil over the risk of total loss.

Samuel Kimari, a coffee farmer in Murang'a County with five acres, described being "at the mercy of cartels" that control both input supply and produce markets. He pays premium prices for fertilizer and receives KSh 30 per kilo for his coffee — not enough to sustain a livelihood. He's considering uprooting his crop. Coffee is "sentimental," he said, but you "cannot eat sentimentality."

This is the trust environment that any soil recommendation system has to operate in. When a farmer receives a recommendation to apply "NPK 17-17-17 at 50kg/acre," she has to trust the recommendation, trust the dealer, trust that the bag contains what it says, and have the money to buy it. If any link in that chain is broken — and in much of East Africa, several are — information is worthless.

Salome Wanjiru, a coffee factory manager in Murang'a, told investigative journalists at The Elephant about the infrastructure that used to work. She recalled when farmers could use delivery numbers to secure credit for inputs and school fees through their cooperative. She showed reporters the physical decay of her factory — rotting drying racks, derelict machinery — mirroring the collapse of extension services that once provided reliable soil guidance. Farmers in her cooperative are converting coffee farms to subsistence maize and bananas because they can't afford the specific fertilizers coffee requires.

The "halcyon years" of functional cooperatives, she said, are gone.

This is not a technology gap. This is institutional decay, supply chain corruption, and the erosion of trust across an entire system. A recommendation engine enters this landscape.


What the Successes Have in Common

Not everything fails. The ventures that work share a pattern: they don't sell information. They sell outcomes bundled with the means to achieve them.

Apollo Agriculture (Kenya, 350,000+ farmers) provides credit, certified seed and fertilizer, crop insurance, and market access as a single package. Soil-informed recommendations are embedded in the bundle. A farmer named Flavia in Kenya described the experience: an agent arrived on a motorbike with a smartphone, GPS-mapped her field, and approved an input loan. She didn't go shopping — the inputs arrived via voucher at a local agro-dealer, accompanied by automated voice messages on timing and application. Her maize harvest jumped from 20 bags to 50. She could pay school fees for the first time.

The key: Flavia didn't need to understand soil chemistry. She didn't need to trust a piece of paper. She trusted a person — the agent — and the bundle took care of the rest.

One Acre Fund discovered early that government soil test results were "very complicated and incomprehensible" to farmers. So they built their own labs. Samwel Wanjala — the farmer from this article's opening — got his answer through one of them. OAF's lab prescribed less fertilizer, not more. Agricultural lime to fix pH, then micro-dosing — using a bottle cap to measure exact amounts per plant root. His harvest doubled while his fertilizer use fell by half. "There is no more hunger in our home," he reported.

Kvuno (Zambia, Gates-backed) charges $5 per soil test — lower than lab rates, fast turnaround — and bundles results with a specific "fertilizer recipe." Kelvin, a vegetable farmer in Chongwe District, followed his recipe and grew a cabbage head weighing 8.7 kilograms, breaking the district record. He became a local lead farmer. Other participants redeemed reward points for solar radios that let them tune into Ulimi Walero ("Modern Farmer"), an agricultural radio show — creating a feedback loop between practice and education.

The pattern is consistent: information bundled with inputs, credit, and trusted relationships changes behaviour. Information alone does not.

This doesn't mean a recommendation engine is worthless. It means a recommendation engine is infrastructure — necessary but not sufficient, valuable as a component within bundled services rather than as a standalone product.


Where a Small Actor Has Leverage

Given everything above — working pieces, missing integration, and the hard lesson that information alone doesn't change behaviour — where does leverage actually exist?

The honest answer is narrower than it first appears. A solo developer or small team cannot validate agronomic recommendations without field trials. Cannot solve distribution or trust problems. Cannot replace institutional relationships or build sustainable businesses without partnerships.

But there are specific things that are newly tractable:

1. A developer-oriented proof-of-concept. The interactive demo above maps the soil-to-recommendation pipeline from a developer's perspective: GPS coordinate + crop → iSDA soil data → response functions → basic recommendation with crop-specific guidance. It's a legible proof that the pipeline works, making the breakpoints concretely visible. The value isn't the demo itself; it's making the integration gap undeniable to the organisations positioned to close it.

2. Machine-readable crop-nutrient response data. OFRA's 6,200 response functions — the core scientific asset for sub-Saharan fertilizer recommendations — exist in Excel spreadsheets behind an unreliable website. Extracting, cleaning, and publishing these as a structured, API-accessible dataset would be a genuine contribution. The Our World in Data model: take data that exists in unusable formats and make it analysis-ready. This is the single biggest data bottleneck in the pipeline.

3. A translation layer for existing tools. AgWise's algorithms work but require forking R repositories and weeks of data preparation. Wrapping them in a documented REST API doesn't require original science — it makes existing science usable by the developers at Apollo, Kvuno, and DigiFarm who are already building farmer-facing products.

4. An LLM interpretation layer that translates validated outputs into local languages and farmer-appropriate formats. This is exactly what LLMs are good at. But a wrong recommendation about fertilizer isn't a UI bug — it's a lost season. Without agronomic validation, this is high-risk.

Each of these is useful primarily as infrastructure for the people who've already figured out the trust and distribution problems. The leverage is in making their jobs easier, not building a competing system.


Reality Checks

These are specific people or experiences that could prove this analysis wrong:

  • An AgWise developer or CGIAR data scientist — Is the "only accessible to programmers" characterisation fair? Is there a farmer-facing interface in development?
  • A Kvuno or Apollo Agriculture operator — What recommendation system do you actually use? Would an open-source engine be useful or redundant?
  • Someone who's worked with OFRA data — Are the 6,200 response functions still scientifically current? How much would extraction and structuring actually cost?
  • An iSDA team member — How does the Virtual Agronomist generate recommendations? What's proprietary vs. replicable?
  • A smallholder farmer in Kenya or Tanzania who's received soil test results — What actually happened? Did the results change anything?
  • An extension agent in sub-Saharan Africa — What tools do you actually use? What would make your job easier?

If you fit any of these and think I've got something wrong, I'd like to hear from you.


The Verdict

This avenue has the clearest overhang structure of any I've investigated. The pieces genuinely exist — not as prototypes or research concepts, but as validated, deployed systems. The integration gap is real, specific, and technically solvable — as the demo above shows.

But the harder truth — the one that 227 million cards in India and the SoilDoc trial in Tanzania both demonstrate — is that the software gap is the smaller part of the problem. The recommendation engine is necessary infrastructure. It is not, by itself, what changes outcomes. Trust, input access, credit, supply chain integrity, and institutional support are the binding constraints. When 80% of dealers in a region are selling fakes, a better recommendation is beside the point.

The strongest framing: the recommendation engine gap is real, specific, and solvable. Solving it without solving distribution and trust would repeat a well-documented pattern of failure. The value of building it anyway is that it makes the pipeline legible, lowers the barrier for bundled-service providers, and creates a concrete demonstration of what the assembled system looks like — so the people with the relationships and the distribution can see what's possible.

Sometimes reconnaissance reveals that the overhang is real but the leverage is narrow. This is one of those times. The pieces are all there. The assembly is cheap. But the binding constraints aren't technical, and an honest investigation has to say so.


Resources

🌱Key Actors and Systems

Recommendation Systems:

  • AgWise (CGIAR) — Free, open-source, modular. R-based. Piloted in Ethiopia, Rwanda, Malawi (950K farmers).
  • OFRA — 74 Fertilizer Optimization Tools, 67 AEZs, 13 SSA countries. Excel-based. Website reliability uncertain.
  • Nutrient Expert (CIMMYT) — Calibrated for Nigeria, Ethiopia, Tanzania, Kenya. 65% yield improvement in Nigerian trials (20K farmers). Windows/Excel.
  • iSDA Virtual Agronomist — Proprietary, WhatsApp delivery, 250K+ farmers claimed.

Soil Data:

  • iSDAsoil — 30m Africa-wide, 20+ properties, CC-BY 4.0, REST API.
  • SoilGrids 2.0 — Global 250m, 14 properties, open access.

Delivery Platforms:

  • DigiFarm (Safaricom) — 2.5M farmers Kenya, USSD.
  • Apollo Agriculture — 350K+ farmers, bundled credit + inputs + insurance.
  • Esoko — ~1M farmers, 20 countries, SMS + voice.
  • Digital Green FarmerChat — 830K+ users, WhatsApp, LLM-based (but no soil test integration).
📊The Evidence on Information vs. Behaviour Change

India Soil Health Card Programme:

  • 227M cards distributed, $200M+ state-funded
  • Original card: 0.5% farmer comprehension. Redesigned: 33%.
  • Of farmers who understood: 48% compliance.
  • Cards used formal Hindi, hectares (not acres), arrived after sowing season.
  • IDinsight evaluation: negligible measured impact on fertilizer use.

SoilDoc Tanzania RCT (UC Davis):

  • Randomised controlled trial of portable soil testing kit.
  • Recommendations + subsidised inputs = +$16/acre profit.
  • Recommendations alone = no measurable behaviour change.

Extension Coverage Gaps:

  • Kenya: 1 agent per ~1,000 farmers (recommended 1:400). Only 21% of households access any extension.
  • Nigeria: 1 agent per ~10,000 farmers. 50% of maize fertilizer recommendations didn't follow agro-ecological zones.
  • India: ~3,000 soil testing labs for 140M farmers (1 per 47,000).

Input Fraud:

  • Kenya 2024: Subsidised fertilizer found to be diatomaceous earth/sand. Parliamentary inquiry.
  • Uganda (Masaka): ~80% of agro-chemical dealers operating illegally or selling adulterated products.
🔬Hardware Landscape

At least fifteen active companies span five technology approaches. Hardware is NOT the bottleneck — spatial soil data (iSDA, SoilGrids) provides good-enough baseline data for recommendation generation without physical testing.

Commercially deployed:

  • AgroCares/SoilCares (Netherlands) — NIR spectroscopy, 97 scanners in Kenya. Good for pH/organic carbon, weak on direct N/P/K.
  • Proximal Soilsens/NutriSens (India, IIT Bombay) — Paper electrochemical strips, $420 device, 80-90% accuracy.
  • UjuziKilimo (Kenya) — SoilPal Pro (Dec 2025), VNIR spectroscopy + AI, claims 100K farmers.
  • Sesi Technologies (Ghana) — FarmSense (2025), handheld + AI nutrient management.

Service model:

  • Kvuno (Zambia) — $5/test using AgroCares scanners, Gates-backed, 29% yield increases reported.

Discontinued (instructive):

  • SoilDoc (Columbia/UMD) — Portable kit, RCT-validated, discontinued ~2017. Technology worked; theory of change failed.
  • SoilCards (Imperial College) — Dormant since 2017.
👤People Working on This

If pursuing this avenue further, these are the people closest to the integration problem:

  • Dr. Wuletawu Abera — CGIAR, AgWise lead
  • Tomislav Hengl — iSDA, lead soil mapper
  • Leigh Winowiecki — ICRAF, Land Health Decisions
  • Dr. Siyabusa Mkuhlani — IITA, data science for fertilizer advisory, West Africa
  • Isaac Sesi — Sesi Technologies, FarmSense (Ghana)
  • GIZ Fair Forward team — Building MVPs in Kenya and Bihar

This is part of the Avenues of Investigation series — mapping technological overhangs where motivated individuals might find leverage.

Discuss this with