Putting the A.I. in Flat White
“Hey Siri, make me a coffee.”
<You’ll need to unlock your phone first>
(Tap, tap… tap… tap, tap, tap)
“Hey Siri, make me a coffee.”
<I’m not sure I understand>
“Make. Me. A. Coffee.”
<I’m sorry, I don’t know that>
“FFS… Alexa, make me a coffee.”
<Now playing ‘Bake Me Some Toffee’ by DJ Random on Amazon Music>
“ALEXA, JUST TELL ME WHETHER YOU CAN MAKE A COFFEE!”
<The weather in Lanzarote will be-”
“Alexa, off. I’ll do it myself.”
You get the gist. I may live to eat these words as I’m running naked and screaming down a road in a dystopian future whilst being pursued by a terminator but, on the whole, 2023 artificial intelligence (henceforth referred to in this blog as ‘AI’) leaves a lot to be desired, and the scenario above pretty accurately reflects the daily interactions I experience with the virtual ‘assistants’ I have access to. Don’t get me wrong, we’ve certainly come a long way since the third degree burns my parents received from their Goblin Teasmade when it went off half-cocked at 2am following a power cut in 1984, emitting an ear-splitting scream and spraying superheated plasma around their bedroom, but are we really at a point where the coffee industry is on the precipice of an AI revolution? In this article, I’m going to look at the whole process; farming, harvesting, processing, transportation, roasting and, finally, consumption, and see which bits of the pipeline would be best suited to the razor-sharp efficiencies and cold objectivity of AI, and which parts are best left to utterly unreliable, emotionally unstable, disease-prone organic sacks of mucus…
Farming – There is no denying that AI is already having a huge impact on agriculture in general, with everything from soil analysis, crop mapping, irrigation control and even bovine facial recognition systems being developed by the likes of IBM to aid farmers in a whole range of farming matters. According to one report I read, AI is predicted to outperform humans in 50% of tasks by 2068, and the human workforce could be obsolete in just 120 years from now, and I am sure these dates will only arrive sooner as the pace of AI advances and the technology develops exponentially. AI essentially ‘turns information into action’, and if you consider that the majority of coffee-producing regions, (with the noticeable exception of Brazil), are currently ineligible for weather insurance due to the increasingly erratic global climate, machine learning could be invaluable in developing weather insurance mechanisms that would benefit a much greater percentage of the coffee belt. That should be a good thing, right? On the other side of the bitcoin, AI will inevitably be used to increase automation, production and ultimately profitability, and this will invariably be done at the expense of the 25 million or so smallholder coffee farmers worldwide (who produce around 80% of the world’s coffee) and their workforce – not so good. However, there are clearly AI-shaped opportunities in the farming sector.
Harvesting & Processing – At lower altitudes and on flatter terrain, machines are used to indiscriminately strip-harvest coffee but, traditionally, the better quality coffee cherries grown at the more rarefied altitudes of 900m+ are picked by hand at their optimum ripeness; an excess of underripe cherries can make the coffee too sour, and overripeness poses a risk of fermentation which will ultimately spoil the flavour. This requires an experienced farm worker with at least one serviceable Mark I Eyeball to visibly inspect the fruit and make a judgement on its ripeness and ensure that it hasn’t been damaged by insects or disease. A good picker of Arabica can be expected to collect around 150kg of cherries in a 10 hour shift. (Interestingly, the cherry flesh accounts for around 85% of the entire weight of the fruit, all of which is lost during processing, so next time you quibble over the price of a coffee, bear in mind that the 60 - 70kg bag of beans that your roaster works with to produce your favourite coffee is the result of around 3 days’ work for a picker - how much do you think a UK plumber would charge you for three days’ graft? To put it another way, to pick the 120g of cherries required for an 18g double shot of espresso, that takes 30 seconds to select and pick). Yeah, I bet you feel guilty now…. Clearly, AI could learn to identify which cherries are at their optimum health and ripeness, and a 10 hour shift with lunch and toilet breaks would become a thing of the past, meaning production could easily be scaled up. But, much of the terrain on which the best coffee grows is extremely steep, and workers often have to use ropes to prevent them from inadvertently disappearing back down the slopes. Therefore, the physical attributes of a coffee picker would probably be harder to replicate in the guise of an AI machine than the algorithm required to operate it, so let’s leave this job to the sacks of mucus.
Transportation – Unfortunately, coffee doesn’t grow just anywhere, and if I had a pound for every time I’ve had to explain to someone who “only drinks Italian coffee” that there is actually no such thing, I’d have at least 7 or 8 pounds. Therefore, coffee has to be transported all over the world, and in the vast majority of cases coffee arrives in the UK by sea, although some does arrive by air freight. During the transportation phase, it is imperative that the coffee is kept dry and within a certain temperature range, which might lead you to question why using ships is a good idea in the first place – after a 25 year career in the Royal Maries, I can personally vouch for the fact that boats are generally cold and wet places to be. The ideal temperature for transportation is between 10 and 20 degrees Celsius , and it isn’t actually moisture from the ocean that is the main concern, but ‘container sweat’, which is caused by rapid fluctuations in temperature. Temperature control and ventilation of the large containers is key, both at sea and during the ongoing journeys by road to warehouses and roasteries. This is clearly a job for AI, so we’ll let Arnie have this one.
Roasting – OK, I’m really going to try hard to be objective here. Personally, I find roasting to be an incredibly tactile and immersive activity. I am constantly monitoring easily measurable parameters such as charge temperature, bean temperature, time to First Crack, development time, air-flow and rate-of-rise which, in fairness, I could delegate to a laptop, (I don’t, by the way). This doesn’t require AI; a free software package called Artisan can do this pretty well by means of communicating with the roaster through phidgets (physical widgets) attached to the array of thermocouples on the machine, (and software such as Artisan is a useful tool as it makes certain predictions about the roast in progress, but it is just that – a tool), but I am also constantly taking onboard conscious and unconscious sensory information, through my eyes, ears and nose, such as bean colour, noting changes in smell and the sound the coffee is making as it goes through the various stages of the roasting process. This allows me to pre-empt what the laptop is predicting and I can intervene earlier to avoid undesirable results. For me, this is what I enjoy the most about roasting, and after thousands of roast cycles, I still get a huge buzz every time I nail a temperature and time target. Interestingly, as I gain more experience as a roaster, I rely on tech less and less, and I now only use the laptop as a back-up thermometer and stopwatch should the display on the roaster fail. I feel it is important to have that personal connection with the process, and I do not want to relinquish control to a computer. To offer a balanced argument, I can fully understand why larger operations would wish or need to automate their processes, and I have no issue with that, it’s just not for me. So, I think this section might be a draw – of all the stages of the humble coffee bean’s journey discussed so far, roasting would almost certainly be one of the easiest to hand over to AI, but it is also the one I’m least inclined to.
Consumption – Picture the scene – you walk into your favourite coffee shop; no need to actually order a coffee; the facial recognition system has already, er, recognised your face and called up your recent orders from the international coffee database and, based on the time of day, weather, levels of stress measured in your voice, expression, bodily movements and a multitude of other variables, the machine has calculated that there is an 94.7% chance that you are in a flat white mood, and before you know it you are presented with the perfect cup of coffee. You take a sip; the temperature is perfect, the balance between sweet and sour is sublime, the acidity just right, the latte art something that Damien Hirst would be proud of… (if you’re of a certain age it will have also remembered that you like your coffee to be ‘hotter than the sun’ so you can read your Daily Mail and let it cool down for 20 minutes before you drink it)… congratulations, you’ve just been served by the Espresso3000, the world’s most advanced AI coffee machine. Now, imagine the same scenario, but this time you get to chat to the barista about the weather, take advice on the beans available, admire his/her hipster tattoos and his/her interesting facial hair as you watch him/her deftly produce the perfect shot and adorn it with expertly steamed milk… I know which one I would prefer. The first scenario isn’t a joke – there are machines like this on the market already - have a look at sites such as www.coffee robot.co and www.moto tech.net where you can buy this technology now.
Being capable of doing things does not mean we are required to. Just because we ‘can’ does not mean we ‘should’. I would be the first to concede that certain aspects of the coffee chain could, and perhaps should, be handed over to AI; transportation, for example. Certain aspects of farming could benefit from AI to ensure coffee continues to flourish as the planet changes. But robots dangling from ropes halfway up a mountain picking cherries? I feel that is best left to a real person. I also feel that not many people would want to be served by a machine during their coffee break, so when I’m in charge, baristas will be safe.
A lot of roasters already use varying levels of automation, and for me it is a personal choice (and I’m not naïve enough not to appreciate perhaps a luxury) not to, but for those that do, knowing where to draw the line is crucial. In theory, all you need to roast coffee is a heat source, a thermometer and a stopwatch, and a fairly basic AI system could manage it, I’m sure, but the human touch mustn’t be underestimated. I find it an incredibly intuitive process, and I would not be willing to hand that over to a machine… in short, I enjoy roasting!
All that aside, we have to acknowledge that there is a huge political slant to all of this as well – as you know, coffee is one of the world’s most traded commodities, so there is a LOT of money involved and, in some coffee-producing countries, this extends to the highest levels of government. It is estimated that around 125 million people worldwide (not far off 2% of the global population) depend on coffee for their livelihoods, so there is a lot at stake. Striking that balance between AI and mucus-filled sacks is going to be an important one to get right.