As millions of people party and eat their way through the season of overindulgence, they should feel confident that indigestion and a few extra pounds should be the only downsides to their feasting.

Thanks to countless hours of work behind the scenes by food inspectors and public health officials, diners can feel assured that the food prepared for them at restaurants and grocery stores will be safe and sanitary. The legwork that goes into these routine and detailed inspections goes far beyond a simple checklist, however, as officials must complete and review thousands of inspection reports to accurately assess hazards.

That’s a lot of work, and it’s exactly the kind of problem that AI and data analytics are poised to help solve.

A deep dish of health inspection data

During the recent presentation at the American Public Health Association's annual conference, I demonstrated, along with SAS National Public Health Advisor Meg Schaeffer, how AI tools, including natural language processing, machine learning (ML), and large language models can help the city of Chicago handle a massive volume of reports.

From 2010 to 2021, Chicago's health department collected over 11,000 inspection reports featuring 92,000 free-form statements replete with written descriptions full of unstructured data. Manual analysis of these reports would have demanded roughly 7,700 hours - equivalent to the annual effort of four full-time employees. Fortunately, it doesn’t take a holiday miracle to automate this work and generate new insights that make commercial kitchens and grocery stores safer.

What are the hot spots around town?

Text analytics, like that offered by SAS® Visual Text Analytics, is designed to process and categorize vast amounts of unstructured text. By extracting entities related to food safety including flagging the serious issues (e.g., pests, undercooked turkey) and where they are likely to occur, it identifies, sorts, and groups terms. This greatly enhances analysis quality and speeds up time to value for those tasked with identifying patterns in food safety.

An inspector visiting a large chain restaurant kitchen, for instance, could use recommendations from a data-driven heat map to complement their own expertise. The map would showcase common areas of concern associated with the most serious issues specific to that kind of establishment. The same sort of targeted guidance could extend to cafeterias, grocery stores and other businesses that may have a unique set of common issues, allowing for more efficient and accurate inspections. This can be applied all the way down to the chains of stores as well so that inspectors know where to spend time when visiting a common chain of convenience stores.

Figure 1: Using SAS Visual Analytics to flag areas of common high-risk issues in grocery stores from narrative data

The proof is in the pudding

Interactive dashboards such as SAS Visual Analytics on SAS® Viya® 4 offer an easily digestible representation of sanitation problems. By drawing insights from numerous reports, ML doesn't only benefit the inspectors. With clear, actionable rules that emerge from ML findings, business owners can independently rectify recurring mistakes and elevate their safety standards.

In a collaborative review with a director of food safety, the adaptability and value of combining ML with text analytics for these reports was evident. The method's flexibility allows for quick adjustments based on expert feedback, ensuring that the approach remains aligned with current industry standards.

Specifically, the automated identification of locations of serious issues was a vast improvement over previous approaches in that it can quantitatively help overburdened city food safety inspectors best use their time during inspections. In future iterations of this work, we will explore the application of large language models in summarizing the key areas of concern by establishment type, chain, geographic areas, or other key groupings which could help inspectors do their jobs more efficiently.

Figure 2: Specifically tying a serious pest infestation to a rodent proofing issue/location which can be immediately remedied

OK…one more bite

The integration of text analytics and machine ML in food safety inspections is a promising way forward to improve public health. As research continues to inform practical application, the message for cities and governmental departments is clear: text analytics and AI, applied to public health data, offer a cornucopia of possibilities. for enhanced public safety outcomes. And for families who had their turkey devoured by the neighbor's hound dogs, they can provide more peace of mind when dining out.

Learn more about how SAS® Viya® visual text analytics capabilities can improve routine government processes

Share

About Author

Tom Sabo

Principal Solutions Architect

Tom Sabo is principal solutions architect with SAS who, since 2005, has been immersed in the field of text analytics as it applies to federal government challenges. He presents work on diverse topics including modeling applied to government procurement, best practices in social media, and using analytics to leverage and predict research trends.

Leave A Reply

Back to Top