How could AI change Scotland's public services?
Getty ImagesA new artificial intelligence agency has been set up in Scotland, aimed at harnessing the potential of the most talked about technology of recent years.
The Scottish government is forecasting an explosion in the field, and says it could generate an extra £23bn a year for the national economy by 2035.
Ministers are no strangers to technological bandwagons and jargon - not so long ago they were all talking about the blockchain, and Rishi Sunak was priming the Royal Mint to start turning out non-fungible tokens, or NFTs for short.
But artificial intelligence, having been backed by more than a trillion dollars of investment by big tech firm, feels like a different prospect.
So how does the government see this affecting Scotland's services and economy over the years to come?
And how do ministers hope to manage the risks and controversies associated with this fast-developing field?
There have been rapid developments in AI tools over recent years.
You probably interact with them multiple times every day by now - from the summary at the top of search engine results to your smartphone's autocorrect, photo editing software or voicemail transcription tools.
It's not just happening in the office. Algorithms are helping to dictate what people watch on TV, where they go on holiday and who they date.
And increasingly governments have an eye on them as a way of propping up overstretched public services and budgets, by improving planning and cutting costs.
The Scottish government has set up its own agency - AI Scotland - as a "national flagship" to drive strategy and promote the growth of local companies.
Its five-year strategy highlighted that there are already some leading AI firms based in Scotland, while others are actively moving here.
Wordsmith AI is continuing Edinburgh's tradition as a centre of the legal industry by creating tools to help with things like contract drafting and reviews - and was valued at $100bn just 18 months after launching.
Two data firms - CoreWeave and DataVita - are key partners in a £2.5bn AI computing campus in Lanarkshire, part of a "growth zone" which CoreWeave says will be "one of the most advanced AI sites anywhere in the world".
Another company, AI Pathfinder, is backing an industrial park in Irvine in North Ayrshire which it says could bring in £15bn of investment.
AI PathfinderSome leading research is taking place in Scotland too.
The University of Edinburgh is home to ARCHER2, the UK's national supercomputer, and - after a brief period of outrage where the UK government cancelled then reinstated it - will soon host a £750m supercomputing centre.
The National Robotarium at Heriot-Watt University is leading breakthroughs in medical and offshore robotics, having incubated 14 companies in its first few years.
Healthcare is in the centre of some of the most eye-catching developments in terms of AI in public services.
A study published last week found that AI tools could increase cancer detection, while also speeding up diagnoses and cutting the workload of clinical workers.
It was based on a project led by the University of Aberdeen and NHS Grampian which looked at breast screening processes.
Across the UK, all women aged between 50 and 70 are invited for mammograms every three years - and two million of the tests are carried out annually.
Two radiologists are required to read every mammogram, and patients are called back in for further tests where there is any dubiety - but still, 20% of cancers are missed.
A number of different health studies have capitalised on the way AI tools can be trained in image recognition to help read scans, swiftly highlighting minute areas of concern that could easily be missed.
And this one found that by using software called Mia in the place of the second radiologist, they could improve detection by 10.4%, cut the waiting time for results from 14 days to three, and reduce the workload of the doctors by more than 30%.
This retained the safeguard of a human radiologist reviewing each case, while maximising the potential gains from the use of technology.
Getty ImagesAnother project being led by the University of Edinburgh is developing an AI tool which could be used by opticians to spot the early signs of dementia, by analysing photographs of the retina.
Beyond health, plenty of other public bodies are looking at ways of tightening up their admin and decision-making.
The Scottish government also runs a regular "CivTech" funding round for innovative companies, and one round last year focused specifically on AI.
That included investment in products to help teachers with administrative tasks, an automated mapping system to monitor puffin populations using drones, and software to identify toxins which could give firefighters cancer.
So there is plenty of potential for growth in this fast-expanding field.
PA MediaBut of course it is not all rosy in the garden when it comes to AI. Concerns about it abound.
There are ethical concerns about how these models are trained and used - consider the outrage over the Grok chatbot being used to remove clothing from images of women without their consent.
There are questions about how they will affect the future of work and entertainment, promising huge disruption to creative industries.
The government is alive to these issues; its strategy document is peppered with words like "responsible" and "ethical" when it comes to the use of AI.
It says it is already working with unions to make sure jobs are created rather than lost. A Future Jobs Panel is to be set up to assess impact on the workforce and to help with skills planning.
And it says its agency is being set up precisely to make sure there are "guardrails in place to avoid an unethical impact of AI".
Getty ImagesThen there are the environmental issues.
AI data processing is incredibly energy-intensive, taking up huge amounts of power - and even water.
Plans for a data centre in Edinburgh were recently rejected by the city council over environmental concerns - and councillors have now backed a moratorium on similar developments until the government can give guidance on what constitutes a "green data centre", per its planning policy.
But ministers once again believe Scotland is actually well placed to deal with this issue - because of its abundant renewable energy potential.
In 2024 alone, we produced 38.4 terawatt hours of renewable electricity, and ministers say there is another 26.4 gigawatts of new capacity in onshore and offshore wind and solar projects in the planning pipeline.
Indeed one of the world's largest offshore wind farms is being built off Scotland's east coast.
The infrastructure of the national grid is creaking under the prospect of moving some of that electricity from the remote areas where it is generated to the population centres further south.
But what if it could be utilised by data centres closer to home?
Ministers also argue that heat generated by huge processing centres could be redistributed into district networks of homes.
Some of this is blue-sky thinking about the future.
But they are looking at the pace of change and coming to the conclusion that they need to jump on board now.
As Deputy First Minister Kate Forbes put it, "AI is happening" - and we can "reap benefits or allow it to disrupt our lives".
It's already shaking up the economy and society, and the government wants Scotland to get involved and capitalise on its potential, rather than just being swept along as the world changes.
