Using AI for systemic risks in food systems

I have long had an interest in systemic risks and failure. How a system can come apart and fail is at last as interesting as how they work, and applying complex systems methods to understand how systems are vulnerable to failure is something I would like to spend more time on. With that in mind I have been looking at whether or not AI (specifically LLMs at this point) can be used to help map systems with the intention of understanding systemic risks.

As an aim this is perhaps not without some risk itself. Developing tools that make mapping systemic vulnerabilities easier could be misused. However, mapping systemic vulnerabilities is one thing, developing an intervention in a system that can exploit them is an entirely different thing. It also assumes that LLMs will be any use in mapping systemic vulnerabilities in a target system of interest, and that is also a big assumption.

What is perhaps more of a risk is that LLM tools will be used to understand and intervene in systems without any understanding of how suitable they are for that purpose. Perhaps, producing all sort of unexpected consequences as systems respond to poorly designed interventions, or wasting lots of resources on interventions that would never succeed in their aims. Or both.

The Food System

In terms of critical systems the food system ranks as one of the most interesting. It is part of the national security infrastructure, fairly highly regulated, spans multiple scales (from local to global), and is largely privately owned. Intervening in the food system is therefore not trivial. I would also say that there is mounting concern that the food system might not be in that good shape in many places. Could it fail? I think it could, but it also could be steered away from failure, at least for now.

I have worked on the food system for a while now, most notably on two FSA projects looking at different aspects of the UK food system. Therefore it seems logical for me at least to point my AI tools at the UK food system and see how well I can map it. So that is what I did. and a very basic network can be seen below.

Food System Network Visualization

I should note that I am working how the plug in that produces this visualisation, it’s a bit basic at the moment. It is rather fun however, as it pulls the network out of a Neo4J database that I self-host on a computer (along with this blog).

The network itself is useful and interesting but I don’t think it tells use anything we didn’t already know. That is fine for a starting point as it is build of one food systems strategy document. The value I think AI’s could offer in this space however is that they could build maps from lots of sources, more source than I could ever read. So that is my intention… eventually.

How does it work?

I will provide the tools that did this map at some-point in the future, for now they are not really ready for public consumption. They work by using API access to different LLMs (I implemented Ollama, Open Webui, ChatGPT, and Claude backends to a python interface. That interface provides a set of basic methods for other python programs to send systems mapping requests to LLMs.

At the moment a series of program methods process the data of interest, cleaning and combining it into a systems map. So it is not fully automated, you cannot just point the tools at a directory of files and build a map of that information. I intend to automate it as much as possible, however due to the nature of LLMs it might never be completely automated.

Why LLMs are both good and bad at this.

LLMs are interesting for many reasons but in this context they are interesting as they are actually reasonably good at extracting entities from information and the relationships between those entities. They are also reasonable at generalising or grouping things together. For these reasons and others they are not bad at building knowledge graphs or systems maps.

The problem is that they are also not that easy to work with, and have a tendency to not reliably produce fixed output from a query. That makes automating process with them tricky as you don’t always get what you expected. They also have no concept of what you are asking them to do, and also make things up. Both of which are unhelpful.

For now I am happy to put up with these problems to see how far I can get with tools to map systems. If it seems that this could be a method of use, then I will look for ways to support some research into how we can make AIs that are better at automated systems mapping.

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.