Agriculture — large-scale livestock productionKnowledge graphs & GraphRAG

Feeding animals individually instead of by barn average, across hundreds of farms

Feed decisions made on spreadsheet averages, with safety-buffer overordering baked in. A knowledge graph connecting animal, feed, environment and logistics cut feed waste 20–30%.

The distinction the engagement rests on. A conventional database records animal X gained Y weight — true, not actionable, with no cause anywhere in it. The knowledge graph records the chain instead, drawn as five linked nodes: animal X carrying genetic marker Z, reacting poorly to feed A, when humidity reached 85 percent sustained over 48 hours, given health score B indicating a stress response, as noted in PDF report C describing faulty ventilation. Four separate data sources — genetic records, a sensor feed, a health score and an unstructured PDF — resolve into one diagnosis with an action attached. Below: 20 to 30 percent less feed waste against feeding by barn average, and 14 weeks to a validated MVP including pilot validation across the farm network.
A row states a fact. A chain states a cause. Only one of them tells a farm manager what to change.

Project snapshot

Client
A large-scale agricultural producer operating hundreds of farms
Industry
Agriculture and livestock production
Business function
Feed planning, animal health and logistics
Challenge
Data was fragmented across hundreds of farms. Feeding ran one-size-fits-all on barn averages rather than individual need, and systemic overordering with costly safety buffers was standard practice. Decisions were made manually in spreadsheets, and logistics suffered from poor routing and timing.
Solution
A knowledge graph on Amazon Neptune mapping the relationships between every animal, feed type, environmental condition and logistics factor — so a query resolves not to “animal X gained Y weight” but to the chain of conditions that explains why. GraphRAG provides context-aware processing, SageMaker runs the models, and QuickSight delivers mobile-responsive dashboards to the field.
Result
Feed waste fell 20–30% and supply chain costs 15–25%, with ordering accuracy up 25% and 30–40% less time spent on manual planning. Delivered as a 14-week MVP with pilot validation, at individual-animal precision across hundreds of farms.

Key outcomes

20–30%
Reduction in feed waste
15–25%
Supply chain cost savings
25%
Better ordering accuracy
30–40%
Less time on manual planning

The client

Hundreds of farms, one spreadsheet at a time

A large-scale livestock producer operating across hundreds of farms.

The scale is exactly the problem. At that size the only tractable unit of decision-making becomes the barn — and the barn is the wrong unit.

The challenge

Feeding the average animal

Entire barns were fed based on what “most animals need” instead of what each individual animal actually requires.

Five problems compounding on each other: massive data fragmentation across hundreds of farms with no single view; one-size-fits-all feeding based on averages; systemic overordering with costly safety buffers, because uncertainty gets priced in as excess; manual spreadsheet decisions where real-time intelligence was needed; and inefficient logistics with poor routing and timing.

The cost of feeding an average

Barn
the unit of feed decision — set by what most animals in it need
Buffers
systemic overordering, because uncertainty was priced in as excess stock

The size of that gap is well established in the animal science literature, which is worth stating because it is independent of us. Feeding pigs daily tailored diets instead of a group ration has been measured against conventional phase feeding, repeatedly:

Industry context — peer-reviewed research, not our measurements

26%
lower lysine intake from individually tailored daily diets versus group feeding
30%
less nitrogen excreted, with no loss of body weight, protein mass or daily gain
>8%
lower production cost, alongside ~25% lower protein and phosphorus intake

Those figures come from published animal science, not from this deployment — see Precision pig feeding: a breakthrough toward sustainability and Precision livestock feeding: matching nutrient supply with nutrient requirements of individual animals. We include them because they establish that the prize is real before we claim any of it: the 20–30% feed waste reduction measured on this deployment sits inside that envelope rather than above it.

Constraints

What we had to design around

  • GranularityThe unit of decision had to become the individual animal while the operation stayed at hundreds of farms — precision and scale pulling against each other.
  • SourcesThe signal lives across sensor readings, genetic markers, health scores, maintenance PDFs, weather feeds and market data. Different formats, different cadences, no shared key.
  • Field useThe people who act on this are in barns, not at desks. A dashboard that assumes a laptop is a dashboard nobody opens.
  • CausalityA conventional database records that an animal gained weight. It cannot express why, which is the only actionable part.

Our approach

Model the relationships, because the relationships are the answer

The distinction the whole engagement rests on:

A traditional database says “Animal X gained Y weight.” That is true, and it is not actionable, because it contains no cause.

The knowledge graph says “Animal X with genetic marker Z reacted poorly to feed A when humidity hit 85%, due to health score B, noted in PDF report C.” That is a chain of connections across four data sources — and only the chain is actionable.

The solution

A graph over the whole operation

  1. Amazon NeptuneThe knowledge graph itself — every relationship between animal, feed type, environmental condition and logistics factor, mapped rather than implied.
  2. GraphRAGContext-aware processing over the graph, so a natural-language question resolves against the relationship structure rather than a table scan.
  3. AWS SageMakerThe machine learning platform running the predictive models.
  4. Amazon QuickSightMobile-responsive dashboards, built for someone standing in a barn rather than sitting at a desk.
  5. Multi-modal APIsWeather, market and sensor data pulled into the same graph as the operational records.
A left-to-right flow across four bands. Five previously separate sources — sensor readings, genetic records, health scores, maintenance PDFs, and weather and market feeds — converge on a knowledge graph on Amazon Neptune that maps every relationship between animal, feed, environment and logistics rather than implying it. GraphRAG sits over the graph as the query interface, providing context-aware processing so a natural-language question resolves against the relationship structure rather than a table scan, with SageMaker running the models. The output reaches Amazon QuickSight mobile-first dashboards, built for someone standing in a barn rather than sitting at a desk. The unit of decision moved from the barn to the individual animal, at a scale of hundreds of farms.
Five source types that previously lived apart, and one query surface over all of them.
4 sourcesgenetic records, a humidity sensor, a health score and an unstructured maintenance PDF — resolved into one diagnosis with an action attached

Responsible by design

An answer that shows its working

A feed recommendation nobody can interrogate does not get followed. Farm managers have decades of judgment about their own animals, and a system that says “reduce feed in Barn 3” without saying why is a system that loses that argument every time.

Because the answer is a traversal rather than a score, it arrives with its chain attached — the marker, the sensor reading, the health score, the maintenance note. The manager can check each link against what they already know, which is how the recommendations earned their way into the daily routine.

It also means a wrong answer is diagnosable. If the ventilation PDF was stale, that is visible in the chain rather than buried inside a model.

Results

Diagnosis in one query

  • Feed waste fell 20–30%, against feeding by barn average with systemic overordering and safety buffers priced in.
  • Supply chain costs fell 15–25%, as predictive optimisation replaced reactive logistics — the routing and timing problem that sat underneath the feed problem.
  • Ordering accuracy improved 25%, with AI predictions in place of historical averages. This is what removes the safety buffer rather than merely shrinking it.
  • Manual planning time fell 30–40%, as real-time intelligence replaced spreadsheet planning across hundreds of farms.
  • Individual-animal precision at scale, in a 14-week MVP— the decision unit moved from the barn to the animal without the operation shrinking to make that possible.
A four-column table comparing each metric before and after the system, with the measured impact. Feed waste: from systemic overordering to individual precision, a 20 to 30 percent reduction. Supply chain costs: from reactive logistics to predictive optimisation, 15 to 25 percent savings. Ordering accuracy: from historical averages to AI predictions, a 25 percent improvement. Manual planning: from spreadsheet chaos to real-time intelligence, 30 to 40 percent time saved. Delivered as a 14-week MVP with pilot validation across hundreds of farms.
Four measures, all downstream of one change: the unit of decision moved from the barn to the individual animal.

The illustrative case from the deployment: asked “Why is feed waste suddenly high in Barn 3?” the system answers that the 5,000 pigs with a particular genetic marker are stressed by faulty ventilation noted in a maintenance PDF, reducing intake, with the humidity sensor showing 85% for 48 hours — and recommends fixing the ventilation and adjusting the feed blend for stress response.

Beyond the numbers

What else changed

The knowledge graph approach built here now underpins work well outside agriculture — healthcare patient relationship mapping, manufacturing supply chain optimisation, enterprise operational intelligence and smart-city infrastructure.

Agriculture was where the pattern got proven, not where it stops. Complex multi-source operations turn out to be one problem wearing different clothes.

One note on the evidence: the Barn 3 exchange above is an illustrative example of the system’s reasoning rather than a logged incident. The four measures are as reported at the close of the engagement, and the independent animal science cited earlier brackets rather than contradicts them.

If your operation makes decisions on averages because the data is fragmented

The question is whether the relationships between your sources are recoverable. Usually they are — they are just not expressed anywhere yet.