Food traceability ­— the ability to follow a product from farm to store or restaurant — took center stage last February after DNA tests conducted by the Food Safety Authority of Ireland found horse meat in foods advertised to contain beef.

But DNA technology for traceability isn’t limited to meat. Last week, scientists announced the development of a tool that might help ensure the authenticity of a sweeter product of the food industry: chocolate.

The basis of chocolate is the cacao bean. After being harvested from cacao trees, the bean is fermented and dried before being sold to traders and chocolate makers. However, beans from different varieties of the plant may get purposefully or accidentally mixed during this process, meaning that premium chocolate makers can’t be sure they’re buying high-quality “premium” beans over lower-quality beans.

Dapeng Zhang of the Department of Agriculture’s Agricultural Research Service and his colleagues developed a way to tell the difference between a premium variety of beans and a more common “bulk” variety using small variations in the plants’ DNA called single nucleotide polymorphisms (SNPs). By looking at 48 of these variations, the researchers created DNA “fingerprints” for each variety. They used the fingerprints to differentiate between bean samples of a premium variety grown in Peru and a common variety from the same region. The study was published in the Journal of Agricultural and Food Chemistry.

Scientists already knew how to use SNPs to identify the variety of a cacao tree from leaf samples. What didn’t exist was a way to identify the variety of the bean using the SNPs. The researchers found they could do this by taking DNA from the seed coat surrounding the bean.

The technology is still in the early stages of development, however. A larger database of cocoa bean DNA fingerprints will be needed to determine the purity of various bean samples from around the world.

The researchers think that producers, chocolate makers and consumers could benefit from the increased traceability of premium chocolate.

“[The test] could be done before the chocolate maker actually buys the beans so he could authenticate that they are what he’s paying for,” said Lyndel Meinhardt, a co-author of the study and research leader of the Sustainable Perennial Crops lab at the Agricultural Research Service.

The tool could aid producers and chocolate makers who want to market their product as authentic and unadulterated. If widely applied, such testing might one day help interested consumers make more informed choices.

Now I can’t help but wonder — where were the beans in my favorite dark chocolate bars grown?