Skip to main content

How Ecolab rebuilt retail intelligence on Databricks and Anthropic Claude

9 siloed data sources into real-time retail compliance intelligence in minutes.

by Babu Chinnaswamy, Nicholas Dylla, Alissa Ellingson and Harish Gaur

Ecolab uses Anthropic's Claude Sonnet and Haiku on Databricks Foundation Model APIs to convert 700-page FDA food safety manuals into cited, real-time answers for frontline retail staff.
Built as a native Databricks App with Lakebase Postgres and Unity Catalog, the solution unifies nine siloed data sources and cuts compliance report compilation from two weeks to under two minutes.
A multi-agent orchestration framework with dual-layer memory delivers personalized intelligence, continuously refined by five Judge LLMs and MLflow tracing.

When a store manager at a major food retailer needs to know the correct hot holding temperature for a rotisserie chicken, the answer is buried somewhere in a 700-page FDA food code. Until recently, finding it meant hours of manual search or a phone call that might not get returned.

That was just one symptom of a larger problem. Ecolab, a global leader in water, hygiene, and infection prevention, monitors food safety, pest control, and water quality for thousands of retail and fast food locations across North America. But the data that powered those services lived in nine separate systems — audits, health inspections, pest IoT telemetry, checklists, chemical usage logs, weather feeds, Yelp reviews, CDC neighborhood data, and the FDA food code itself.

"We had nine different data sources, nine different intelligences, and no way to see the full picture for a single location" — Nicholas Dylla, Technical Lead at Ecolab

Ecolab set out to change that and built something far more ambitious than a unified dashboard.

From nine silos to one intelligence engine

Ecolab's Retail Intelligence application is a native Databricks App with Lakebase Postgres as its transactional backbone. All nine data sources flow through Lakeflow and Spark Declarative Pipelines into a governed lakehouse under Unity Catalog, deployed reproducibly via Databricks Asset Bundles. 

Because the app runs inside the Databricks security perimeter, Ecolab gets built-in authentication, automatic service principals, and Unity Catalog access controls without standing up separate infrastructure. Everything the end user sees originates from Databricks.
 

Figure 1: Retail Intelligence App Architecture

But unifying the data was only half the challenge. The real question was: how do you make nine sources of intelligence feel like a single, conversational expert?

Databricks gives Ecolab a single platform for data, AI, and governance without needing any separate ML infrastructure to stand up or manage. Through Foundation Model APIs, Ecolab serves Claude Sonnet for complex reasoning, Haiku for fast and cost-effective summarization, and Gemini for image analysis, all from the same control plane. If a better model emerges tomorrow, they swap it in without re-architecting. Every model call stays inside the Databricks security perimeter. The Unity AI Gateway layers on payload logging, per-user rate limiting, PII guardrails, and automatic fallbacks, while Unity Catalog governs access to both the data and the models serving it.

Serving Claude  on Databricks

At the core of this framework is Anthropic's Claude, served through those same Foundation Model APIs.

Claude Sonnet acts as the primary reasoning engine, distilling complex regulations and maintaining long-term user memory. Claude Haiku handles summarization, condensing conversation history every three turns and distilling verbose data signals into concise briefs while keeping interactions fast and cost-effective.

Ecolab chose Claude after evaluating multiple providers. The model's response format proved best suited to compliance summarization, and their privately hosted Claude tenant met strict security requirements. At the same time, the Databricks platform gives them multi-model flexibility. 

How the agents work together

Under the hood, the system follows a Multi-Agent-Supervisor pattern orchestrated through Databricks Workflows

When a store manager types a question, the Coordinator Agent breaks it into subtasks and delegates each to a specialized sub-agent. One sub-agent might retrieve the relevant FDA passage via Vector Search. Another queries structured compliance data through SQL and Unity Catalog Functions. A third pulls pest telemetry from an external MCP server. The Response Agent then assembles everything into a single, cited answer and persists the interaction to Lakebase.

Figure 2: Agent-to-Agent Orchestration

Figure 2: Agent-to-Agent Orchestration 

What makes the experience feel personal is the dual-layer memory architecture.

Short-term (working memory). Every query carries the last ten conversation turns directly in the prompt,  the canonical conversation buffer approach. To keep that context tight as a session grows, Claude Haiku 4.5 runs an inline summarizer every three turns, collapsing earlier exchanges into a dense digest. Prompt caching keeps the warm context efficient on the wire, and the memory-tool provides a structured handoff between active state and persistent state.

Long-term (semantic memory). Across sessions, Claude Sonnet 4.6 maintains a per-user profile (role, preferences, recurring focus areas, location context, and behavioral patterns). Profiles are stored as structured records and continuously updated as the user interacts. This mirrors the long-term memory pattern.

The combined effect: a store manager returning after weeks of absence opens the assistant and gets answers that already understand their territory, their open tickets, and their workflow without requiring re-prompting, re-introduction or re-explaining who they are.

Figure 3: Query Architecture & Memory Payload Flow

Figure 3: Query Architecture & Memory Payload Flow

Quality is never static. Five Judge LLMs evaluate every interaction across multiple dimensions. User feedback combines with implicit signals to feed an automated prompt optimization loop. MLflow traces every execution path, while dashboards track latency and error rates in real time. The team even mines query logs to build better default questions based on what managers actually ask.

Real-time agent answers are only one half of the story. For high-volume offline workloads — retroactively scoring historical inspections, generating portfolio-wide compliance briefs, and powering the Judge LLM evaluation loop, Ecolab uses Databricks AI batch inference functions like ai_query() to apply Claude across thousands of records in a single SQL call. What used to be sequential row-by-row processing now completes in parallel in seconds, governed by the same Unity Catalog policies that guard the live agent.

Minutes instead of weeks

The impact was immediate. What once took two weeks to manually pull data from nine siloed systems to compile a single compliance report for one customer location now completes in under two minutes. An FDA food code question that sent managers digging through a 700-page PDF for hours now returns a cited, plain-language answer in seconds.

Behind the scenes, nine separate data sources have been unified into a single governed lakehouse, serving hundreds of North American locations at launch in mid-April 2026. And because the conversational agent supports approximately twelve languages at ~98% accuracy, frontline staff can interact in whichever language they're most comfortable with.

From faster insights to fewer violations

Speed is just the starting point. The real value of compressing two weeks into two minutes is what teams do with the time they get back and, more importantly, the problems they catch before those problems become penalties.


A pest issue that's also a food safety violation is flagged, investigated, and resolved once, not discovered twice in separate workflows. For Ecolab's customers, the outcome is measurably better compliance postures, fewer penalty events, and a partner that delivers intelligence proactively rather than reactively. For Ecolab, it's a platform that deepens customer relationships and turns operational data into a durable competitive advantage.
 

"What used to take two weeks, pulling data from nine systems to compile a single compliance report, now takes under two minutes with Claude on Databricks. Our frontline staff across 600 locations get cited, plain-language answers from a 700-page FDA food code in seconds, in whatever language they're most comfortable with." — Josh McCoy, Product Manager for Retail Intelligence, Ecolab

Next, Ecolab plans to add MCP-powered automated actions — pest inspections,
chemical reorders, food safety norms and work orders triggered directly from the chat interface —turning the system from an intelligence layer into a full operational Agent.
 

Get the latest posts in your inbox

Subscribe to our blog and get the latest posts delivered to your inbox.