WritingDatabricks (DBRX)Databricks (DBRX)published Jun 11, 2026seen 1h

How Ecolab rebuilt retail intelligence on Databricks and Anthropic Claude

Open original ↗

Captured source

source ↗

How Ecolab rebuilt retail intelligence on Databricks and Anthropic Claude | Databricks Blog Skip to main content

Summary

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. Their separate Stain Identification System, for instance, runs on Google's Gemini for image analysis. 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 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 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...

Excerpt shown — open the source for the full document.