This AI runs on your phone and can spot fake diamonds, test water quality and identify genetically engineered seeds, using your camera. It can even identify the presence of DNA sequences in minutes.

IBM’s “Crypto Anchor Verifier” uses computer vision and image processing techniques to glean information digitally that resembles the light absorption spectrum and track random movement (Brownian motion).

(Optical characteristics are normally measured using light spectrometers, but they are quite bulky and expensive).

The company has taken the tool out of the lab and today revealed it is using it to help the Gemological Institute of America analyse and identify the imperfections in diamonds to help predict their grade.

Further down the line (but “within the next five years”) it sees cryptographic anchors and blockchain technology working together to ensure product authenticity from point of origin to the hands of a customer.

Donna Dillenger, an IBM research fellow, said: “AI and machine learning techniques including neural networks and video analytics play an important role in recognizing the optical characteristics of a substance, liquid or object including its colour, motion, viscosity and hue saturation. Models are trained with this data so they can predict the material or constituents of a substance they’re presented with.”

She added: “The power of this invention is transformed when we pair it with software that takes advantage of the computing capabilities of smart phones. The software combines AI trained on optical signatures with image-processing techniques.”

“Potential applications range from confirming the authenticity of life-saving medicine, analysing water quality, spotting counterfeits, including money, and detecting bacteria such as E. coli,” she concluded.

IBM researchers meanwhile are developing digital crypto-anchors too. The company suggests that they could be embedded into an edible shade of magnetic ink, which can be used to dye a malaria pill. “The code could become active and visible from a drop of water letting a consumer know it is authentic and safe to consume.”

The first models could be made available to clients in the next 18 months, IBM says.

What would you be testing?