Grower-in-the-loop AI for Deployable Precision Fertilisation in Sustainable Agriculture
Authors: Xulong Wang, Yu Zhang, Gaoshan Bi, Menghui Zhou, Simon Jeffery, Max Davis, Sam Maycock, Paul Harris, Po Yang
Organizations: School of Computer Science, University of Sheffield, Sheffield, UK. · College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou, China. · Centre for Crop and Environmental Science, Harper Adams University, Newport, UK. · Trials Department, Velcourt Limited, Stamford, UK. · Rothamsted Research, North Wyke, Okehampton, UK.
In agriculture, typically over half of the applied nitrogen fertiliser is lost to water and to air. Precision fertilisation aims to reduce these losses while maintaining yield and quality, yet existing tools struggle to capture farm-specific challenges in determining optimal nitrogen rates. Static recommendations are common and overlook on-farm constraints, such as delays due to weather or machinery availability, or change in budgets. Each constraint governs when and how growers apply fertiliser in practice. Here we present a grower-in-the-loop framework for winter wheat in England, combining baseline fertilisation planning from a machine learning-derived nitrogen-response curve with in-season adaptation via a large language model. We evaluated the framework using data from long-term experiments (LTEs), replicated field trials, and farm deployments. Retrospective model validation using LTEs confirmed low economic decision-loss across multiple seasons. Using field and farm trials, baseline schedules were shown to match standard-practice yields with less nitrogen, whereas in-season adjusted schedules additionally retained grain quality standards. Given this enhanced performance, in-season adaptation absorbed weather, machinery and budget constraints to keep recommendations executable. The framework therefore shows promise for translating static recommendations into adaptable, grower-informed decisions for sustainable fertiliser management.
Figures & tables
Figure 1: Overview of the grower-in-the-loop framework. In planning, a fixed seasonal N recommendation is set from the N-response model against four agronomic objectives. In-season adaptation, operational constraints stated by the grower are turned into bounded adjustments by an LLM, and each adjustment is approved by an agronomist. Field evaluation draws on long-term experiments (LTEs) together with field-trial plots (at research and commercial farms) and commercial farms for wheat production. Dashed arrows mark in-season revision.
Figure 2: Validation of the N-response model and its rate regularisation on two long-term experiments (LTEs). a,b , Observed N-response curves, one per section per season, at the ‘Broadbalk’ LTE ( a , 402 curves, 53 seasons) and the ‘Woburn Ley-Arable’ LTE ( b , 490 curves, 43 seasons). Bold lines show the mean curve. c,h , Predicted against observed anchor yields under leave-one-season-out validation at Broadbalk ( c , n=1,206 ) and under external test at Woburn ( h , n=1,470 ). Dotted lines are 1:1 lines. Point colour indicates N rate. d , Predicted curves (lines) and held-out observations (points) in a high-yielding (1981), an intermediate (1969) and a low-yielding (1970) season. e , Prediction error at 0, 144 and 288 kg N/ha. Violins show the error distribution and points show individual curves. f,i , Season cost, that is, grain lost against the best possible N choice, before and after regularisation. Broadbalk seasons are shown in order ( f , raw as bars, regularised as points) and Woburn seasons are ranked from costliest to cheapest ( i ). g , Loss of the thirteen variants across the 53 held-out Broadbalk seasons, grouped by type of change (Extended Data Table 1 ). The dashed line marks the baseline. Season cost and loss are defined in Methods.
Constraint category
Triggers
Scenarios
Representative grower constraint
LLM response
Weather delay
6
4
Saturated soils prevented field access in February
Doses merged or deferred, seasonal total retained
Machinery
4
4
A single dose above 100 kg N/ha was unworkable, and sulphur was fixed within the liquid blend
Split sizes capped, and treated liquid urea with inhibitor adopted
Cost or budget
4
2
Manure and slurry replaced bagged nutrients, and a May dose was skipped on a sister field
Phosphorus, potassium and sulphur removed, ceiling lowered, dose skipped
Protein quality
3
3
The milling target required late-season nitrogen for grain protein
Flag-leaf nitrogen restored or retained
Other
1
1
Feed-wheat logic was misapplied to a milling scenario
Proposal reverted within the same day
Total
18
4
Table 1: Adjustment triggers and grower-in-the-loop responses in the pilot deployment season (2025 to 2026). Seventeen triggers denote operational constraints that the ML recommendation could not represent, and the single trigger in the category ”other” is an LLM proposal error intercepted at review. Counts are aggregated across all four scenarios. Every response kept the seasonal N total at or below the amount defined by that recommendation.
Scenario
Weather
Machinery
Cost
Protein
Other
Total
Commercial, milling
2
1
1
1
1
6
Commercial, feed
1
1
3
0
0
5
Commercial, field trial, C1
1
1
0
1
0
3
Commercial, field trial, C2
2
1
0
1
0
4
Total
6
4
4
3
1
18
Table 2: Distribution of the eighteen adjustment triggers by scenario and constraint category. The two large-scale commercial farm scenarios span all five categories. The two commercially run field-trial scenarios span only three categories and record no cost or budget trigger. The single ”other” trigger is the intercepted LLM proposal error.
Figure 3: Field outcomes of the ML recommendation against agronomist standard practice at five sites. a , Grain yield at field trials C1, C2, H1, H2 and H3. b , Nitrogen dose response at C1 across seven ammonium nitrate rates (0 to 300 kg N/ha). Open circles show individual plots, filled circles show rate means and the dashed line is a quadratic fit to the rate means. Operating points mark the recommendation (diamond, 197 kg N/ha) and standard practice (square, 320 kg N/ha). c , Grain protein content at C1, C2, H1, H2 and H3. The dashed line marks the 13% milling-wheat protein threshold [ 29 ] . d , Cumulative N 2 O emissions at H1, H2 and H3. In a , c and d , bars show the treatment mean, error bars denote one standard deviation and points show individual plots. Sample sizes were n=4 plots per treatment at C1 and C2 and n=6 at H1, H2 and H3. Symbols denote treatment comparisons (ns not significant, ∗P<0.05 , ∗∗∗P<0.001 ), tested with a Welch t-test at C1 and C2 and a one-way ANOVA at H1, H2 and H3. The recommendation is the seasonal nitrogen amount and timing set by the ML model at sowing, and standard practice is the seasonal nitrogen amount and timing set by the agronomist. No in-season adjustment layer was active.
Figure 4: Field outcomes of the adjusted recommendation against standard practice in the 2025 to 2026 pilot season. a , b , Grain yield against nitrogen applied at field trials C1 ( a ) and C2 ( b ). c , Seasonal nitrogen applied under the adjusted recommendation and standard practice at C1 and C2. d , e , Grain protein content against nitrogen applied at C1 ( d ) and C2 ( e ). The dotted line marks the 13% milling-wheat protein threshold, and the shaded band in d spans the ladder means from 150 to 300 kg N/ha. f , Difference in grain protein content between the recommendation and standard practice, for the static recommendation in 2024 to 2025 (open diamonds) and the adjusted recommendation in 2025 to 2026 (filled diamonds). In a , b , d , e , filled circles show the means of seven ammonium nitrate rates and the dashed line is a quadratic fit to these means. The open circle in a is the 100 kg N/ha mean, excluded from the fit. Error bars denote one standard error of the mean, derived from the least significant difference of each trial with n=4 plots per treatment. In f , error bars denote the 95% confidence interval. The interval was derived from a Welch t-test on plot data for 2024 to 2025 and from the pooled error of each trial for 2025 to 2026. Symbols in a , b denote the treatment comparison (ns, not significant), tested with a t-test on the pooled error of each trial. The adjusted recommendation is the recommendation after grower-in-the-loop adjustment (Table 1 ).
Group
Variant
Loss
Change
Baseline
Predicted anchors to profit maximiser
0.0803
–
Improve predictions
Conservative quantile anchors
0.0890
+10.9%
Improve predictions
Nitrogen-uptake feature stacking
0.0757
−5.7%
Improve predictions
Extra weather features
0.0909
+13.2%
Improve predictions
Larger ensemble, two seeds by eight
0.0899
+12.0%
Improve predictions
Median-anchor control, no model
0.1071
+33.4%
Extended Data Table 1: The thirteen variants scored in Fig. 2 g. Loss is the grain lost against the best possible N choice, in t/ha, as the mean over eight price ratios of the median over all 53 held-out Broadbalk LTE seasons. The baseline feeds the predicted anchors directly to the profit maximiser.
Feature
Type
Unit
Window and source
Previous crop
categorical
–
Cropping records
Cultivar
categorical
–
Experiment records
Soil type
categorical
–
Site description
Section identifier
categorical
–
Broadbalk section 0 to 9, off-site 999
Winter rainfall
numeric
mm
October to February, HadUK-Grid
Growing-season rainfall
numeric
mm
March to July, HadUK-Grid
Extended Data Table 2: Input features of the recommendation model. Weather windows are whole months and are aligned to the harvest year, so the winter window for harvest 1996 runs from October 1995 to February 1996. Weather values are taken from the HadUK-Grid 1 km dataset at the respective Rothamsted LTE grid points. Growing-season radiation is converted from monthly sunshine hours.
Extended Data Fig. 1: Nitrogen applied and grain yield under the recommendation and standard practice over three seasons. a , Total N applied. b , Grain yield. Rows are site-seasons, grouped by the form of the recommendation in each season. In 2023 to 2024, only a seasonal N total was recommended, and doses were applied on the standard-practice dates. Points show treatment means ( n=4 plots at C1 to C3, n=6 at H1 to H3). Asterisks mark significant differences ( P<0.05 ). These were tested by Welch t-test or one-way ANOVA in 2024 to 2025, as in Fig. 3 , and by the trial LSD in other seasons. The mean yield difference was not significant in 2024 to 2026 (one-sample t-test, P=0.86 ) or across all seasons ( P=0.31 ).
Extended Data Fig. 2: Yield per unit of nitrogen and grain protein over three seasons. a , Partial factor productivity (PFP), grain yield divided by total N applied. b , Agronomic efficiency (AE), yield gain over the zero-N plot divided by total N applied. AE is shown only where a zero-N plot was included. c , Grain protein content. The dashed line marks the 13% milling-wheat threshold. n.t., not tested. Other conventions follow Extended Data Fig. 1 .
Extended Data Fig. 3: Illustration of the recommendation model. a , Nitrogen-response curve (equation ( 1 )) solved through the three predicted anchor yields, with the band between the 0.16 and 0.84 predictive quantiles. b , Recommended rate N∗ (equation ( 2 )) as the tangent point of a line of slope ρ/1000 , for ρ=4 , 7 and 10. Values are illustrative.
Extended Data Fig. 4: Grower-in-the-loop workflow within the winter wheat season. The outer ring shows the five crop stages, and the colour bar gives the months of each stage. Within the fertilisation stage (February to May), the workflow links grower dialogue (A), LLM adjustment (B) and agronomist review (C). The workflow is repeated adaptively as field conditions and grower constraints change.
Nitrogen rates for winter wheat are set before the season, under unknown prices and weather. The standard UK advice does not respond to prices, yet recent price swings moved the most profitable rate by tens of kilograms per hectare. Machine learning is often proposed as the fix. However, it is usually judged on prediction accuracy, and accurate prediction does not by itself make the recommended rate more profitable. Our insight is to score nitrogen advice directly by the profit it forgoes on measured yield response curves. We build a test bench on 892 such curves from two long running UK experiments, and sweep the nitrogen to grain price ratio to cover all price scenarios. On this bench, machine learning fails as a predictor. No model recovers the best rate within farm tolerance, and the benchmark noise shows none can. At normal prices, every model also loses to the standard advice on profit. The gain sits elsewhere. A simple correction step applied after the model cuts profit losses by a quarter, while better models and extra features give no gain. The same frozen correction cuts losses by 43% at the second site without any retraining. A hybrid of standard advice plus a damped correction removes bias and trims rare large losses. The same price sweep also prices emission cuts, at a cost comparable to current carbon prices. Machine learning therefore pays as a profit scored correction to standard advice, not as its replacement.
Agricultural decision-making faces a dual challenge: sustaining high yields to meet global food security needs while reducing the environmental impacts of input use, including fertilizer losses and other agrochemical applications such as herbicides, insecticides, and fungicides. Nitrogen inputs are central to this tension. They are indispensable for crop growth yet major drivers of greenhouse gas emissions, nutrient runoff, and escalating production costs. Addressing these intertwined pressures requires adaptive decision-support tools that are statistically principled, economically sustainable and interpretable for practitioners. We develop nonlinear model-based bandit algorithms as a framework for adaptive fertilizer management under uncertainty. Building on classical mechanistic yield-response models, our approach links algorithmic exploration-exploitation strategies directly to interpretable biological processes such as maximum yield and nutrient efficiency. This grounding makes recommendations transparent for practitioners while supporting cost-effective and sustainable input use. Methodologically, we establish regret and sample complexity results for the well-specified nonlinear case, examine robustness under misspecification, and evaluate the proposed methods through profit-oriented simulations and an offline replay case study on publicly available multi-site corn nitrogen field trials from the U.S. Midwest. The results show that incorporating biologically meaningful mechanistic structure enables faster learning and higher profit as evidence accumulates, with flexible nonparametric baselines providing a competitive alternative in pooled and heterogeneous settings. Our findings illustrate how interpretable, uncertainty-aware sequential decision rules can support economically sustainable fertilizer recommendations and contribute to more efficient agricultural input use.
Sakshi Arya, Wentao Lin
Department of Mathematics, Applied Mathematics and Statistics, Case Western Reserve University, Cleveland, OH 44106, USA · CTrees, Pasadena, CA 91105, USA
Accurately modeling crop response to Nitrogen (N) fertilization is a fundamental challenge in precision agriculture, as it impacts both economic returns and environmental sustainability. Existing approaches either rely on predefined parametric forms or opaque machine learning models, limiting their ability to interpret or discover site-specific functional relationships from data. In this work, we propose a neuro symbolic regression (SR) approach to learn parametric N-response curves without assuming a predefined functional form. Our approach integrates a transformer-based Multi-Set Symbolic Skeleton Prediction strategy, enabling the discovery of shared functional structures across multiple subdomains or management zones (MZs). By constructing diverse input subsets and enforcing consistency across them, the method recovers robust symbolic skeletons that are subsequently fitted to observed data using a genetic algorithm. This framework was first evaluated on synthetic one-dimensional problems to assess its robustness under varying levels of epistemic uncertainty. The results demonstrate the ability of the proposed SR approach to recover correct expressions even in data-scarce regimes. In this work, we present the results of applying our method to real-world winter wheat data, learning distinct parametric N-response curves for different MZs within a field. The results show that the discovered expressions not only achieve lower fitting errors than traditional models such as quadratic-plateau and exponential functions, but also capture diverse functional behaviors across spatial regions. This demonstrates the potential that neuro SR has to enable the discovery of site-specific agronomic relationships and support informed decision-making in precision agriculture.
Giorgio Morales, John Sheppard
Aston Centre for Artificial Intelligence Research and Application, Aston University, Birmingham, UK · Gianforte School of Computing, Montana State University, Bozeman, US