knowledge graphs · food systems · Scotland
Field to Fork and Back Again
Knowledge Graphs for a Good Food Nation
Picture a bowl of porridge on a dark January morning. The oats were grown on an estate in the north-east (call it Glenmeadhanach), then dried, cleaned and rolled at a mill, packed, and taken by lorry to a depot and on to a shop. The milk may have come from the estate's dairy herd too, but by way of a creamery that pooled it with the milk of dozens of other farms, so nobody can say for sure. The raspberries on top did not come from Perthshire, not in January: they came from a long way south. And when breakfast is over, the bit nobody finished goes into the food caddy. The council collects it and takes it to an anaerobic digester, where it becomes gas, electricity and a digestate that is spread on a field, possibly not far from where the oats grew.
Now ask some ordinary questions of that bowl:
- Where did it all come from?
- What is in it?
- Is it good for me, and for my children?
- What did it cost the climate?
- Did any of it cost a forest, somewhere far away?
- If something turned out to be contaminated, who would need to know, and how fast?
- What happens to what is left over?
Every one of those questions has an answer. The trouble is that each answer is held by someone different: the farmer, the miller, the creamery, the retailer, Food Standards Scotland, the council, the waste contractor, a researcher at one of the institutes. Each keeps it in a different system and describes it in a different vocabulary. Each shares it, if at all, one step at a time. Nobody holds the whole bowl.
This article is about how knowledge graphs could help hold it, and why a small country like Scotland is unusually well placed to try.
A supply chain, for once, literally
In two earlier articles I borrowed the language of manufacturing: one on knowledge graphs for investigators and analysts (Joining the Dots), the other on the land question (Who Owns the Glen?). Research was a supply chain, and each finished piece had a bill of materials recording what it was built from. This time the supply chain is not a metaphor. It has fields, lorries, cold stores and checkouts, and it already lives by the bill of materials. The EU's General Food Law of 2002, which Scotland still applies, requires "one step back, one step forward" traceability: every business must know who it bought from and who it sold to. That is what lets a recalled batch be found.
It is a sound rule, but notice what it gives you. Each business sees its neighbours. Nobody sees the chain. Assembling the whole story of a product means following it hop by hop, business by business, usually by email and spreadsheet, usually under pressure. Other regulators are pushing further:
- In the United States, the Food and Drug Administration's food traceability rule, now due to take effect in July 2028 (fda.gov), requires defined records at defined points for higher-risk foods.
- In seafood, the Global Dialogue on Seafood Traceability (sustainablefish.org) has a standard that expects farmed fish to be traceable back to the hatchery and the feed mill.
- In the European Union, the Deforestation Regulation, which applies from the end of 2026, wants the location of the land where cattle, soya, palm oil and several other commodities were produced. More on that below.
And traceability is only one of the questions in the porridge bowl. Many people need to know things about food, and each needs a different slice:
- Farmers and growers need to know what their land can grow as the climate changes, what their buyers want, and how their carbon and biodiversity audits compare.
- Processors and manufacturers need to know what is in their inputs, where those came from, what they may contain, and what to do with what they do not use.
- Retailers and caterers, including the councils that serve school meals, need to know what they are buying and whether it meets the rules and their own commitments.
- Consumers need to know what they are eating, in terms they care about, and those terms differ from person to person.
- Government and regulators need to know about safety, fraud, health, food security and emissions, across the whole system.
- The waste and recycling sector needs to know what is coming its way. The farms and factories downstream of it need to know what can be used again.
These are not separate systems that happen to touch. They are one system, seen from different places.
Sentences about food
The basic parts of a knowledge graph are short sentences with three parts: a subject, a verb and an object. The standard for writing them is RDF, the Resource Description Framework. A slice of the porridge might read:
Lot RO-2611 — is a batch of —> rolled oats
Lot RO-2611 — was milled from —> Lot OAT-0934
Lot OAT-0934 — was harvested from —> Field 12, Glenmeadhanach Estate
Field 12 — lies within —> land capability class 3.1
(The estate, its business and the lots are invented.) Each sentence comes from a different party: the mill, the grain store, the farm, the national soil survey. Because each lot is the same thing in all of them, they join up into a chain from the packet to the field.
That depends on each thing having its own identifier rather than being known by its name. The move is often summed up as going from "strings to things". Food has more names than most subjects. Oats, rolled oats, oat flakes, porridge oats, pinhead oatmeal and jumbo oats are different products to a miller and much the same product to a shopper.
Fortunately, much of the naming work has been done:
- GS1 numbers. The food industry already identifies products, places and lots with GS1 numbers, the ones behind the barcode.
- GS1 Digital Link turns a barcode into a web address. Retailers aim to read the new two-dimensional codes at the till by the end of 2027 (barcode.graphics).
- FoodOn (pubmed.ncbi.nlm.nih.gov; github.com) is an open "farm to fork" ontology. It describes food sources, products and processes, building on LanguaL, a long-established thesaurus for describing food.
- AGROVOC, the UN Food and Agriculture Organization's thesaurus, covers agriculture in many languages.
- Open Food Facts (en.wikipedia.org), a volunteer project, holds open data on around four million packaged products.
An ontology is the agreed lexicon behind all this: the kinds of things that matter, the relationships between them, and definitions people have signed up to. As I have argued before (semanticarts.com), agreeing one is a social exercise as much as a technical one. A food system is a good place to discover how often "local", "fresh", "natural" and "sustainable" mean different things to different people.
Vocabularies like FoodOn say what an oat is. They say less about the everyday relationships that tie a food system together, and for those it helps to have an upper ontology. Semantic Arts' gist (github.com) is a deliberately small one for business: around a hundred classes and about as many properties, free to use under a Creative Commons licence. It is particularly careful about meronomy, the different ways in which one thing can be part of another. A food system is full of them:
- Parts (gist:isPartOf). A part that exists in its own right, as a silo is part of a creamery. The relationship is transitive, so a part of a part is part of the whole. A narrower version, gist:isDirectPartOf, is for parts with nothing in between.
- Members (gist:isMemberOf). Membership of a collection or an organisation: a cow is a member of a herd, a farm business a member of a cooperative. Membership is not transitive. A member of a cooperative is not, by that fact, a member of a federation the cooperative joins.
- Substances (gist:isMadeUpOf). What a thing is made of: porridge is made up of oats, milk and salt.
- Places (gist:isGeoContainedIn). One geographic location within another, and transitive too. Field 12 lies within Glenmeadhanach Estate, the estate within a parish, a council area and a river catchment, and all of them within Scotland. A question about the catchment then finds the field, though no record says so directly.
gist also keeps a business and its land apart. Glenmeadhanach Estates Ltd is an organisation. Readers of the land article will remember it as a company registered in Jersey and controlled by a trust; here it farms. It owns (gist:owns) Glenmeadhanach the estate, which is a geographic region. The two share a name but are different things, and the difference matters the moment the land is sold, let or split.
These distinctions sound pedantic until you reason with them. Transitive containment is what lets a rule ask about a catchment. Non-transitive membership stops a rule from sweeping in everyone in a federation. And the difference between a part and a substance turns out, as we will see, to be the whole difficulty with milk.
Events, not records
Much food data is better thought of as a history of events than as a set of records. The oats were harvested, dried, received, milled, packed, shipped and sold. GS1's EPCIS 2.0 standard (ref.gs1.org), released in 2022, describes exactly this. Each event says what moved or changed, when, where and why. Since version 2.0 events can be written as JSON-LD, a form of linked data, so traceability events can drop straight into a knowledge graph. The seafood standard I mentioned is built on it. The United Nations' draft Transparency Protocol (unctad.org) uses the same idea alongside digital product passports and verifiable claims.
A graph of events turns "one step back, one step forward" into something you can ask of the whole chain at once:
- Which shops received anything made from this lot of milk powder?
- Which of this week's school meals contained a product from a supplier whose certification has just lapsed?
- Which salmon were fed from a batch of feed later found to be faulty?
Each is a question about connections. A graph answers questions like that quickly; a pile of spreadsheets answers them slowly, if at all.
What's in it, and is it good for me?
At the other end of the chain sits the person with the spoon, and Scotland has particular reasons to care what is on it. The Scottish Health Survey 2024 (gov.scot) found that:
- a third of adults were living with obesity, and two thirds were overweight;
- fewer than a quarter met the dietary goal for free sugars;
- 14% had experienced food insecurity, up from 9% in 2021.
Labels help, up to a point. But "is this good for me?" is not a single question. It depends on:
- health, allergies, and what else you are eating;
- cost, and whether you can get to a shop that sells it;
- culture and religion;
- the environment and animal welfare;
- whether the money stays in the local economy.
The 2025 EAT-Lancet Commission (bda.uk.com) framed its report around food systems that are "healthy, sustainable and just". It also put food systems at around 30% of global greenhouse gas emissions. Scotland's Good Food Nation (Scotland) Act 2022 (gov.scot) takes the same wide view.
A knowledge graph does not answer "what should I eat?" for you, and I would be wary of anything that claimed to. What it can do is hold the facts about a food alongside the facts about its origins, and alongside rules that turn them into judgements people can inspect. Rules, of the kind written in Datalog or as SHACL rules, derive new facts from old ones. This product contains an ingredient from this crop; this crop contains gluten; therefore this product is not suitable for a coeliac diet. The same mechanism can say:
- whether a meal meets the school food standards;
- whether a product counts as Scottish under a procurement policy;
- what share of a council's food spending went to local suppliers.
Because the rule is written down, anyone can see why the answer came out as it did, and argue with the rule rather than with the result.
Checking the goods coming in
A graph is only as good as what goes into it, and food data arrives from thousands of businesses of every size. SHACL, the W3C's Shapes Constraint Language, is how you write down what good data looks like and check it on arrival. For example:
- every lot must have a date and a place of harvest or production;
- every prepacked product must name its allergens;
- an organic claim must point to a current certificate.
This is goods-in inspection, applied to information. A validation report lists exactly which record failed which check, and why.
Two features of food make this more than housekeeping:
- The open world. If a product record says nothing about sesame, that is not the same as saying it contains none, and the checks have to be written to tell the difference.
- Rules that differ by place and by buyer, as the sections on European rules and gene editing make clear.
Following the milk
The milk in the porridge makes a stranger journey than the oats. Scotland has just under 750 dairy herds (nfus.org.uk), with about 182,000 cows between them, producing around 1.5 billion litres of milk a year. Roughly two fifths of it is sold as liquid milk and two fifths made into cheese.
Every day or two a tanker calls at the farm. Before the milk is pumped aboard, the driver takes a sample labelled with the farm's number. The laboratory tests it for fat, protein, cell counts and antibiotics, and that sample is how the farm is paid and how a problem is traced back. Then Glenmeadhanach's milk is mixed with the milk of every other farm on the round. At the creamery the tanker empties into a silo that holds the milk of several rounds, and from the silo it becomes milk, cream, butter, cheese or powder. Cheese-making leaves whey, which goes on to protein powders, animal feed or a digester.
So the line that served for the oats becomes a mesh:
Collection 4471/03 — was collected from —> Glenmeadhanach Estates Ltd
Collection 4471/03 — had a volume of —> 6,200 litres
Collection 4471/03 — was emptied into —> Silo 2, 14 January
Cheddar batch CB-0117 — is made up of —> milk from Silo 2, 14 January
In gist's terms the cheese is made up of the milk in the silo, and it is not part of any one farm. "Which farm did this come from?" has no single answer. It has an answer in proportions: these forty farms, in these shares. That is arithmetic over the volumes in sentences like these, and a graph keeps the arithmetic verifiable.
Proportions matter because claims about milk are increasingly claims about shares. So much of this milk came from farms with a current carbon audit; so much of the cows' feed was free of soya from deforested land. Many such claims are made on a "mass balance" basis: the certified milk or feed is accounted for in total, but it is physically mixed with the rest. That is legitimate if it is declared, and it is exactly the kind of qualification RDF 1.2's statements about statements can carry: this claim, on this basis, checked by this body, for this period.
The feed belongs in the chain too. A dairy cow eats grass and silage from the farm, often draff from a distillery, and bought-in concentrates that may contain soya and palm kernel shipped from South America and South-East Asia. In 2024 WWF found that only 4.5% of the soya entering the UK food retail chain (wwf.org.uk) was verified free of deforestation and conversion, and most of that soya goes to feed chickens, pigs, farmed fish and dairy cattle. A verifiable answer to "did this milk cost a forest?" depends on facts about a field on another continent.
The money is changing as well. Since July 2025, under the UK-wide Fair Dealing Obligations (Milk) Regulations 2024 (legislation.gov.uk), every milk purchase contract must be in writing and set out how the price is worked out. A price that rewards a farm for its carbon audit or its feed needs data both sides trust.
Milk is also where substitution is being tried hardest. One option is oat drinks, for which Scotland grows the raw material. Another is precision fermentation, which can make the proteins found in milk without a cow (more on that below).
A changing climate and the question of substitutes
Agriculture produced 19.3% of Scotland's net greenhouse gas emissions in 2024 (gov.scot). In 2023 (gov.scot), suckler beef alone accounted for about two fifths of the farm total. Dairy came third, at 1.34 million tonnes of CO₂ equivalent in 2022, 17% less than in 1990 (fas.scot).
The climate is also changing the farming. Projections for Scotland point to a longer growing season and a wider range of possible crops, but also to more pests and diseases, more extreme rain in the west and more frequent drought in the east. James Hutton Institute modelling for the Scottish Government found that barley yields are likely to fall in many parts of Scotland by the 2040s under a high-emissions scenario (hutton.ac.uk), and barley is the backbone of the whisky industry.
The Institute has also built a research tool that re-runs Scotland's Land Capability for Agriculture classification (hutton.ac.uk) under future climates. Its latest work suggests that easing wetness constraints may generally improve the land's capability, with trade-offs, not least for soil carbon. The land's own description, in other words, is no longer a fixed fact.
All of this raises a question food systems will have to ask more often: what can substitute for what? If a crop stops suiting a district, what could replace it there, and what would the knock-on be for the people who processed and bought it? The UK as a whole produces around 60% of the food it eats, but only about 16% of its fresh fruit (gov.uk), which is why January raspberries come from abroad.
Substitution can work at home too. By one estimate (news.stv.tv), peas and beans grow on around 5% of UK cropland but only around 1% in Scotland. Yet faba beans can add more than 400 kg of nitrogen a hectare (sefari.scot), and the Hutton has been trialling grass pea, black chickpea, faba bean and pea for Scottish conditions (sefari.scot). Substitution runs through diets, too: the EAT-Lancet diet is, among other things, a recipe for replacing some animal products with plants. And it runs through feed, where protein recovered from whisky by-products might replace soya in salmon feed.
Substitutability sounds like a simple relationship, "A can replace B", but it never is. A can replace B in this use, up to this proportion, under these conditions, with this effect on cost or nutrition, according to this study. That is a statement that needs statements about it, which is exactly what RDF 1.2, the new version of RDF, adds.
And because much of the answer depends on where, the graph needs geography. GeoSPARQL, the geographic extension of the SPARQL query language, lets a question about substitutes be asked of particular fields, catchments or council areas. It can join those places to soil, climate and land capability data.
Forests, carbon and the rules next door
Scotland is not in the European Union, but its food is sold there and many of its buyers answer to EU law. Two kinds of EU rule have been reaching the farm gate: rules about deforestation and rules about carbon.
Deforestation. The EU Deforestation Regulation applies from 30 December 2026 (agrinfo.eu) to larger companies, and from mid-2027 to the smallest. Whoever first places cattle, soya, palm oil, cocoa, coffee, rubber or wood on the EU market, or listed products made from them, must show that they were produced legally and not on land deforested after 2020. For cattle that means the location of every establishment where the animals were kept, from birth to slaughter (green-forum.ec.europa.eu). Milk and cheese are outside its scope (coolset.com). Beef is in, and that includes the beef from dairy cows at the end of their milking lives. The UK is classed as low risk (confor.org.uk), which lightens the checks without removing them.
Here Scotland starts with an advantage. Since October 2021 every cattle birth, death and movement in Scotland has been recorded on ScotEID (gov.scot), and every holding has a location. The facts a Scottish exporter needs already exist. What is missing is the join: from an animal, to every place it lived, to the coordinates of each, to the statement an EU buyer must file.
The rules themselves move. In July 2026 the Commission revised the product list (environment.ec.europa.eu), taking out hides and leather and adding frozen cattle tongues from the end of 2027. Great Britain's own rules on forest-risk commodities, provided for in the Environment Act 2021, have still not been made. The UK Government said in June 2026 that it would take them forward (news.mongabay.com), and unlike the EU's they would cover only deforestation that was illegal where it happened.
Carbon. Several EU measures now put a reporting duty or a price on the carbon in food:
- Company reporting. After the 2026 "Omnibus" simplification, the EU's sustainability reporting directive (mofo.com) covers companies with more than 1,000 employees and €450 million in turnover. For a food company, most emissions lie in its supply chain, so its farmers get asked for data. Arla, the Danish-Swedish dairy cooperative that merged with Germany's DMK in June 2026, has a validated target to cut the emissions from its farms and land by 30.3% by 2030 (arla.com). It also pays for progress: each point a farm earns in its annual climate check adds €0.03 to every kilo of milk (dairyreporter.com), rising to €0.04 in 2027.
- Green claims. Since 27 September 2026, products sold in the EU can no longer claim to be "climate neutral" on the strength of offsets (aoshearman.com), and generic claims such as "eco-friendly" need evidence. A claim about a litre of milk now has to rest on that milk's own supply chain.
- Fertiliser at the border. Since January 2026, importers bringing fertiliser into the EU have owed a carbon charge under its carbon border adjustment mechanism (gov.uk). The UK's own version, which also covers fertiliser, starts in January 2027 (gerlach-customs.com).
- Carbon farming. In July 2026 the Commission adopted the EU's first certification methods for carbon farming (climate.ec.europa.eu). They cover farming on mineral soils, rewetting peatland and planting trees, all of which matter in Scotland.
One member state has gone further. Denmark will tax livestock emissions from 2030 (mfat.govt.nz), the first country to do so.
Why should a Scottish farm care?
- Its buyers. A large processor reporting under EU rules, or selling into an EU market, will ask its suppliers for the evidence.
- Keeping pace. Scottish ministers have a power under the Continuity Act 2021 (legislation.gov.uk) to keep Scots law in step with EU law.
- The SPS agreement. A UK–EU agreement on food safety and animal and plant health was agreed in principle in November 2026 (foodnavigator.com). It would bring Great Britain into dynamic alignment with EU rules in those areas, probably from early 2028. It does not cover deforestation or company reporting, but it shows which way the rules are moving.
Look at what all these rules ask for, and it is the same handful of facts in different shapes:
- where something was produced, down to the field or the holding;
- when, and by whom;
- from what inputs, with what emissions;
- who checked.
A farm asked separately by each buyer, each scheme and each regulator answers the same questions again and again, in different spreadsheets. In a graph the facts are recorded once, with their provenance, and each rule becomes a set of SHACL shapes and a query. A due diligence statement is one projection of the graph, a scope 3 emissions figure is another, and a permitted green claim is a rule with its evidence attached. When the rules change, as the EU's product list did in July 2026, you change the shapes and the queries, not the farm's records.
The paperwork is turning into data
Step back from food for a moment, because the pattern is wider still. Across the EU, compliance is turning from documents into structured data that has to be filed, checked and passed along the chain:
- Deforestation. Due diligence statements under the EUDR go into an EU information system (environment.ec.europa.eu), and their reference numbers travel with the goods.
- Carbon at the border. CBAM declarations report the emissions embedded in imported goods, installation by installation, and the figures for 2026 are the first to be checked by accredited verifiers (sgs.com).
- Product passports. From 18 February 2027, electric vehicle and large industrial batteries need a battery passport: a QR code leading to some seventy data points (battery-tech.net), from carbon footprint to supply chain due diligence, with different parts visible to the public, to interested parties and to authorities. Passports for other products will follow under the Ecodesign for Sustainable Products Regulation, iron and steel first, then textiles (dpp-tool.com). The EU's passport registry opened in July 2026 (passportcraft.com). The first six European standards (wiot-group.com) for passports, covering identifiers, data carriers, data exchange and interoperability, came out in May 2026.
- Forced labour. From 14 December 2027, products made with forced labour are banned from the EU market (sustainablefutures.linklaters.com), whatever they are, food included. The United States has gone further at its border since 2022. It presumes that goods made wholly or partly in Xinjiang involve forced labour unless the importer proves otherwise (cbp.gov), and proving otherwise takes supply chain evidence.
Food itself is outside the product passport regulation (passportcraft.com), which will eventually cover nearly every other physical product. But the pattern reaches food anyway: through the deforestation and forced labour rules, through the fertiliser in CBAM, and through the packaging food comes in.
The technology underneath is converging too. The Battery Pass project's reference data model for the battery passport is written in RDF (github.com), with JSON-LD and other formats generated from it. The UN Transparency Protocol defines a suite of digital credentials (untp.unece.org) for supply chains. It builds on W3C Verifiable Credentials (w3.org), a W3C Recommendation since May 2025, so a claim such as "this lot is deforestation-free" can carry the signature of whoever checked it.
That is why I think the proposal at the end of this article is not only about food. A business that has done the work it describes would find most of these obligations familiar:
- Identifiers for its products, lots, places and partners, which is where every passport, due diligence statement and border declaration starts.
- A shared lexicon with meanings agreed in advance, so that mapping to a regulator's data model becomes a one-off job rather than a scramble.
- Validation on the way in. SHACL shapes that mirror the regulator's requirements catch a missing location or an unverified emissions figure before it is filed, not after it is rejected.
- Provenance and verification. Every statement carries who made it and who checked it, which is what verifiers and verifiable credentials need.
- Projections. Each filing becomes a query over data already held, not a new spreadsheet.
- Data kept at home. Product passports are designed so that businesses keep their own data, with a registry pointing to it. That is close to how a holon works.
Grown, brewed or made
Some substitutes will not be grown at all. Food is increasingly brewed or manufactured:
- Precision fermentation uses engineered microbes to make specific proteins, such as those in milk. Food Standards Scotland and the Food Standards Agency published the UK's first safety guidance for such foods in March 2026 (proteinproductiontechnology.com), and an application for a precision-fermented milk protein has been under assessment.
- Cultivated meat, grown from animal cells, can be sold in Singapore, the United States and Australia, though seven US states have banned it (foodnavigator.com). None is yet authorised in the UK. The two agencies launched a regulatory sandbox (gov.uk) in March 2025, and its participants include Roslin Technologies, based near Edinburgh.
Scotland has a stake in the less glamorous end too:
- ENOUGH (agfundernews.com), based in Glasgow (strath.ac.uk) and the Netherlands, makes mycoprotein, a protein from fungi, by fermentation.
- MiAlgae (mialgae.com) grows omega-3-rich microalgae for fish and pet food on whisky co-products.
- Horizon Proteins (horizonproteins.com), a Heriot-Watt spin-out, recovers protein from pot ale, the liquid left after the first distillation, to replace fishmeal and soya in salmon feed.
Turning whisky into salmon is about as Scottish as biotechnology gets.
Then there is gene editing, where Scotland now sits between two neighbours:
- England's precision breeding regulations (mofo.com) came into force for plants in November 2025.
- The EU has adopted its own rules (afslaw.com) for new genomic techniques, applying from 2028. Under them, the simplest category of gene-edited plant carries no label.
- Scotland has adopted neither framework (netregs.org.uk) and still regulates gene-edited organisms as GMOs. Meanwhile the UK Government takes the view that precision-bred products from England can be sold in Scotland under the Internal Market Act.
- The SPS agreement may change all this. Whether England's precision breeding regime can survive inside an aligned framework has been a key question in the talks (agindustries.org.uk).
Organic producers, who may use neither kind, face the sharpest end of this.
Whatever one thinks of the science or the politics, the consequence for information is clear. How a food was bred or made is becoming as important a fact about it as where it was grown, and that fact has to travel with the food across borders whose rules differ. A label cannot carry all that, but a graph can: what the product is, how it was produced, under which regime it was authorised, who says so, and which rules apply where it is sold.
Closing the loop
Back to the food caddy. Scotland disposed of about 1.04 million tonnes of food waste in 2021 (zerowastescotland.org.uk), or 189 kg per person. Households produced 59% of it and food and drink manufacturing 27%. The total was 5% up on the 2013 baseline, against a target to cut food waste by a third, per person, by 2025.
The law is already moving:
- Food businesses outside rural areas that produce 5 kg or more of food waste a week must already separate it (beta.sepa.scot).
- The Circular Economy (Scotland) Act 2024 (legislation.gov.uk) gives ministers powers to require businesses to report publicly on their waste and surplus, starting with food.
A circular system needs more than a bill of materials. It also needs a bill of what is left: what by-products and surplus come out of each step, and where they can go next. One factory's waste is another's input. The draff from a distillery has long gone to cattle, and now the pot ale may go to salmon. Surplus food can feed people before it feeds a digester, and digestate can replace bought fertiliser on the field the oats came from.
These are connections, and today they are mostly invisible. Put them in the same graph as the forward supply chain and the loop becomes something you can see, measure and report, which is what the new reporting powers will need.
Wholes that are parts
Here is the difficulty with everything I have described so far. The obvious way to build it is one big national food database, and nobody wants that, least of all the people who would have to feed it. A farmer will not hand field-level yields to a central database. A processor will not publish its supplier list to its competitors. A council answers to its own voters. Any workable design has to let each party keep its own data, under its own rules, while still contributing to the whole.
The writer Arthur Koestler had a word for things like this. In The Ghost in the Machine (1967) he coined holon for something that is at once a whole in itself and a part of something larger. A field is a holon within a farm, the farm within a cooperative or a catchment, those within a region, and the region within the nation. A creamery, a council's school meals service or an anaerobic digestion plant is a holon too: autonomous, with its own responsibilities, yet part of the food system. In gist's terms some of those steps are geographic containment and some are membership, which is why it helps to have predicates that tell them apart.
Koestler's idea later shaped research into "holonic" manufacturing, and it has recently come back as a way to organise knowledge graphs. A W3C Holon Graph Community Group (w3.org), chaired by Kurt Cagle, began meeting in June 2026. In its model, a holon has four parts:
- a knowledge graph describing a system;
- a record of how it has changed;
- a boundary of rules and constraints;
- projections that show it to others.
(A community group writes proposals, not W3C standards.)
I should declare an interest here, because I have been building a triplestore around the same idea. HOLOS (pypi.org) is an RDF 1.2 store with SPARQL 1.2, and its holons map closely onto the problem above:
- A scene and a boundary. Each holon holds its current state alongside SHACL shapes and rules that say what must be true and what follows. Every change is checked against the boundary before it lands, so the holon can never enter a state its rules forbid. For a farm, the boundary could be the conditions of its Whole Farm Plan; for a creamery, "every collection carries a farm number, a volume and a sample"; for an organic processor, "no gene-edited inputs"; for a council, its Good Food Nation commitments.
- An event log. Every attempt to change a holon is recorded, accepted or refused, with provenance for each statement. That is the bill of materials, kept automatically: who said what, when, and whether it was allowed.
- Projections. Others see a holon through published queries rather than its raw contents. A farm can share its carbon audit summary with its buyer without sharing its field records. A creamery can give an EU importer the evidence about its feed without publishing its supplier list.
- Access enforced at the source. Every statement is checked against policy as it is read, so the answer to any query is the answer over what that person is allowed to see. A count cannot betray records it is not permitted to include.
- Branches. A holon can be copied to try a change against real data. That is exactly what a question like "what if we replaced half the barley in this district with beans?" needs.
- Geography. Its GeoSPARQL support reads both British National Grid and GPS coordinates, so field boundaries and delivery points can be queried together.
The same engine also runs inside a web page, which is how the Turtle Editor Viewer (semantechs.co.uk) on the Semantechs site works. So a farm or a school kitchen could hold its own holon on a laptop.
In fairness, HOLOS is young. Its holon layer is a working skeleton. It validates around 165 changes a second against a holon of 300,000 statements, but it cannot yet query past versions, and holons can so far be reached only from program code, not over the web. The idea matters more than the implementation, and other implementations would be welcome.
A proposal for Scotland
Why Scotland? Partly because a small country has short chains and few enough actors to get them round a table. Partly because its food matters well beyond its borders: salmon was the UK's largest food export in 2024, worth a record £844 million (seafoodsource.com), and Scotch whisky exports were worth £5.4 billion (scotch-whisky.org.uk).
And partly because the hooks are already in law:
- The Good Food Nation Act requires a national plan, published in December 2025 (spice-spotlight.scot). Councils and health boards will have to produce their own plans, with progress reports every two years, and an independent Scottish Food Commission (gov.scot) will scrutinise them.
- The Whole Farm Plan: by May 2028, farm businesses claiming support must have completed the Whole Farm Plan audits and plans (fas.scot) that apply to their land and farming, such as carbon audits, biodiversity audits and soil analysis.
- The Circular Economy Act (legislation.gov.uk) brings food waste reporting.
- Europe. EU rules on deforestation, company reporting and green claims already reach Scottish producers through their buyers, and the SPS agreement will bring dynamic alignment on food law.
Each of these produces data that someone else needs, and at present each is set to produce it in its own format.
Scotland would not be starting from nothing, and it can learn from others:
- Estonia. Its X-Road (interoperable-europe.ec.europa.eu) has connected public and private systems since 2001 without a central database, with each organisation keeping its own data. Finland now uses it too.
- Ireland. Its Origin Green programme (bordbia.ie) carries out carbon footprint assessments on some 17,000 dairy and 50,000 beef farms every 18 months. That shows farm data at national scale is achievable when it is tied to something farmers value.
What I would propose is not a database but a federation of holons, with four elements:
A shared lexicon, mostly borrowed. gist would sit at the top, with its predicates for parts, membership, substances and containment. Beneath it would come FoodOn, AGROVOC, GS1 identifiers and EPCIS events, W3C PROV for provenance and GeoSPARQL for place. A small Scottish extension would cover what only Scotland has: land capability classes, Whole Farm Plan elements, the Good Food Nation outcomes, and Scotland's own rules on gene editing.
Holons for those who hold data, from a farm or a fish farm to a processor, a council or a regulator. Each enforces its own boundary and keeps its own record.
Projections for each audience:
- a product's story for the shopper, behind the code on the pack;
- local sourcing and nutrition for the council;
- deforestation and carbon evidence for buyers and EU importers;
- incidents for Food Standards Scotland;
- progress for the Food Commission;
- aggregated, anonymised figures for researchers;
- what is coming for the waste sector.
Pilots before platforms. Four would test most of the ideas:
- School meals in one council, measured against its Good Food Nation commitments. Food for Life Scotland already certifies more than 100,000 school meals a day (soilassociation.org) against standards for fresh, local and sustainable food, which gives a pilot something to build on.
- One creamery's milk field, meaning the farms that supply it. The pilot would run from farm carbon audits and feed purchases, through the tanker collections, to the cheese. The aim is to answer the carbon, deforestation and green-claims questions that buyers ask once, rather than every time.
- One whisky-to-salmon loop, from distillery co-products through feed to the export market.
- Food waste in one city, ready for the new reporting powers.
A fifth, with the research institutes, could put substitution scenarios onto real land data.
None of this needs anyone to wait for a national platform. If you hold food data:
- start with one question someone keeps asking you;
- reuse an existing vocabulary rather than inventing one;
- publish your slice in a form others can join to;
- keep the bill of materials as you go.
Back to the porridge
The bowl of porridge will still be a bowl of porridge. The point is not to put a code on every oat, or on every litre of milk. It is that the answers to ordinary questions already exist. Where did this come from, what is in it, is it good for me, what did it cost the climate or a forest, where does what is left go? Those answers are scattered across dozens of organisations, and they could be joined without anyone surrendering control of their own part. A Good Food Nation, in the end, is one that knows what it is eating. Knowledge graphs, organised as holons, are a practical way of finding out.