Back to all work

Case Study

Pallet Calculator: When to Trust AI and When Not To

Organization Ergomotion, Inc.
My Role Enterprise AI Automation Consultant
Duration Multi-iteration (Sep 2025 — Present)
Status Hybrid approach in production
Collaborators Warehouse Operations Team · Logistics Coordinators · Carrier Partners (CH Robinson)
Comparative Prototyping Process Observation Error Analysis User Trust Research

The Problem

Ergomotion ships products that need to be carefully palletized — the right items on the right pallets, loaded efficiently into trailers, and shipped via the most cost-effective carrier. Getting pallet determination wrong has a real cost: wasted trailer space, incorrect shipping quotes, and delayed deliveries.

The question was not just "can we automate this?" but "what kind of automation can people actually trust for decisions that cost real money when they go wrong?"

Two Approaches, One Capability

I deliberately built the same capability two different ways. Not because I was unsure which to choose, but because I wanted to learn — with real evidence — where each approach excels and where it breaks down.

Deterministic Approach

A Python application with a 6-phase pallet-building algorithm: warehouse selection, SKU enrichment, stacking optimization, and cost comparison across LTL, Box Truck, and FTL shipments.

Includes document processing that supports 9 purchase order formats and a 3D trailer visualization so warehouse staff can see exactly how pallets should be loaded.

Highly reliable because it follows strict business rules. Every calculation is reproducible and auditable.

AI Agent Approach

Built on structured knowledge covering pallet logic, carrier rules, email templates, and reporting protocols. The agent processes inbound emails, creates shipment documents, sends bills of lading, requests carrier quotes, books through CH Robinson's API, and generates daily reports.

Full logistics orchestration end-to-end. Significantly more convenient for communication and coordination tasks.

What I Discovered

AI excelled at orchestration but made mistakes in precision-critical work.

The AI agent was significantly more convenient for composing emails, managing threads, and coordinating across carriers and warehouses. But it would make errors in pallet determination even when the rules were explicitly provided as structured knowledge.

Errors in AI output created cognitive debt over time.

The warehouse team always needed to double-check the AI's pallet decisions. Over weeks, this constant verification — 'is this one right?' — became mentally taxing. The team never fully trusted the AI for these calculations, and that distrust was warranted.

The deterministic system was boring but trusted.

Nobody got excited about the rule-based calculator. But nobody second-guessed it either. The warehouse team quickly learned that its outputs were reliable, and stopped checking every result. Trust was earned through consistency.

9 PO formats supported
3 Shipping modes compared
6-phase Deterministic algorithm
Hybrid Final architecture

The Hybrid Solution

The best results came from combining both approaches. Deterministic logic handles the rules-heavy, precision-critical work — pallet calculations, stacking optimization, cost comparisons. The AI agent handles orchestration, communication, and workflow management — composing emails, coordinating with carriers, generating reports.

This is not a novel conclusion, but arriving at it through building and testing both approaches gave me (and the team) confidence in the architecture. It was not a theoretical preference — it was an evidence-based decision.

A Note on Alternatives

The email automation and orchestration layer could alternatively be built using Robotic Process Automation (RPA), and Ergomotion plans to move in that direction over time. But RPA requires significant business process standardization before it becomes viable.

The AI agent approach was faster to develop and more adaptable as a starting point — it could handle the variability in how different carriers and warehouses communicate. As processes stabilize, the more rigid (and more reliable) RPA approach will make sense.

Constraints & Reflections

This comparative study was conducted within a single organization with one warehouse operations team. The finding that "deterministic logic wins for precision" may not generalize to domains where the rules are less clearly defined.

If I were to repeat this study, I would implement more structured measurement of the cognitive load on the warehouse team — quantifying the time spent verifying AI outputs versus deterministic outputs. The "cognitive debt" observation came from conversations, not from systematic measurement.

I also relied on Opus as an AI coding assistant to build the deterministic application rapidly. The speed of development (weeks, not months) was only possible because of AI-assisted coding — an interesting meta-point about where AI does and doesn't add value in the same project.